{-# 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.DMS.ModifyReplicationSubnetGroup
-- 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 the settings for the specified replication subnet group.
module Amazonka.DMS.ModifyReplicationSubnetGroup
  ( -- * Creating a Request
    ModifyReplicationSubnetGroup (..),
    newModifyReplicationSubnetGroup,

    -- * Request Lenses
    modifyReplicationSubnetGroup_replicationSubnetGroupDescription,
    modifyReplicationSubnetGroup_replicationSubnetGroupIdentifier,
    modifyReplicationSubnetGroup_subnetIds,

    -- * Destructuring the Response
    ModifyReplicationSubnetGroupResponse (..),
    newModifyReplicationSubnetGroupResponse,

    -- * Response Lenses
    modifyReplicationSubnetGroupResponse_replicationSubnetGroup,
    modifyReplicationSubnetGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DMS.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

-- |
--
-- /See:/ 'newModifyReplicationSubnetGroup' smart constructor.
data ModifyReplicationSubnetGroup = ModifyReplicationSubnetGroup'
  { -- | A description for the replication instance subnet group.
    ModifyReplicationSubnetGroup -> Maybe Text
replicationSubnetGroupDescription :: Prelude.Maybe Prelude.Text,
    -- | The name of the replication instance subnet group.
    ModifyReplicationSubnetGroup -> Text
replicationSubnetGroupIdentifier :: Prelude.Text,
    -- | A list of subnet IDs.
    ModifyReplicationSubnetGroup -> [Text]
subnetIds :: [Prelude.Text]
  }
  deriving (ModifyReplicationSubnetGroup
-> ModifyReplicationSubnetGroup -> Bool
(ModifyReplicationSubnetGroup
 -> ModifyReplicationSubnetGroup -> Bool)
-> (ModifyReplicationSubnetGroup
    -> ModifyReplicationSubnetGroup -> Bool)
-> Eq ModifyReplicationSubnetGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyReplicationSubnetGroup
-> ModifyReplicationSubnetGroup -> Bool
$c/= :: ModifyReplicationSubnetGroup
-> ModifyReplicationSubnetGroup -> Bool
== :: ModifyReplicationSubnetGroup
-> ModifyReplicationSubnetGroup -> Bool
$c== :: ModifyReplicationSubnetGroup
-> ModifyReplicationSubnetGroup -> Bool
Prelude.Eq, ReadPrec [ModifyReplicationSubnetGroup]
ReadPrec ModifyReplicationSubnetGroup
Int -> ReadS ModifyReplicationSubnetGroup
ReadS [ModifyReplicationSubnetGroup]
(Int -> ReadS ModifyReplicationSubnetGroup)
-> ReadS [ModifyReplicationSubnetGroup]
-> ReadPrec ModifyReplicationSubnetGroup
-> ReadPrec [ModifyReplicationSubnetGroup]
-> Read ModifyReplicationSubnetGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyReplicationSubnetGroup]
$creadListPrec :: ReadPrec [ModifyReplicationSubnetGroup]
readPrec :: ReadPrec ModifyReplicationSubnetGroup
$creadPrec :: ReadPrec ModifyReplicationSubnetGroup
readList :: ReadS [ModifyReplicationSubnetGroup]
$creadList :: ReadS [ModifyReplicationSubnetGroup]
readsPrec :: Int -> ReadS ModifyReplicationSubnetGroup
$creadsPrec :: Int -> ReadS ModifyReplicationSubnetGroup
Prelude.Read, Int -> ModifyReplicationSubnetGroup -> ShowS
[ModifyReplicationSubnetGroup] -> ShowS
ModifyReplicationSubnetGroup -> String
(Int -> ModifyReplicationSubnetGroup -> ShowS)
-> (ModifyReplicationSubnetGroup -> String)
-> ([ModifyReplicationSubnetGroup] -> ShowS)
-> Show ModifyReplicationSubnetGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyReplicationSubnetGroup] -> ShowS
$cshowList :: [ModifyReplicationSubnetGroup] -> ShowS
show :: ModifyReplicationSubnetGroup -> String
$cshow :: ModifyReplicationSubnetGroup -> String
showsPrec :: Int -> ModifyReplicationSubnetGroup -> ShowS
$cshowsPrec :: Int -> ModifyReplicationSubnetGroup -> ShowS
Prelude.Show, (forall x.
 ModifyReplicationSubnetGroup -> Rep ModifyReplicationSubnetGroup x)
-> (forall x.
    Rep ModifyReplicationSubnetGroup x -> ModifyReplicationSubnetGroup)
-> Generic ModifyReplicationSubnetGroup
forall x.
Rep ModifyReplicationSubnetGroup x -> ModifyReplicationSubnetGroup
forall x.
ModifyReplicationSubnetGroup -> Rep ModifyReplicationSubnetGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyReplicationSubnetGroup x -> ModifyReplicationSubnetGroup
$cfrom :: forall x.
ModifyReplicationSubnetGroup -> Rep ModifyReplicationSubnetGroup x
Prelude.Generic)

-- |
-- Create a value of 'ModifyReplicationSubnetGroup' 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:
--
-- 'replicationSubnetGroupDescription', 'modifyReplicationSubnetGroup_replicationSubnetGroupDescription' - A description for the replication instance subnet group.
--
-- 'replicationSubnetGroupIdentifier', 'modifyReplicationSubnetGroup_replicationSubnetGroupIdentifier' - The name of the replication instance subnet group.
--
-- 'subnetIds', 'modifyReplicationSubnetGroup_subnetIds' - A list of subnet IDs.
newModifyReplicationSubnetGroup ::
  -- | 'replicationSubnetGroupIdentifier'
  Prelude.Text ->
  ModifyReplicationSubnetGroup
newModifyReplicationSubnetGroup :: Text -> ModifyReplicationSubnetGroup
newModifyReplicationSubnetGroup
  Text
pReplicationSubnetGroupIdentifier_ =
    ModifyReplicationSubnetGroup' :: Maybe Text -> Text -> [Text] -> ModifyReplicationSubnetGroup
ModifyReplicationSubnetGroup'
      { $sel:replicationSubnetGroupDescription:ModifyReplicationSubnetGroup' :: Maybe Text
replicationSubnetGroupDescription =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:replicationSubnetGroupIdentifier:ModifyReplicationSubnetGroup' :: Text
replicationSubnetGroupIdentifier =
          Text
pReplicationSubnetGroupIdentifier_,
        $sel:subnetIds:ModifyReplicationSubnetGroup' :: [Text]
subnetIds = [Text]
forall a. Monoid a => a
Prelude.mempty
      }

-- | A description for the replication instance subnet group.
modifyReplicationSubnetGroup_replicationSubnetGroupDescription :: Lens.Lens' ModifyReplicationSubnetGroup (Prelude.Maybe Prelude.Text)
modifyReplicationSubnetGroup_replicationSubnetGroupDescription :: (Maybe Text -> f (Maybe Text))
-> ModifyReplicationSubnetGroup -> f ModifyReplicationSubnetGroup
modifyReplicationSubnetGroup_replicationSubnetGroupDescription = (ModifyReplicationSubnetGroup -> Maybe Text)
-> (ModifyReplicationSubnetGroup
    -> Maybe Text -> ModifyReplicationSubnetGroup)
-> Lens
     ModifyReplicationSubnetGroup
     ModifyReplicationSubnetGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationSubnetGroup' {Maybe Text
replicationSubnetGroupDescription :: Maybe Text
$sel:replicationSubnetGroupDescription:ModifyReplicationSubnetGroup' :: ModifyReplicationSubnetGroup -> Maybe Text
replicationSubnetGroupDescription} -> Maybe Text
replicationSubnetGroupDescription) (\s :: ModifyReplicationSubnetGroup
s@ModifyReplicationSubnetGroup' {} Maybe Text
a -> ModifyReplicationSubnetGroup
s {$sel:replicationSubnetGroupDescription:ModifyReplicationSubnetGroup' :: Maybe Text
replicationSubnetGroupDescription = Maybe Text
a} :: ModifyReplicationSubnetGroup)

-- | The name of the replication instance subnet group.
modifyReplicationSubnetGroup_replicationSubnetGroupIdentifier :: Lens.Lens' ModifyReplicationSubnetGroup Prelude.Text
modifyReplicationSubnetGroup_replicationSubnetGroupIdentifier :: (Text -> f Text)
-> ModifyReplicationSubnetGroup -> f ModifyReplicationSubnetGroup
modifyReplicationSubnetGroup_replicationSubnetGroupIdentifier = (ModifyReplicationSubnetGroup -> Text)
-> (ModifyReplicationSubnetGroup
    -> Text -> ModifyReplicationSubnetGroup)
-> Lens
     ModifyReplicationSubnetGroup ModifyReplicationSubnetGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationSubnetGroup' {Text
replicationSubnetGroupIdentifier :: Text
$sel:replicationSubnetGroupIdentifier:ModifyReplicationSubnetGroup' :: ModifyReplicationSubnetGroup -> Text
replicationSubnetGroupIdentifier} -> Text
replicationSubnetGroupIdentifier) (\s :: ModifyReplicationSubnetGroup
s@ModifyReplicationSubnetGroup' {} Text
a -> ModifyReplicationSubnetGroup
s {$sel:replicationSubnetGroupIdentifier:ModifyReplicationSubnetGroup' :: Text
replicationSubnetGroupIdentifier = Text
a} :: ModifyReplicationSubnetGroup)

-- | A list of subnet IDs.
modifyReplicationSubnetGroup_subnetIds :: Lens.Lens' ModifyReplicationSubnetGroup [Prelude.Text]
modifyReplicationSubnetGroup_subnetIds :: ([Text] -> f [Text])
-> ModifyReplicationSubnetGroup -> f ModifyReplicationSubnetGroup
modifyReplicationSubnetGroup_subnetIds = (ModifyReplicationSubnetGroup -> [Text])
-> (ModifyReplicationSubnetGroup
    -> [Text] -> ModifyReplicationSubnetGroup)
-> Lens
     ModifyReplicationSubnetGroup
     ModifyReplicationSubnetGroup
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationSubnetGroup' {[Text]
subnetIds :: [Text]
$sel:subnetIds:ModifyReplicationSubnetGroup' :: ModifyReplicationSubnetGroup -> [Text]
subnetIds} -> [Text]
subnetIds) (\s :: ModifyReplicationSubnetGroup
s@ModifyReplicationSubnetGroup' {} [Text]
a -> ModifyReplicationSubnetGroup
s {$sel:subnetIds:ModifyReplicationSubnetGroup' :: [Text]
subnetIds = [Text]
a} :: ModifyReplicationSubnetGroup) (([Text] -> f [Text])
 -> ModifyReplicationSubnetGroup -> f ModifyReplicationSubnetGroup)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ModifyReplicationSubnetGroup
-> f ModifyReplicationSubnetGroup
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 ModifyReplicationSubnetGroup where
  type
    AWSResponse ModifyReplicationSubnetGroup =
      ModifyReplicationSubnetGroupResponse
  request :: ModifyReplicationSubnetGroup
-> Request ModifyReplicationSubnetGroup
request = Service
-> ModifyReplicationSubnetGroup
-> Request ModifyReplicationSubnetGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifyReplicationSubnetGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyReplicationSubnetGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ModifyReplicationSubnetGroup))
-> Logger
-> Service
-> Proxy ModifyReplicationSubnetGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyReplicationSubnetGroup)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe ReplicationSubnetGroup
-> Int -> ModifyReplicationSubnetGroupResponse
ModifyReplicationSubnetGroupResponse'
            (Maybe ReplicationSubnetGroup
 -> Int -> ModifyReplicationSubnetGroupResponse)
-> Either String (Maybe ReplicationSubnetGroup)
-> Either String (Int -> ModifyReplicationSubnetGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ReplicationSubnetGroup)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReplicationSubnetGroup")
            Either String (Int -> ModifyReplicationSubnetGroupResponse)
-> Either String Int
-> Either String ModifyReplicationSubnetGroupResponse
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
    ModifyReplicationSubnetGroup

instance Prelude.NFData ModifyReplicationSubnetGroup

instance Core.ToHeaders ModifyReplicationSubnetGroup where
  toHeaders :: ModifyReplicationSubnetGroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ModifyReplicationSubnetGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonDMSv20160101.ModifyReplicationSubnetGroup" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON ModifyReplicationSubnetGroup where
  toJSON :: ModifyReplicationSubnetGroup -> Value
toJSON ModifyReplicationSubnetGroup' {[Text]
Maybe Text
Text
subnetIds :: [Text]
replicationSubnetGroupIdentifier :: Text
replicationSubnetGroupDescription :: Maybe Text
$sel:subnetIds:ModifyReplicationSubnetGroup' :: ModifyReplicationSubnetGroup -> [Text]
$sel:replicationSubnetGroupIdentifier:ModifyReplicationSubnetGroup' :: ModifyReplicationSubnetGroup -> Text
$sel:replicationSubnetGroupDescription:ModifyReplicationSubnetGroup' :: ModifyReplicationSubnetGroup -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ReplicationSubnetGroupDescription" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
replicationSubnetGroupDescription,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ReplicationSubnetGroupIdentifier"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
replicationSubnetGroupIdentifier
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SubnetIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
subnetIds)
          ]
      )

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

instance Core.ToQuery ModifyReplicationSubnetGroup where
  toQuery :: ModifyReplicationSubnetGroup -> QueryString
toQuery = QueryString -> ModifyReplicationSubnetGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

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

-- |
-- Create a value of 'ModifyReplicationSubnetGroupResponse' 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:
--
-- 'replicationSubnetGroup', 'modifyReplicationSubnetGroupResponse_replicationSubnetGroup' - The modified replication subnet group.
--
-- 'httpStatus', 'modifyReplicationSubnetGroupResponse_httpStatus' - The response's http status code.
newModifyReplicationSubnetGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifyReplicationSubnetGroupResponse
newModifyReplicationSubnetGroupResponse :: Int -> ModifyReplicationSubnetGroupResponse
newModifyReplicationSubnetGroupResponse Int
pHttpStatus_ =
  ModifyReplicationSubnetGroupResponse' :: Maybe ReplicationSubnetGroup
-> Int -> ModifyReplicationSubnetGroupResponse
ModifyReplicationSubnetGroupResponse'
    { $sel:replicationSubnetGroup:ModifyReplicationSubnetGroupResponse' :: Maybe ReplicationSubnetGroup
replicationSubnetGroup =
        Maybe ReplicationSubnetGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ModifyReplicationSubnetGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The modified replication subnet group.
modifyReplicationSubnetGroupResponse_replicationSubnetGroup :: Lens.Lens' ModifyReplicationSubnetGroupResponse (Prelude.Maybe ReplicationSubnetGroup)
modifyReplicationSubnetGroupResponse_replicationSubnetGroup :: (Maybe ReplicationSubnetGroup -> f (Maybe ReplicationSubnetGroup))
-> ModifyReplicationSubnetGroupResponse
-> f ModifyReplicationSubnetGroupResponse
modifyReplicationSubnetGroupResponse_replicationSubnetGroup = (ModifyReplicationSubnetGroupResponse
 -> Maybe ReplicationSubnetGroup)
-> (ModifyReplicationSubnetGroupResponse
    -> Maybe ReplicationSubnetGroup
    -> ModifyReplicationSubnetGroupResponse)
-> Lens
     ModifyReplicationSubnetGroupResponse
     ModifyReplicationSubnetGroupResponse
     (Maybe ReplicationSubnetGroup)
     (Maybe ReplicationSubnetGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyReplicationSubnetGroupResponse' {Maybe ReplicationSubnetGroup
replicationSubnetGroup :: Maybe ReplicationSubnetGroup
$sel:replicationSubnetGroup:ModifyReplicationSubnetGroupResponse' :: ModifyReplicationSubnetGroupResponse
-> Maybe ReplicationSubnetGroup
replicationSubnetGroup} -> Maybe ReplicationSubnetGroup
replicationSubnetGroup) (\s :: ModifyReplicationSubnetGroupResponse
s@ModifyReplicationSubnetGroupResponse' {} Maybe ReplicationSubnetGroup
a -> ModifyReplicationSubnetGroupResponse
s {$sel:replicationSubnetGroup:ModifyReplicationSubnetGroupResponse' :: Maybe ReplicationSubnetGroup
replicationSubnetGroup = Maybe ReplicationSubnetGroup
a} :: ModifyReplicationSubnetGroupResponse)

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

instance
  Prelude.NFData
    ModifyReplicationSubnetGroupResponse