{-# 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.Redshift.DeleteCluster
-- 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 a previously provisioned cluster without its final snapshot
-- being created. A successful response from the web service indicates that
-- the request was received correctly. Use DescribeClusters to monitor the
-- status of the deletion. The delete operation cannot be canceled or
-- reverted once submitted. For more information about managing clusters,
-- go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html Amazon Redshift Clusters>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- If you want to shut down the cluster and retain it for future use, set
-- /SkipFinalClusterSnapshot/ to @false@ and specify a name for
-- /FinalClusterSnapshotIdentifier/. You can later restore this snapshot to
-- resume using the cluster. If a final cluster snapshot is requested, the
-- status of the cluster will be \"final-snapshot\" while the snapshot is
-- being taken, then it\'s \"deleting\" once Amazon Redshift begins
-- deleting the cluster.
--
-- For more information about managing clusters, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html Amazon Redshift Clusters>
-- in the /Amazon Redshift Cluster Management Guide/.
module Amazonka.Redshift.DeleteCluster
  ( -- * Creating a Request
    DeleteCluster (..),
    newDeleteCluster,

    -- * Request Lenses
    deleteCluster_skipFinalClusterSnapshot,
    deleteCluster_finalClusterSnapshotRetentionPeriod,
    deleteCluster_finalClusterSnapshotIdentifier,
    deleteCluster_clusterIdentifier,

    -- * Destructuring the Response
    DeleteClusterResponse (..),
    newDeleteClusterResponse,

    -- * Response Lenses
    deleteClusterResponse_cluster,
    deleteClusterResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- |
--
-- /See:/ 'newDeleteCluster' smart constructor.
data DeleteCluster = DeleteCluster'
  { -- | Determines whether a final snapshot of the cluster is created before
    -- Amazon Redshift deletes the cluster. If @true@, a final cluster snapshot
    -- is not created. If @false@, a final cluster snapshot is created before
    -- the cluster is deleted.
    --
    -- The /FinalClusterSnapshotIdentifier/ parameter must be specified if
    -- /SkipFinalClusterSnapshot/ is @false@.
    --
    -- Default: @false@
    DeleteCluster -> Maybe Bool
skipFinalClusterSnapshot :: Prelude.Maybe Prelude.Bool,
    -- | The number of days that a manual snapshot is retained. If the value is
    -- -1, the manual snapshot is retained indefinitely.
    --
    -- The value must be either -1 or an integer between 1 and 3,653.
    --
    -- The default value is -1.
    DeleteCluster -> Maybe Int
finalClusterSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | The identifier of the final snapshot that is to be created immediately
    -- before deleting the cluster. If this parameter is provided,
    -- /SkipFinalClusterSnapshot/ must be @false@.
    --
    -- Constraints:
    --
    -- -   Must be 1 to 255 alphanumeric characters.
    --
    -- -   First character must be a letter.
    --
    -- -   Cannot end with a hyphen or contain two consecutive hyphens.
    DeleteCluster -> Maybe Text
finalClusterSnapshotIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the cluster to be deleted.
    --
    -- Constraints:
    --
    -- -   Must contain lowercase characters.
    --
    -- -   Must contain from 1 to 63 alphanumeric characters or hyphens.
    --
    -- -   First character must be a letter.
    --
    -- -   Cannot end with a hyphen or contain two consecutive hyphens.
    DeleteCluster -> Text
clusterIdentifier :: Prelude.Text
  }
  deriving (DeleteCluster -> DeleteCluster -> Bool
(DeleteCluster -> DeleteCluster -> Bool)
-> (DeleteCluster -> DeleteCluster -> Bool) -> Eq DeleteCluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCluster -> DeleteCluster -> Bool
$c/= :: DeleteCluster -> DeleteCluster -> Bool
== :: DeleteCluster -> DeleteCluster -> Bool
$c== :: DeleteCluster -> DeleteCluster -> Bool
Prelude.Eq, ReadPrec [DeleteCluster]
ReadPrec DeleteCluster
Int -> ReadS DeleteCluster
ReadS [DeleteCluster]
(Int -> ReadS DeleteCluster)
-> ReadS [DeleteCluster]
-> ReadPrec DeleteCluster
-> ReadPrec [DeleteCluster]
-> Read DeleteCluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCluster]
$creadListPrec :: ReadPrec [DeleteCluster]
readPrec :: ReadPrec DeleteCluster
$creadPrec :: ReadPrec DeleteCluster
readList :: ReadS [DeleteCluster]
$creadList :: ReadS [DeleteCluster]
readsPrec :: Int -> ReadS DeleteCluster
$creadsPrec :: Int -> ReadS DeleteCluster
Prelude.Read, Int -> DeleteCluster -> ShowS
[DeleteCluster] -> ShowS
DeleteCluster -> String
(Int -> DeleteCluster -> ShowS)
-> (DeleteCluster -> String)
-> ([DeleteCluster] -> ShowS)
-> Show DeleteCluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCluster] -> ShowS
$cshowList :: [DeleteCluster] -> ShowS
show :: DeleteCluster -> String
$cshow :: DeleteCluster -> String
showsPrec :: Int -> DeleteCluster -> ShowS
$cshowsPrec :: Int -> DeleteCluster -> ShowS
Prelude.Show, (forall x. DeleteCluster -> Rep DeleteCluster x)
-> (forall x. Rep DeleteCluster x -> DeleteCluster)
-> Generic DeleteCluster
forall x. Rep DeleteCluster x -> DeleteCluster
forall x. DeleteCluster -> Rep DeleteCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteCluster x -> DeleteCluster
$cfrom :: forall x. DeleteCluster -> Rep DeleteCluster x
Prelude.Generic)

-- |
-- Create a value of 'DeleteCluster' 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:
--
-- 'skipFinalClusterSnapshot', 'deleteCluster_skipFinalClusterSnapshot' - Determines whether a final snapshot of the cluster is created before
-- Amazon Redshift deletes the cluster. If @true@, a final cluster snapshot
-- is not created. If @false@, a final cluster snapshot is created before
-- the cluster is deleted.
--
-- The /FinalClusterSnapshotIdentifier/ parameter must be specified if
-- /SkipFinalClusterSnapshot/ is @false@.
--
-- Default: @false@
--
-- 'finalClusterSnapshotRetentionPeriod', 'deleteCluster_finalClusterSnapshotRetentionPeriod' - The number of days that a manual snapshot is retained. If the value is
-- -1, the manual snapshot is retained indefinitely.
--
-- The value must be either -1 or an integer between 1 and 3,653.
--
-- The default value is -1.
--
-- 'finalClusterSnapshotIdentifier', 'deleteCluster_finalClusterSnapshotIdentifier' - The identifier of the final snapshot that is to be created immediately
-- before deleting the cluster. If this parameter is provided,
-- /SkipFinalClusterSnapshot/ must be @false@.
--
-- Constraints:
--
-- -   Must be 1 to 255 alphanumeric characters.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
--
-- 'clusterIdentifier', 'deleteCluster_clusterIdentifier' - The identifier of the cluster to be deleted.
--
-- Constraints:
--
-- -   Must contain lowercase characters.
--
-- -   Must contain from 1 to 63 alphanumeric characters or hyphens.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
newDeleteCluster ::
  -- | 'clusterIdentifier'
  Prelude.Text ->
  DeleteCluster
newDeleteCluster :: Text -> DeleteCluster
newDeleteCluster Text
pClusterIdentifier_ =
  DeleteCluster' :: Maybe Bool -> Maybe Int -> Maybe Text -> Text -> DeleteCluster
DeleteCluster'
    { $sel:skipFinalClusterSnapshot:DeleteCluster' :: Maybe Bool
skipFinalClusterSnapshot =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:finalClusterSnapshotRetentionPeriod:DeleteCluster' :: Maybe Int
finalClusterSnapshotRetentionPeriod =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:finalClusterSnapshotIdentifier:DeleteCluster' :: Maybe Text
finalClusterSnapshotIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterIdentifier:DeleteCluster' :: Text
clusterIdentifier = Text
pClusterIdentifier_
    }

-- | Determines whether a final snapshot of the cluster is created before
-- Amazon Redshift deletes the cluster. If @true@, a final cluster snapshot
-- is not created. If @false@, a final cluster snapshot is created before
-- the cluster is deleted.
--
-- The /FinalClusterSnapshotIdentifier/ parameter must be specified if
-- /SkipFinalClusterSnapshot/ is @false@.
--
-- Default: @false@
deleteCluster_skipFinalClusterSnapshot :: Lens.Lens' DeleteCluster (Prelude.Maybe Prelude.Bool)
deleteCluster_skipFinalClusterSnapshot :: (Maybe Bool -> f (Maybe Bool)) -> DeleteCluster -> f DeleteCluster
deleteCluster_skipFinalClusterSnapshot = (DeleteCluster -> Maybe Bool)
-> (DeleteCluster -> Maybe Bool -> DeleteCluster)
-> Lens DeleteCluster DeleteCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCluster' {Maybe Bool
skipFinalClusterSnapshot :: Maybe Bool
$sel:skipFinalClusterSnapshot:DeleteCluster' :: DeleteCluster -> Maybe Bool
skipFinalClusterSnapshot} -> Maybe Bool
skipFinalClusterSnapshot) (\s :: DeleteCluster
s@DeleteCluster' {} Maybe Bool
a -> DeleteCluster
s {$sel:skipFinalClusterSnapshot:DeleteCluster' :: Maybe Bool
skipFinalClusterSnapshot = Maybe Bool
a} :: DeleteCluster)

-- | The number of days that a manual snapshot is retained. If the value is
-- -1, the manual snapshot is retained indefinitely.
--
-- The value must be either -1 or an integer between 1 and 3,653.
--
-- The default value is -1.
deleteCluster_finalClusterSnapshotRetentionPeriod :: Lens.Lens' DeleteCluster (Prelude.Maybe Prelude.Int)
deleteCluster_finalClusterSnapshotRetentionPeriod :: (Maybe Int -> f (Maybe Int)) -> DeleteCluster -> f DeleteCluster
deleteCluster_finalClusterSnapshotRetentionPeriod = (DeleteCluster -> Maybe Int)
-> (DeleteCluster -> Maybe Int -> DeleteCluster)
-> Lens DeleteCluster DeleteCluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCluster' {Maybe Int
finalClusterSnapshotRetentionPeriod :: Maybe Int
$sel:finalClusterSnapshotRetentionPeriod:DeleteCluster' :: DeleteCluster -> Maybe Int
finalClusterSnapshotRetentionPeriod} -> Maybe Int
finalClusterSnapshotRetentionPeriod) (\s :: DeleteCluster
s@DeleteCluster' {} Maybe Int
a -> DeleteCluster
s {$sel:finalClusterSnapshotRetentionPeriod:DeleteCluster' :: Maybe Int
finalClusterSnapshotRetentionPeriod = Maybe Int
a} :: DeleteCluster)

-- | The identifier of the final snapshot that is to be created immediately
-- before deleting the cluster. If this parameter is provided,
-- /SkipFinalClusterSnapshot/ must be @false@.
--
-- Constraints:
--
-- -   Must be 1 to 255 alphanumeric characters.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
deleteCluster_finalClusterSnapshotIdentifier :: Lens.Lens' DeleteCluster (Prelude.Maybe Prelude.Text)
deleteCluster_finalClusterSnapshotIdentifier :: (Maybe Text -> f (Maybe Text)) -> DeleteCluster -> f DeleteCluster
deleteCluster_finalClusterSnapshotIdentifier = (DeleteCluster -> Maybe Text)
-> (DeleteCluster -> Maybe Text -> DeleteCluster)
-> Lens DeleteCluster DeleteCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCluster' {Maybe Text
finalClusterSnapshotIdentifier :: Maybe Text
$sel:finalClusterSnapshotIdentifier:DeleteCluster' :: DeleteCluster -> Maybe Text
finalClusterSnapshotIdentifier} -> Maybe Text
finalClusterSnapshotIdentifier) (\s :: DeleteCluster
s@DeleteCluster' {} Maybe Text
a -> DeleteCluster
s {$sel:finalClusterSnapshotIdentifier:DeleteCluster' :: Maybe Text
finalClusterSnapshotIdentifier = Maybe Text
a} :: DeleteCluster)

-- | The identifier of the cluster to be deleted.
--
-- Constraints:
--
-- -   Must contain lowercase characters.
--
-- -   Must contain from 1 to 63 alphanumeric characters or hyphens.
--
-- -   First character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
deleteCluster_clusterIdentifier :: Lens.Lens' DeleteCluster Prelude.Text
deleteCluster_clusterIdentifier :: (Text -> f Text) -> DeleteCluster -> f DeleteCluster
deleteCluster_clusterIdentifier = (DeleteCluster -> Text)
-> (DeleteCluster -> Text -> DeleteCluster)
-> Lens DeleteCluster DeleteCluster Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCluster' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:DeleteCluster' :: DeleteCluster -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: DeleteCluster
s@DeleteCluster' {} Text
a -> DeleteCluster
s {$sel:clusterIdentifier:DeleteCluster' :: Text
clusterIdentifier = Text
a} :: DeleteCluster)

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

instance Prelude.NFData DeleteCluster

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

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

instance Core.ToQuery DeleteCluster where
  toQuery :: DeleteCluster -> QueryString
toQuery DeleteCluster' {Maybe Bool
Maybe Int
Maybe Text
Text
clusterIdentifier :: Text
finalClusterSnapshotIdentifier :: Maybe Text
finalClusterSnapshotRetentionPeriod :: Maybe Int
skipFinalClusterSnapshot :: Maybe Bool
$sel:clusterIdentifier:DeleteCluster' :: DeleteCluster -> Text
$sel:finalClusterSnapshotIdentifier:DeleteCluster' :: DeleteCluster -> Maybe Text
$sel:finalClusterSnapshotRetentionPeriod:DeleteCluster' :: DeleteCluster -> Maybe Int
$sel:skipFinalClusterSnapshot:DeleteCluster' :: DeleteCluster -> Maybe Bool
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteCluster" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"SkipFinalClusterSnapshot"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
skipFinalClusterSnapshot,
        ByteString
"FinalClusterSnapshotRetentionPeriod"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
finalClusterSnapshotRetentionPeriod,
        ByteString
"FinalClusterSnapshotIdentifier"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
finalClusterSnapshotIdentifier,
        ByteString
"ClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterIdentifier
      ]

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

-- |
-- Create a value of 'DeleteClusterResponse' 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:
--
-- 'cluster', 'deleteClusterResponse_cluster' - Undocumented member.
--
-- 'httpStatus', 'deleteClusterResponse_httpStatus' - The response's http status code.
newDeleteClusterResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteClusterResponse
newDeleteClusterResponse :: Int -> DeleteClusterResponse
newDeleteClusterResponse Int
pHttpStatus_ =
  DeleteClusterResponse' :: Maybe Cluster -> Int -> DeleteClusterResponse
DeleteClusterResponse'
    { $sel:cluster:DeleteClusterResponse' :: Maybe Cluster
cluster = Maybe Cluster
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteClusterResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
deleteClusterResponse_cluster :: Lens.Lens' DeleteClusterResponse (Prelude.Maybe Cluster)
deleteClusterResponse_cluster :: (Maybe Cluster -> f (Maybe Cluster))
-> DeleteClusterResponse -> f DeleteClusterResponse
deleteClusterResponse_cluster = (DeleteClusterResponse -> Maybe Cluster)
-> (DeleteClusterResponse
    -> Maybe Cluster -> DeleteClusterResponse)
-> Lens
     DeleteClusterResponse
     DeleteClusterResponse
     (Maybe Cluster)
     (Maybe Cluster)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteClusterResponse' {Maybe Cluster
cluster :: Maybe Cluster
$sel:cluster:DeleteClusterResponse' :: DeleteClusterResponse -> Maybe Cluster
cluster} -> Maybe Cluster
cluster) (\s :: DeleteClusterResponse
s@DeleteClusterResponse' {} Maybe Cluster
a -> DeleteClusterResponse
s {$sel:cluster:DeleteClusterResponse' :: Maybe Cluster
cluster = Maybe Cluster
a} :: DeleteClusterResponse)

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

instance Prelude.NFData DeleteClusterResponse