{-# 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.Neptune.DeleteDBClusterEndpoint
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes a custom endpoint and removes it from an Amazon Neptune DB
-- cluster.
module Amazonka.Neptune.DeleteDBClusterEndpoint
  ( -- * Creating a Request
    DeleteDBClusterEndpoint (..),
    newDeleteDBClusterEndpoint,

    -- * Request Lenses
    deleteDBClusterEndpoint_dbClusterEndpointIdentifier,

    -- * Destructuring the Response
    DeleteDBClusterEndpointResponse (..),
    newDeleteDBClusterEndpointResponse,

    -- * Response Lenses
    deleteDBClusterEndpointResponse_customEndpointType,
    deleteDBClusterEndpointResponse_dbClusterEndpointArn,
    deleteDBClusterEndpointResponse_dbClusterEndpointIdentifier,
    deleteDBClusterEndpointResponse_dbClusterEndpointResourceIdentifier,
    deleteDBClusterEndpointResponse_dbClusterIdentifier,
    deleteDBClusterEndpointResponse_endpoint,
    deleteDBClusterEndpointResponse_endpointType,
    deleteDBClusterEndpointResponse_excludedMembers,
    deleteDBClusterEndpointResponse_staticMembers,
    deleteDBClusterEndpointResponse_status,
    deleteDBClusterEndpointResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDeleteDBClusterEndpoint' smart constructor.
data DeleteDBClusterEndpoint = DeleteDBClusterEndpoint'
  { -- | The identifier associated with the custom endpoint. This parameter is
    -- stored as a lowercase string.
    DeleteDBClusterEndpoint -> Text
dbClusterEndpointIdentifier :: Prelude.Text
  }
  deriving (DeleteDBClusterEndpoint -> DeleteDBClusterEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDBClusterEndpoint -> DeleteDBClusterEndpoint -> Bool
$c/= :: DeleteDBClusterEndpoint -> DeleteDBClusterEndpoint -> Bool
== :: DeleteDBClusterEndpoint -> DeleteDBClusterEndpoint -> Bool
$c== :: DeleteDBClusterEndpoint -> DeleteDBClusterEndpoint -> Bool
Prelude.Eq, ReadPrec [DeleteDBClusterEndpoint]
ReadPrec DeleteDBClusterEndpoint
Int -> ReadS DeleteDBClusterEndpoint
ReadS [DeleteDBClusterEndpoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDBClusterEndpoint]
$creadListPrec :: ReadPrec [DeleteDBClusterEndpoint]
readPrec :: ReadPrec DeleteDBClusterEndpoint
$creadPrec :: ReadPrec DeleteDBClusterEndpoint
readList :: ReadS [DeleteDBClusterEndpoint]
$creadList :: ReadS [DeleteDBClusterEndpoint]
readsPrec :: Int -> ReadS DeleteDBClusterEndpoint
$creadsPrec :: Int -> ReadS DeleteDBClusterEndpoint
Prelude.Read, Int -> DeleteDBClusterEndpoint -> ShowS
[DeleteDBClusterEndpoint] -> ShowS
DeleteDBClusterEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDBClusterEndpoint] -> ShowS
$cshowList :: [DeleteDBClusterEndpoint] -> ShowS
show :: DeleteDBClusterEndpoint -> String
$cshow :: DeleteDBClusterEndpoint -> String
showsPrec :: Int -> DeleteDBClusterEndpoint -> ShowS
$cshowsPrec :: Int -> DeleteDBClusterEndpoint -> ShowS
Prelude.Show, forall x. Rep DeleteDBClusterEndpoint x -> DeleteDBClusterEndpoint
forall x. DeleteDBClusterEndpoint -> Rep DeleteDBClusterEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteDBClusterEndpoint x -> DeleteDBClusterEndpoint
$cfrom :: forall x. DeleteDBClusterEndpoint -> Rep DeleteDBClusterEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'DeleteDBClusterEndpoint' 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:
--
-- 'dbClusterEndpointIdentifier', 'deleteDBClusterEndpoint_dbClusterEndpointIdentifier' - The identifier associated with the custom endpoint. This parameter is
-- stored as a lowercase string.
newDeleteDBClusterEndpoint ::
  -- | 'dbClusterEndpointIdentifier'
  Prelude.Text ->
  DeleteDBClusterEndpoint
newDeleteDBClusterEndpoint :: Text -> DeleteDBClusterEndpoint
newDeleteDBClusterEndpoint
  Text
pDBClusterEndpointIdentifier_ =
    DeleteDBClusterEndpoint'
      { $sel:dbClusterEndpointIdentifier:DeleteDBClusterEndpoint' :: Text
dbClusterEndpointIdentifier =
          Text
pDBClusterEndpointIdentifier_
      }

-- | The identifier associated with the custom endpoint. This parameter is
-- stored as a lowercase string.
deleteDBClusterEndpoint_dbClusterEndpointIdentifier :: Lens.Lens' DeleteDBClusterEndpoint Prelude.Text
deleteDBClusterEndpoint_dbClusterEndpointIdentifier :: Lens' DeleteDBClusterEndpoint Text
deleteDBClusterEndpoint_dbClusterEndpointIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpoint' {Text
dbClusterEndpointIdentifier :: Text
$sel:dbClusterEndpointIdentifier:DeleteDBClusterEndpoint' :: DeleteDBClusterEndpoint -> Text
dbClusterEndpointIdentifier} -> Text
dbClusterEndpointIdentifier) (\s :: DeleteDBClusterEndpoint
s@DeleteDBClusterEndpoint' {} Text
a -> DeleteDBClusterEndpoint
s {$sel:dbClusterEndpointIdentifier:DeleteDBClusterEndpoint' :: Text
dbClusterEndpointIdentifier = Text
a} :: DeleteDBClusterEndpoint)

instance Core.AWSRequest DeleteDBClusterEndpoint where
  type
    AWSResponse DeleteDBClusterEndpoint =
      DeleteDBClusterEndpointResponse
  request :: (Service -> Service)
-> DeleteDBClusterEndpoint -> Request DeleteDBClusterEndpoint
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 DeleteDBClusterEndpoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteDBClusterEndpoint)))
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
"DeleteDBClusterEndpointResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Int
-> DeleteDBClusterEndpointResponse
DeleteDBClusterEndpointResponse'
            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
"CustomEndpointType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBClusterEndpointArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBClusterEndpointIdentifier")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBClusterEndpointResourceIdentifier")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBClusterIdentifier")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Endpoint")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"EndpointType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ExcludedMembers"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"StaticMembers"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Status")
            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 DeleteDBClusterEndpoint where
  hashWithSalt :: Int -> DeleteDBClusterEndpoint -> Int
hashWithSalt Int
_salt DeleteDBClusterEndpoint' {Text
dbClusterEndpointIdentifier :: Text
$sel:dbClusterEndpointIdentifier:DeleteDBClusterEndpoint' :: DeleteDBClusterEndpoint -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbClusterEndpointIdentifier

instance Prelude.NFData DeleteDBClusterEndpoint where
  rnf :: DeleteDBClusterEndpoint -> ()
rnf DeleteDBClusterEndpoint' {Text
dbClusterEndpointIdentifier :: Text
$sel:dbClusterEndpointIdentifier:DeleteDBClusterEndpoint' :: DeleteDBClusterEndpoint -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
dbClusterEndpointIdentifier

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

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

instance Data.ToQuery DeleteDBClusterEndpoint where
  toQuery :: DeleteDBClusterEndpoint -> QueryString
toQuery DeleteDBClusterEndpoint' {Text
dbClusterEndpointIdentifier :: Text
$sel:dbClusterEndpointIdentifier:DeleteDBClusterEndpoint' :: DeleteDBClusterEndpoint -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DeleteDBClusterEndpoint" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"DBClusterEndpointIdentifier"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbClusterEndpointIdentifier
      ]

-- | This data type represents the information you need to connect to an
-- Amazon Neptune DB cluster. This data type is used as a response element
-- in the following actions:
--
-- -   @CreateDBClusterEndpoint@
--
-- -   @DescribeDBClusterEndpoints@
--
-- -   @ModifyDBClusterEndpoint@
--
-- -   @DeleteDBClusterEndpoint@
--
-- For the data structure that represents Amazon RDS DB instance endpoints,
-- see @Endpoint@.
--
-- /See:/ 'newDeleteDBClusterEndpointResponse' smart constructor.
data DeleteDBClusterEndpointResponse = DeleteDBClusterEndpointResponse'
  { -- | The type associated with a custom endpoint. One of: @READER@, @WRITER@,
    -- @ANY@.
    DeleteDBClusterEndpointResponse -> Maybe Text
customEndpointType :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the endpoint.
    DeleteDBClusterEndpointResponse -> Maybe Text
dbClusterEndpointArn :: Prelude.Maybe Prelude.Text,
    -- | The identifier associated with the endpoint. This parameter is stored as
    -- a lowercase string.
    DeleteDBClusterEndpointResponse -> Maybe Text
dbClusterEndpointIdentifier :: Prelude.Maybe Prelude.Text,
    -- | A unique system-generated identifier for an endpoint. It remains the
    -- same for the whole life of the endpoint.
    DeleteDBClusterEndpointResponse -> Maybe Text
dbClusterEndpointResourceIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The DB cluster identifier of the DB cluster associated with the
    -- endpoint. This parameter is stored as a lowercase string.
    DeleteDBClusterEndpointResponse -> Maybe Text
dbClusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The DNS address of the endpoint.
    DeleteDBClusterEndpointResponse -> Maybe Text
endpoint :: Prelude.Maybe Prelude.Text,
    -- | The type of the endpoint. One of: @READER@, @WRITER@, @CUSTOM@.
    DeleteDBClusterEndpointResponse -> Maybe Text
endpointType :: Prelude.Maybe Prelude.Text,
    -- | List of DB instance identifiers that aren\'t part of the custom endpoint
    -- group. All other eligible instances are reachable through the custom
    -- endpoint. Only relevant if the list of static members is empty.
    DeleteDBClusterEndpointResponse -> Maybe [Text]
excludedMembers :: Prelude.Maybe [Prelude.Text],
    -- | List of DB instance identifiers that are part of the custom endpoint
    -- group.
    DeleteDBClusterEndpointResponse -> Maybe [Text]
staticMembers :: Prelude.Maybe [Prelude.Text],
    -- | The current status of the endpoint. One of: @creating@, @available@,
    -- @deleting@, @inactive@, @modifying@. The @inactive@ state applies to an
    -- endpoint that cannot be used for a certain kind of cluster, such as a
    -- @writer@ endpoint for a read-only secondary cluster in a global
    -- database.
    DeleteDBClusterEndpointResponse -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DeleteDBClusterEndpointResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteDBClusterEndpointResponse
-> DeleteDBClusterEndpointResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteDBClusterEndpointResponse
-> DeleteDBClusterEndpointResponse -> Bool
$c/= :: DeleteDBClusterEndpointResponse
-> DeleteDBClusterEndpointResponse -> Bool
== :: DeleteDBClusterEndpointResponse
-> DeleteDBClusterEndpointResponse -> Bool
$c== :: DeleteDBClusterEndpointResponse
-> DeleteDBClusterEndpointResponse -> Bool
Prelude.Eq, ReadPrec [DeleteDBClusterEndpointResponse]
ReadPrec DeleteDBClusterEndpointResponse
Int -> ReadS DeleteDBClusterEndpointResponse
ReadS [DeleteDBClusterEndpointResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteDBClusterEndpointResponse]
$creadListPrec :: ReadPrec [DeleteDBClusterEndpointResponse]
readPrec :: ReadPrec DeleteDBClusterEndpointResponse
$creadPrec :: ReadPrec DeleteDBClusterEndpointResponse
readList :: ReadS [DeleteDBClusterEndpointResponse]
$creadList :: ReadS [DeleteDBClusterEndpointResponse]
readsPrec :: Int -> ReadS DeleteDBClusterEndpointResponse
$creadsPrec :: Int -> ReadS DeleteDBClusterEndpointResponse
Prelude.Read, Int -> DeleteDBClusterEndpointResponse -> ShowS
[DeleteDBClusterEndpointResponse] -> ShowS
DeleteDBClusterEndpointResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteDBClusterEndpointResponse] -> ShowS
$cshowList :: [DeleteDBClusterEndpointResponse] -> ShowS
show :: DeleteDBClusterEndpointResponse -> String
$cshow :: DeleteDBClusterEndpointResponse -> String
showsPrec :: Int -> DeleteDBClusterEndpointResponse -> ShowS
$cshowsPrec :: Int -> DeleteDBClusterEndpointResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteDBClusterEndpointResponse x
-> DeleteDBClusterEndpointResponse
forall x.
DeleteDBClusterEndpointResponse
-> Rep DeleteDBClusterEndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteDBClusterEndpointResponse x
-> DeleteDBClusterEndpointResponse
$cfrom :: forall x.
DeleteDBClusterEndpointResponse
-> Rep DeleteDBClusterEndpointResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteDBClusterEndpointResponse' 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:
--
-- 'customEndpointType', 'deleteDBClusterEndpointResponse_customEndpointType' - The type associated with a custom endpoint. One of: @READER@, @WRITER@,
-- @ANY@.
--
-- 'dbClusterEndpointArn', 'deleteDBClusterEndpointResponse_dbClusterEndpointArn' - The Amazon Resource Name (ARN) for the endpoint.
--
-- 'dbClusterEndpointIdentifier', 'deleteDBClusterEndpointResponse_dbClusterEndpointIdentifier' - The identifier associated with the endpoint. This parameter is stored as
-- a lowercase string.
--
-- 'dbClusterEndpointResourceIdentifier', 'deleteDBClusterEndpointResponse_dbClusterEndpointResourceIdentifier' - A unique system-generated identifier for an endpoint. It remains the
-- same for the whole life of the endpoint.
--
-- 'dbClusterIdentifier', 'deleteDBClusterEndpointResponse_dbClusterIdentifier' - The DB cluster identifier of the DB cluster associated with the
-- endpoint. This parameter is stored as a lowercase string.
--
-- 'endpoint', 'deleteDBClusterEndpointResponse_endpoint' - The DNS address of the endpoint.
--
-- 'endpointType', 'deleteDBClusterEndpointResponse_endpointType' - The type of the endpoint. One of: @READER@, @WRITER@, @CUSTOM@.
--
-- 'excludedMembers', 'deleteDBClusterEndpointResponse_excludedMembers' - List of DB instance identifiers that aren\'t part of the custom endpoint
-- group. All other eligible instances are reachable through the custom
-- endpoint. Only relevant if the list of static members is empty.
--
-- 'staticMembers', 'deleteDBClusterEndpointResponse_staticMembers' - List of DB instance identifiers that are part of the custom endpoint
-- group.
--
-- 'status', 'deleteDBClusterEndpointResponse_status' - The current status of the endpoint. One of: @creating@, @available@,
-- @deleting@, @inactive@, @modifying@. The @inactive@ state applies to an
-- endpoint that cannot be used for a certain kind of cluster, such as a
-- @writer@ endpoint for a read-only secondary cluster in a global
-- database.
--
-- 'httpStatus', 'deleteDBClusterEndpointResponse_httpStatus' - The response's http status code.
newDeleteDBClusterEndpointResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteDBClusterEndpointResponse
newDeleteDBClusterEndpointResponse :: Int -> DeleteDBClusterEndpointResponse
newDeleteDBClusterEndpointResponse Int
pHttpStatus_ =
  DeleteDBClusterEndpointResponse'
    { $sel:customEndpointType:DeleteDBClusterEndpointResponse' :: Maybe Text
customEndpointType =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterEndpointArn:DeleteDBClusterEndpointResponse' :: Maybe Text
dbClusterEndpointArn = forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterEndpointIdentifier:DeleteDBClusterEndpointResponse' :: Maybe Text
dbClusterEndpointIdentifier =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterEndpointResourceIdentifier:DeleteDBClusterEndpointResponse' :: Maybe Text
dbClusterEndpointResourceIdentifier =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterIdentifier:DeleteDBClusterEndpointResponse' :: Maybe Text
dbClusterIdentifier = forall a. Maybe a
Prelude.Nothing,
      $sel:endpoint:DeleteDBClusterEndpointResponse' :: Maybe Text
endpoint = forall a. Maybe a
Prelude.Nothing,
      $sel:endpointType:DeleteDBClusterEndpointResponse' :: Maybe Text
endpointType = forall a. Maybe a
Prelude.Nothing,
      $sel:excludedMembers:DeleteDBClusterEndpointResponse' :: Maybe [Text]
excludedMembers = forall a. Maybe a
Prelude.Nothing,
      $sel:staticMembers:DeleteDBClusterEndpointResponse' :: Maybe [Text]
staticMembers = forall a. Maybe a
Prelude.Nothing,
      $sel:status:DeleteDBClusterEndpointResponse' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteDBClusterEndpointResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The type associated with a custom endpoint. One of: @READER@, @WRITER@,
-- @ANY@.
deleteDBClusterEndpointResponse_customEndpointType :: Lens.Lens' DeleteDBClusterEndpointResponse (Prelude.Maybe Prelude.Text)
deleteDBClusterEndpointResponse_customEndpointType :: Lens' DeleteDBClusterEndpointResponse (Maybe Text)
deleteDBClusterEndpointResponse_customEndpointType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpointResponse' {Maybe Text
customEndpointType :: Maybe Text
$sel:customEndpointType:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
customEndpointType} -> Maybe Text
customEndpointType) (\s :: DeleteDBClusterEndpointResponse
s@DeleteDBClusterEndpointResponse' {} Maybe Text
a -> DeleteDBClusterEndpointResponse
s {$sel:customEndpointType:DeleteDBClusterEndpointResponse' :: Maybe Text
customEndpointType = Maybe Text
a} :: DeleteDBClusterEndpointResponse)

-- | The Amazon Resource Name (ARN) for the endpoint.
deleteDBClusterEndpointResponse_dbClusterEndpointArn :: Lens.Lens' DeleteDBClusterEndpointResponse (Prelude.Maybe Prelude.Text)
deleteDBClusterEndpointResponse_dbClusterEndpointArn :: Lens' DeleteDBClusterEndpointResponse (Maybe Text)
deleteDBClusterEndpointResponse_dbClusterEndpointArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpointResponse' {Maybe Text
dbClusterEndpointArn :: Maybe Text
$sel:dbClusterEndpointArn:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
dbClusterEndpointArn} -> Maybe Text
dbClusterEndpointArn) (\s :: DeleteDBClusterEndpointResponse
s@DeleteDBClusterEndpointResponse' {} Maybe Text
a -> DeleteDBClusterEndpointResponse
s {$sel:dbClusterEndpointArn:DeleteDBClusterEndpointResponse' :: Maybe Text
dbClusterEndpointArn = Maybe Text
a} :: DeleteDBClusterEndpointResponse)

-- | The identifier associated with the endpoint. This parameter is stored as
-- a lowercase string.
deleteDBClusterEndpointResponse_dbClusterEndpointIdentifier :: Lens.Lens' DeleteDBClusterEndpointResponse (Prelude.Maybe Prelude.Text)
deleteDBClusterEndpointResponse_dbClusterEndpointIdentifier :: Lens' DeleteDBClusterEndpointResponse (Maybe Text)
deleteDBClusterEndpointResponse_dbClusterEndpointIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpointResponse' {Maybe Text
dbClusterEndpointIdentifier :: Maybe Text
$sel:dbClusterEndpointIdentifier:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
dbClusterEndpointIdentifier} -> Maybe Text
dbClusterEndpointIdentifier) (\s :: DeleteDBClusterEndpointResponse
s@DeleteDBClusterEndpointResponse' {} Maybe Text
a -> DeleteDBClusterEndpointResponse
s {$sel:dbClusterEndpointIdentifier:DeleteDBClusterEndpointResponse' :: Maybe Text
dbClusterEndpointIdentifier = Maybe Text
a} :: DeleteDBClusterEndpointResponse)

-- | A unique system-generated identifier for an endpoint. It remains the
-- same for the whole life of the endpoint.
deleteDBClusterEndpointResponse_dbClusterEndpointResourceIdentifier :: Lens.Lens' DeleteDBClusterEndpointResponse (Prelude.Maybe Prelude.Text)
deleteDBClusterEndpointResponse_dbClusterEndpointResourceIdentifier :: Lens' DeleteDBClusterEndpointResponse (Maybe Text)
deleteDBClusterEndpointResponse_dbClusterEndpointResourceIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpointResponse' {Maybe Text
dbClusterEndpointResourceIdentifier :: Maybe Text
$sel:dbClusterEndpointResourceIdentifier:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
dbClusterEndpointResourceIdentifier} -> Maybe Text
dbClusterEndpointResourceIdentifier) (\s :: DeleteDBClusterEndpointResponse
s@DeleteDBClusterEndpointResponse' {} Maybe Text
a -> DeleteDBClusterEndpointResponse
s {$sel:dbClusterEndpointResourceIdentifier:DeleteDBClusterEndpointResponse' :: Maybe Text
dbClusterEndpointResourceIdentifier = Maybe Text
a} :: DeleteDBClusterEndpointResponse)

-- | The DB cluster identifier of the DB cluster associated with the
-- endpoint. This parameter is stored as a lowercase string.
deleteDBClusterEndpointResponse_dbClusterIdentifier :: Lens.Lens' DeleteDBClusterEndpointResponse (Prelude.Maybe Prelude.Text)
deleteDBClusterEndpointResponse_dbClusterIdentifier :: Lens' DeleteDBClusterEndpointResponse (Maybe Text)
deleteDBClusterEndpointResponse_dbClusterIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpointResponse' {Maybe Text
dbClusterIdentifier :: Maybe Text
$sel:dbClusterIdentifier:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
dbClusterIdentifier} -> Maybe Text
dbClusterIdentifier) (\s :: DeleteDBClusterEndpointResponse
s@DeleteDBClusterEndpointResponse' {} Maybe Text
a -> DeleteDBClusterEndpointResponse
s {$sel:dbClusterIdentifier:DeleteDBClusterEndpointResponse' :: Maybe Text
dbClusterIdentifier = Maybe Text
a} :: DeleteDBClusterEndpointResponse)

-- | The DNS address of the endpoint.
deleteDBClusterEndpointResponse_endpoint :: Lens.Lens' DeleteDBClusterEndpointResponse (Prelude.Maybe Prelude.Text)
deleteDBClusterEndpointResponse_endpoint :: Lens' DeleteDBClusterEndpointResponse (Maybe Text)
deleteDBClusterEndpointResponse_endpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpointResponse' {Maybe Text
endpoint :: Maybe Text
$sel:endpoint:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
endpoint} -> Maybe Text
endpoint) (\s :: DeleteDBClusterEndpointResponse
s@DeleteDBClusterEndpointResponse' {} Maybe Text
a -> DeleteDBClusterEndpointResponse
s {$sel:endpoint:DeleteDBClusterEndpointResponse' :: Maybe Text
endpoint = Maybe Text
a} :: DeleteDBClusterEndpointResponse)

-- | The type of the endpoint. One of: @READER@, @WRITER@, @CUSTOM@.
deleteDBClusterEndpointResponse_endpointType :: Lens.Lens' DeleteDBClusterEndpointResponse (Prelude.Maybe Prelude.Text)
deleteDBClusterEndpointResponse_endpointType :: Lens' DeleteDBClusterEndpointResponse (Maybe Text)
deleteDBClusterEndpointResponse_endpointType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpointResponse' {Maybe Text
endpointType :: Maybe Text
$sel:endpointType:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
endpointType} -> Maybe Text
endpointType) (\s :: DeleteDBClusterEndpointResponse
s@DeleteDBClusterEndpointResponse' {} Maybe Text
a -> DeleteDBClusterEndpointResponse
s {$sel:endpointType:DeleteDBClusterEndpointResponse' :: Maybe Text
endpointType = Maybe Text
a} :: DeleteDBClusterEndpointResponse)

-- | List of DB instance identifiers that aren\'t part of the custom endpoint
-- group. All other eligible instances are reachable through the custom
-- endpoint. Only relevant if the list of static members is empty.
deleteDBClusterEndpointResponse_excludedMembers :: Lens.Lens' DeleteDBClusterEndpointResponse (Prelude.Maybe [Prelude.Text])
deleteDBClusterEndpointResponse_excludedMembers :: Lens' DeleteDBClusterEndpointResponse (Maybe [Text])
deleteDBClusterEndpointResponse_excludedMembers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpointResponse' {Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:excludedMembers:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe [Text]
excludedMembers} -> Maybe [Text]
excludedMembers) (\s :: DeleteDBClusterEndpointResponse
s@DeleteDBClusterEndpointResponse' {} Maybe [Text]
a -> DeleteDBClusterEndpointResponse
s {$sel:excludedMembers:DeleteDBClusterEndpointResponse' :: Maybe [Text]
excludedMembers = Maybe [Text]
a} :: DeleteDBClusterEndpointResponse) 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

-- | List of DB instance identifiers that are part of the custom endpoint
-- group.
deleteDBClusterEndpointResponse_staticMembers :: Lens.Lens' DeleteDBClusterEndpointResponse (Prelude.Maybe [Prelude.Text])
deleteDBClusterEndpointResponse_staticMembers :: Lens' DeleteDBClusterEndpointResponse (Maybe [Text])
deleteDBClusterEndpointResponse_staticMembers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpointResponse' {Maybe [Text]
staticMembers :: Maybe [Text]
$sel:staticMembers:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe [Text]
staticMembers} -> Maybe [Text]
staticMembers) (\s :: DeleteDBClusterEndpointResponse
s@DeleteDBClusterEndpointResponse' {} Maybe [Text]
a -> DeleteDBClusterEndpointResponse
s {$sel:staticMembers:DeleteDBClusterEndpointResponse' :: Maybe [Text]
staticMembers = Maybe [Text]
a} :: DeleteDBClusterEndpointResponse) 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

-- | The current status of the endpoint. One of: @creating@, @available@,
-- @deleting@, @inactive@, @modifying@. The @inactive@ state applies to an
-- endpoint that cannot be used for a certain kind of cluster, such as a
-- @writer@ endpoint for a read-only secondary cluster in a global
-- database.
deleteDBClusterEndpointResponse_status :: Lens.Lens' DeleteDBClusterEndpointResponse (Prelude.Maybe Prelude.Text)
deleteDBClusterEndpointResponse_status :: Lens' DeleteDBClusterEndpointResponse (Maybe Text)
deleteDBClusterEndpointResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteDBClusterEndpointResponse' {Maybe Text
status :: Maybe Text
$sel:status:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
status} -> Maybe Text
status) (\s :: DeleteDBClusterEndpointResponse
s@DeleteDBClusterEndpointResponse' {} Maybe Text
a -> DeleteDBClusterEndpointResponse
s {$sel:status:DeleteDBClusterEndpointResponse' :: Maybe Text
status = Maybe Text
a} :: DeleteDBClusterEndpointResponse)

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

instance
  Prelude.NFData
    DeleteDBClusterEndpointResponse
  where
  rnf :: DeleteDBClusterEndpointResponse -> ()
rnf DeleteDBClusterEndpointResponse' {Int
Maybe [Text]
Maybe Text
httpStatus :: Int
status :: Maybe Text
staticMembers :: Maybe [Text]
excludedMembers :: Maybe [Text]
endpointType :: Maybe Text
endpoint :: Maybe Text
dbClusterIdentifier :: Maybe Text
dbClusterEndpointResourceIdentifier :: Maybe Text
dbClusterEndpointIdentifier :: Maybe Text
dbClusterEndpointArn :: Maybe Text
customEndpointType :: Maybe Text
$sel:httpStatus:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Int
$sel:status:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
$sel:staticMembers:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe [Text]
$sel:excludedMembers:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe [Text]
$sel:endpointType:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
$sel:endpoint:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
$sel:dbClusterIdentifier:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
$sel:dbClusterEndpointResourceIdentifier:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
$sel:dbClusterEndpointIdentifier:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
$sel:dbClusterEndpointArn:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
$sel:customEndpointType:DeleteDBClusterEndpointResponse' :: DeleteDBClusterEndpointResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customEndpointType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbClusterEndpointArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbClusterEndpointIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbClusterEndpointResourceIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbClusterIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
endpoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
endpointType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
excludedMembers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
staticMembers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus