{-# 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.DeleteReplicationGroup
-- 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)
--
-- Deletes an existing replication group. By default, this operation
-- deletes the entire replication group, including the primary\/primaries
-- and all of the read replicas. If the replication group has only one
-- primary, you can optionally delete only the read replicas, while
-- retaining the primary by setting @RetainPrimaryCluster=true@.
--
-- When you receive a successful response from this operation, Amazon
-- ElastiCache immediately begins deleting the selected resources; you
-- cannot cancel or revert this operation.
--
-- This operation is valid for Redis only.
module Amazonka.ElastiCache.DeleteReplicationGroup
  ( -- * Creating a Request
    DeleteReplicationGroup (..),
    newDeleteReplicationGroup,

    -- * Request Lenses
    deleteReplicationGroup_finalSnapshotIdentifier,
    deleteReplicationGroup_retainPrimaryCluster,
    deleteReplicationGroup_replicationGroupId,

    -- * Destructuring the Response
    DeleteReplicationGroupResponse (..),
    newDeleteReplicationGroupResponse,

    -- * Response Lenses
    deleteReplicationGroupResponse_replicationGroup,
    deleteReplicationGroupResponse_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 @DeleteReplicationGroup@ operation.
--
-- /See:/ 'newDeleteReplicationGroup' smart constructor.
data DeleteReplicationGroup = DeleteReplicationGroup'
  { -- | The name of a final node group (shard) snapshot. ElastiCache creates the
    -- snapshot from the primary node in the cluster, rather than one of the
    -- replicas; this is to ensure that it captures the freshest data. After
    -- the final snapshot is taken, the replication group is immediately
    -- deleted.
    DeleteReplicationGroup -> Maybe Text
finalSnapshotIdentifier :: Prelude.Maybe Prelude.Text,
    -- | If set to @true@, all of the read replicas are deleted, but the primary
    -- node is retained.
    DeleteReplicationGroup -> Maybe Bool
retainPrimaryCluster :: Prelude.Maybe Prelude.Bool,
    -- | The identifier for the cluster to be deleted. This parameter is not case
    -- sensitive.
    DeleteReplicationGroup -> Text
replicationGroupId :: Prelude.Text
  }
  deriving (DeleteReplicationGroup -> DeleteReplicationGroup -> Bool
(DeleteReplicationGroup -> DeleteReplicationGroup -> Bool)
-> (DeleteReplicationGroup -> DeleteReplicationGroup -> Bool)
-> Eq DeleteReplicationGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReplicationGroup -> DeleteReplicationGroup -> Bool
$c/= :: DeleteReplicationGroup -> DeleteReplicationGroup -> Bool
== :: DeleteReplicationGroup -> DeleteReplicationGroup -> Bool
$c== :: DeleteReplicationGroup -> DeleteReplicationGroup -> Bool
Prelude.Eq, ReadPrec [DeleteReplicationGroup]
ReadPrec DeleteReplicationGroup
Int -> ReadS DeleteReplicationGroup
ReadS [DeleteReplicationGroup]
(Int -> ReadS DeleteReplicationGroup)
-> ReadS [DeleteReplicationGroup]
-> ReadPrec DeleteReplicationGroup
-> ReadPrec [DeleteReplicationGroup]
-> Read DeleteReplicationGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReplicationGroup]
$creadListPrec :: ReadPrec [DeleteReplicationGroup]
readPrec :: ReadPrec DeleteReplicationGroup
$creadPrec :: ReadPrec DeleteReplicationGroup
readList :: ReadS [DeleteReplicationGroup]
$creadList :: ReadS [DeleteReplicationGroup]
readsPrec :: Int -> ReadS DeleteReplicationGroup
$creadsPrec :: Int -> ReadS DeleteReplicationGroup
Prelude.Read, Int -> DeleteReplicationGroup -> ShowS
[DeleteReplicationGroup] -> ShowS
DeleteReplicationGroup -> String
(Int -> DeleteReplicationGroup -> ShowS)
-> (DeleteReplicationGroup -> String)
-> ([DeleteReplicationGroup] -> ShowS)
-> Show DeleteReplicationGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReplicationGroup] -> ShowS
$cshowList :: [DeleteReplicationGroup] -> ShowS
show :: DeleteReplicationGroup -> String
$cshow :: DeleteReplicationGroup -> String
showsPrec :: Int -> DeleteReplicationGroup -> ShowS
$cshowsPrec :: Int -> DeleteReplicationGroup -> ShowS
Prelude.Show, (forall x. DeleteReplicationGroup -> Rep DeleteReplicationGroup x)
-> (forall x.
    Rep DeleteReplicationGroup x -> DeleteReplicationGroup)
-> Generic DeleteReplicationGroup
forall x. Rep DeleteReplicationGroup x -> DeleteReplicationGroup
forall x. DeleteReplicationGroup -> Rep DeleteReplicationGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteReplicationGroup x -> DeleteReplicationGroup
$cfrom :: forall x. DeleteReplicationGroup -> Rep DeleteReplicationGroup x
Prelude.Generic)

-- |
-- Create a value of 'DeleteReplicationGroup' 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:
--
-- 'finalSnapshotIdentifier', 'deleteReplicationGroup_finalSnapshotIdentifier' - The name of a final node group (shard) snapshot. ElastiCache creates the
-- snapshot from the primary node in the cluster, rather than one of the
-- replicas; this is to ensure that it captures the freshest data. After
-- the final snapshot is taken, the replication group is immediately
-- deleted.
--
-- 'retainPrimaryCluster', 'deleteReplicationGroup_retainPrimaryCluster' - If set to @true@, all of the read replicas are deleted, but the primary
-- node is retained.
--
-- 'replicationGroupId', 'deleteReplicationGroup_replicationGroupId' - The identifier for the cluster to be deleted. This parameter is not case
-- sensitive.
newDeleteReplicationGroup ::
  -- | 'replicationGroupId'
  Prelude.Text ->
  DeleteReplicationGroup
newDeleteReplicationGroup :: Text -> DeleteReplicationGroup
newDeleteReplicationGroup Text
pReplicationGroupId_ =
  DeleteReplicationGroup' :: Maybe Text -> Maybe Bool -> Text -> DeleteReplicationGroup
DeleteReplicationGroup'
    { $sel:finalSnapshotIdentifier:DeleteReplicationGroup' :: Maybe Text
finalSnapshotIdentifier =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:retainPrimaryCluster:DeleteReplicationGroup' :: Maybe Bool
retainPrimaryCluster = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroupId:DeleteReplicationGroup' :: Text
replicationGroupId = Text
pReplicationGroupId_
    }

-- | The name of a final node group (shard) snapshot. ElastiCache creates the
-- snapshot from the primary node in the cluster, rather than one of the
-- replicas; this is to ensure that it captures the freshest data. After
-- the final snapshot is taken, the replication group is immediately
-- deleted.
deleteReplicationGroup_finalSnapshotIdentifier :: Lens.Lens' DeleteReplicationGroup (Prelude.Maybe Prelude.Text)
deleteReplicationGroup_finalSnapshotIdentifier :: (Maybe Text -> f (Maybe Text))
-> DeleteReplicationGroup -> f DeleteReplicationGroup
deleteReplicationGroup_finalSnapshotIdentifier = (DeleteReplicationGroup -> Maybe Text)
-> (DeleteReplicationGroup -> Maybe Text -> DeleteReplicationGroup)
-> Lens
     DeleteReplicationGroup
     DeleteReplicationGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReplicationGroup' {Maybe Text
finalSnapshotIdentifier :: Maybe Text
$sel:finalSnapshotIdentifier:DeleteReplicationGroup' :: DeleteReplicationGroup -> Maybe Text
finalSnapshotIdentifier} -> Maybe Text
finalSnapshotIdentifier) (\s :: DeleteReplicationGroup
s@DeleteReplicationGroup' {} Maybe Text
a -> DeleteReplicationGroup
s {$sel:finalSnapshotIdentifier:DeleteReplicationGroup' :: Maybe Text
finalSnapshotIdentifier = Maybe Text
a} :: DeleteReplicationGroup)

-- | If set to @true@, all of the read replicas are deleted, but the primary
-- node is retained.
deleteReplicationGroup_retainPrimaryCluster :: Lens.Lens' DeleteReplicationGroup (Prelude.Maybe Prelude.Bool)
deleteReplicationGroup_retainPrimaryCluster :: (Maybe Bool -> f (Maybe Bool))
-> DeleteReplicationGroup -> f DeleteReplicationGroup
deleteReplicationGroup_retainPrimaryCluster = (DeleteReplicationGroup -> Maybe Bool)
-> (DeleteReplicationGroup -> Maybe Bool -> DeleteReplicationGroup)
-> Lens
     DeleteReplicationGroup
     DeleteReplicationGroup
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReplicationGroup' {Maybe Bool
retainPrimaryCluster :: Maybe Bool
$sel:retainPrimaryCluster:DeleteReplicationGroup' :: DeleteReplicationGroup -> Maybe Bool
retainPrimaryCluster} -> Maybe Bool
retainPrimaryCluster) (\s :: DeleteReplicationGroup
s@DeleteReplicationGroup' {} Maybe Bool
a -> DeleteReplicationGroup
s {$sel:retainPrimaryCluster:DeleteReplicationGroup' :: Maybe Bool
retainPrimaryCluster = Maybe Bool
a} :: DeleteReplicationGroup)

-- | The identifier for the cluster to be deleted. This parameter is not case
-- sensitive.
deleteReplicationGroup_replicationGroupId :: Lens.Lens' DeleteReplicationGroup Prelude.Text
deleteReplicationGroup_replicationGroupId :: (Text -> f Text)
-> DeleteReplicationGroup -> f DeleteReplicationGroup
deleteReplicationGroup_replicationGroupId = (DeleteReplicationGroup -> Text)
-> (DeleteReplicationGroup -> Text -> DeleteReplicationGroup)
-> Lens DeleteReplicationGroup DeleteReplicationGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReplicationGroup' {Text
replicationGroupId :: Text
$sel:replicationGroupId:DeleteReplicationGroup' :: DeleteReplicationGroup -> Text
replicationGroupId} -> Text
replicationGroupId) (\s :: DeleteReplicationGroup
s@DeleteReplicationGroup' {} Text
a -> DeleteReplicationGroup
s {$sel:replicationGroupId:DeleteReplicationGroup' :: Text
replicationGroupId = Text
a} :: DeleteReplicationGroup)

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

instance Prelude.NFData DeleteReplicationGroup

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

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

instance Core.ToQuery DeleteReplicationGroup where
  toQuery :: DeleteReplicationGroup -> QueryString
toQuery DeleteReplicationGroup' {Maybe Bool
Maybe Text
Text
replicationGroupId :: Text
retainPrimaryCluster :: Maybe Bool
finalSnapshotIdentifier :: Maybe Text
$sel:replicationGroupId:DeleteReplicationGroup' :: DeleteReplicationGroup -> Text
$sel:retainPrimaryCluster:DeleteReplicationGroup' :: DeleteReplicationGroup -> Maybe Bool
$sel:finalSnapshotIdentifier:DeleteReplicationGroup' :: DeleteReplicationGroup -> 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
"DeleteReplicationGroup" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"FinalSnapshotIdentifier"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
finalSnapshotIdentifier,
        ByteString
"RetainPrimaryCluster" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
retainPrimaryCluster,
        ByteString
"ReplicationGroupId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
replicationGroupId
      ]

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

-- |
-- Create a value of 'DeleteReplicationGroupResponse' 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:
--
-- 'replicationGroup', 'deleteReplicationGroupResponse_replicationGroup' - Undocumented member.
--
-- 'httpStatus', 'deleteReplicationGroupResponse_httpStatus' - The response's http status code.
newDeleteReplicationGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteReplicationGroupResponse
newDeleteReplicationGroupResponse :: Int -> DeleteReplicationGroupResponse
newDeleteReplicationGroupResponse Int
pHttpStatus_ =
  DeleteReplicationGroupResponse' :: Maybe ReplicationGroup -> Int -> DeleteReplicationGroupResponse
DeleteReplicationGroupResponse'
    { $sel:replicationGroup:DeleteReplicationGroupResponse' :: Maybe ReplicationGroup
replicationGroup =
        Maybe ReplicationGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteReplicationGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
deleteReplicationGroupResponse_replicationGroup :: Lens.Lens' DeleteReplicationGroupResponse (Prelude.Maybe ReplicationGroup)
deleteReplicationGroupResponse_replicationGroup :: (Maybe ReplicationGroup -> f (Maybe ReplicationGroup))
-> DeleteReplicationGroupResponse
-> f DeleteReplicationGroupResponse
deleteReplicationGroupResponse_replicationGroup = (DeleteReplicationGroupResponse -> Maybe ReplicationGroup)
-> (DeleteReplicationGroupResponse
    -> Maybe ReplicationGroup -> DeleteReplicationGroupResponse)
-> Lens
     DeleteReplicationGroupResponse
     DeleteReplicationGroupResponse
     (Maybe ReplicationGroup)
     (Maybe ReplicationGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReplicationGroupResponse' {Maybe ReplicationGroup
replicationGroup :: Maybe ReplicationGroup
$sel:replicationGroup:DeleteReplicationGroupResponse' :: DeleteReplicationGroupResponse -> Maybe ReplicationGroup
replicationGroup} -> Maybe ReplicationGroup
replicationGroup) (\s :: DeleteReplicationGroupResponse
s@DeleteReplicationGroupResponse' {} Maybe ReplicationGroup
a -> DeleteReplicationGroupResponse
s {$sel:replicationGroup:DeleteReplicationGroupResponse' :: Maybe ReplicationGroup
replicationGroup = Maybe ReplicationGroup
a} :: DeleteReplicationGroupResponse)

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

instance
  Prelude.NFData
    DeleteReplicationGroupResponse