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

    -- * Request Lenses
    createDBClusterEndpoint_excludedMembers,
    createDBClusterEndpoint_staticMembers,
    createDBClusterEndpoint_tags,
    createDBClusterEndpoint_dbClusterIdentifier,
    createDBClusterEndpoint_dbClusterEndpointIdentifier,
    createDBClusterEndpoint_endpointType,

    -- * Destructuring the Response
    CreateDBClusterEndpointResponse (..),
    newCreateDBClusterEndpointResponse,

    -- * Response Lenses
    createDBClusterEndpointResponse_customEndpointType,
    createDBClusterEndpointResponse_dbClusterEndpointArn,
    createDBClusterEndpointResponse_dbClusterEndpointIdentifier,
    createDBClusterEndpointResponse_dbClusterEndpointResourceIdentifier,
    createDBClusterEndpointResponse_dbClusterIdentifier,
    createDBClusterEndpointResponse_endpoint,
    createDBClusterEndpointResponse_endpointType,
    createDBClusterEndpointResponse_excludedMembers,
    createDBClusterEndpointResponse_staticMembers,
    createDBClusterEndpointResponse_status,
    createDBClusterEndpointResponse_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:/ 'newCreateDBClusterEndpoint' smart constructor.
data CreateDBClusterEndpoint = CreateDBClusterEndpoint'
  { -- | 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.
    CreateDBClusterEndpoint -> Maybe [Text]
excludedMembers :: Prelude.Maybe [Prelude.Text],
    -- | List of DB instance identifiers that are part of the custom endpoint
    -- group.
    CreateDBClusterEndpoint -> Maybe [Text]
staticMembers :: Prelude.Maybe [Prelude.Text],
    -- | The tags to be assigned to the Amazon Neptune resource.
    CreateDBClusterEndpoint -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The DB cluster identifier of the DB cluster associated with the
    -- endpoint. This parameter is stored as a lowercase string.
    CreateDBClusterEndpoint -> Text
dbClusterIdentifier :: Prelude.Text,
    -- | The identifier to use for the new endpoint. This parameter is stored as
    -- a lowercase string.
    CreateDBClusterEndpoint -> Text
dbClusterEndpointIdentifier :: Prelude.Text,
    -- | The type of the endpoint. One of: @READER@, @WRITER@, @ANY@.
    CreateDBClusterEndpoint -> Text
endpointType :: Prelude.Text
  }
  deriving (CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
$c/= :: CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
== :: CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
$c== :: CreateDBClusterEndpoint -> CreateDBClusterEndpoint -> Bool
Prelude.Eq, ReadPrec [CreateDBClusterEndpoint]
ReadPrec CreateDBClusterEndpoint
Int -> ReadS CreateDBClusterEndpoint
ReadS [CreateDBClusterEndpoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBClusterEndpoint]
$creadListPrec :: ReadPrec [CreateDBClusterEndpoint]
readPrec :: ReadPrec CreateDBClusterEndpoint
$creadPrec :: ReadPrec CreateDBClusterEndpoint
readList :: ReadS [CreateDBClusterEndpoint]
$creadList :: ReadS [CreateDBClusterEndpoint]
readsPrec :: Int -> ReadS CreateDBClusterEndpoint
$creadsPrec :: Int -> ReadS CreateDBClusterEndpoint
Prelude.Read, Int -> CreateDBClusterEndpoint -> ShowS
[CreateDBClusterEndpoint] -> ShowS
CreateDBClusterEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBClusterEndpoint] -> ShowS
$cshowList :: [CreateDBClusterEndpoint] -> ShowS
show :: CreateDBClusterEndpoint -> String
$cshow :: CreateDBClusterEndpoint -> String
showsPrec :: Int -> CreateDBClusterEndpoint -> ShowS
$cshowsPrec :: Int -> CreateDBClusterEndpoint -> ShowS
Prelude.Show, forall x. Rep CreateDBClusterEndpoint x -> CreateDBClusterEndpoint
forall x. CreateDBClusterEndpoint -> Rep CreateDBClusterEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDBClusterEndpoint x -> CreateDBClusterEndpoint
$cfrom :: forall x. CreateDBClusterEndpoint -> Rep CreateDBClusterEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'CreateDBClusterEndpoint' 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:
--
-- 'excludedMembers', 'createDBClusterEndpoint_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', 'createDBClusterEndpoint_staticMembers' - List of DB instance identifiers that are part of the custom endpoint
-- group.
--
-- 'tags', 'createDBClusterEndpoint_tags' - The tags to be assigned to the Amazon Neptune resource.
--
-- 'dbClusterIdentifier', 'createDBClusterEndpoint_dbClusterIdentifier' - The DB cluster identifier of the DB cluster associated with the
-- endpoint. This parameter is stored as a lowercase string.
--
-- 'dbClusterEndpointIdentifier', 'createDBClusterEndpoint_dbClusterEndpointIdentifier' - The identifier to use for the new endpoint. This parameter is stored as
-- a lowercase string.
--
-- 'endpointType', 'createDBClusterEndpoint_endpointType' - The type of the endpoint. One of: @READER@, @WRITER@, @ANY@.
newCreateDBClusterEndpoint ::
  -- | 'dbClusterIdentifier'
  Prelude.Text ->
  -- | 'dbClusterEndpointIdentifier'
  Prelude.Text ->
  -- | 'endpointType'
  Prelude.Text ->
  CreateDBClusterEndpoint
newCreateDBClusterEndpoint :: Text -> Text -> Text -> CreateDBClusterEndpoint
newCreateDBClusterEndpoint
  Text
pDBClusterIdentifier_
  Text
pDBClusterEndpointIdentifier_
  Text
pEndpointType_ =
    CreateDBClusterEndpoint'
      { $sel:excludedMembers:CreateDBClusterEndpoint' :: Maybe [Text]
excludedMembers =
          forall a. Maybe a
Prelude.Nothing,
        $sel:staticMembers:CreateDBClusterEndpoint' :: Maybe [Text]
staticMembers = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateDBClusterEndpoint' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: Text
dbClusterIdentifier = Text
pDBClusterIdentifier_,
        $sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: Text
dbClusterEndpointIdentifier =
          Text
pDBClusterEndpointIdentifier_,
        $sel:endpointType:CreateDBClusterEndpoint' :: Text
endpointType = Text
pEndpointType_
      }

-- | 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.
createDBClusterEndpoint_excludedMembers :: Lens.Lens' CreateDBClusterEndpoint (Prelude.Maybe [Prelude.Text])
createDBClusterEndpoint_excludedMembers :: Lens' CreateDBClusterEndpoint (Maybe [Text])
createDBClusterEndpoint_excludedMembers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:excludedMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
excludedMembers} -> Maybe [Text]
excludedMembers) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Maybe [Text]
a -> CreateDBClusterEndpoint
s {$sel:excludedMembers:CreateDBClusterEndpoint' :: Maybe [Text]
excludedMembers = Maybe [Text]
a} :: CreateDBClusterEndpoint) 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.
createDBClusterEndpoint_staticMembers :: Lens.Lens' CreateDBClusterEndpoint (Prelude.Maybe [Prelude.Text])
createDBClusterEndpoint_staticMembers :: Lens' CreateDBClusterEndpoint (Maybe [Text])
createDBClusterEndpoint_staticMembers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Maybe [Text]
staticMembers :: Maybe [Text]
$sel:staticMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
staticMembers} -> Maybe [Text]
staticMembers) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Maybe [Text]
a -> CreateDBClusterEndpoint
s {$sel:staticMembers:CreateDBClusterEndpoint' :: Maybe [Text]
staticMembers = Maybe [Text]
a} :: CreateDBClusterEndpoint) 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 tags to be assigned to the Amazon Neptune resource.
createDBClusterEndpoint_tags :: Lens.Lens' CreateDBClusterEndpoint (Prelude.Maybe [Tag])
createDBClusterEndpoint_tags :: Lens' CreateDBClusterEndpoint (Maybe [Tag])
createDBClusterEndpoint_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Maybe [Tag]
a -> CreateDBClusterEndpoint
s {$sel:tags:CreateDBClusterEndpoint' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDBClusterEndpoint) 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 DB cluster identifier of the DB cluster associated with the
-- endpoint. This parameter is stored as a lowercase string.
createDBClusterEndpoint_dbClusterIdentifier :: Lens.Lens' CreateDBClusterEndpoint Prelude.Text
createDBClusterEndpoint_dbClusterIdentifier :: Lens' CreateDBClusterEndpoint Text
createDBClusterEndpoint_dbClusterIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Text
dbClusterIdentifier :: Text
$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
dbClusterIdentifier} -> Text
dbClusterIdentifier) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Text
a -> CreateDBClusterEndpoint
s {$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: Text
dbClusterIdentifier = Text
a} :: CreateDBClusterEndpoint)

-- | The identifier to use for the new endpoint. This parameter is stored as
-- a lowercase string.
createDBClusterEndpoint_dbClusterEndpointIdentifier :: Lens.Lens' CreateDBClusterEndpoint Prelude.Text
createDBClusterEndpoint_dbClusterEndpointIdentifier :: Lens' CreateDBClusterEndpoint Text
createDBClusterEndpoint_dbClusterEndpointIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpoint' {Text
dbClusterEndpointIdentifier :: Text
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
dbClusterEndpointIdentifier} -> Text
dbClusterEndpointIdentifier) (\s :: CreateDBClusterEndpoint
s@CreateDBClusterEndpoint' {} Text
a -> CreateDBClusterEndpoint
s {$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: Text
dbClusterEndpointIdentifier = Text
a} :: CreateDBClusterEndpoint)

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

instance Core.AWSRequest CreateDBClusterEndpoint where
  type
    AWSResponse CreateDBClusterEndpoint =
      CreateDBClusterEndpointResponse
  request :: (Service -> Service)
-> CreateDBClusterEndpoint -> Request CreateDBClusterEndpoint
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 CreateDBClusterEndpoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDBClusterEndpoint)))
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
"CreateDBClusterEndpointResult"
      ( \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
-> CreateDBClusterEndpointResponse
CreateDBClusterEndpointResponse'
            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 CreateDBClusterEndpoint where
  hashWithSalt :: Int -> CreateDBClusterEndpoint -> Int
hashWithSalt Int
_salt CreateDBClusterEndpoint' {Maybe [Text]
Maybe [Tag]
Text
endpointType :: Text
dbClusterEndpointIdentifier :: Text
dbClusterIdentifier :: Text
tags :: Maybe [Tag]
staticMembers :: Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:endpointType:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:tags:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Tag]
$sel:staticMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
$sel:excludedMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
excludedMembers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
staticMembers
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbClusterIdentifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dbClusterEndpointIdentifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
endpointType

instance Prelude.NFData CreateDBClusterEndpoint where
  rnf :: CreateDBClusterEndpoint -> ()
rnf CreateDBClusterEndpoint' {Maybe [Text]
Maybe [Tag]
Text
endpointType :: Text
dbClusterEndpointIdentifier :: Text
dbClusterIdentifier :: Text
tags :: Maybe [Tag]
staticMembers :: Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:endpointType:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:tags:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Tag]
$sel:staticMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
$sel:excludedMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
..} =
    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 [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dbClusterIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dbClusterEndpointIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
endpointType

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

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

instance Data.ToQuery CreateDBClusterEndpoint where
  toQuery :: CreateDBClusterEndpoint -> QueryString
toQuery CreateDBClusterEndpoint' {Maybe [Text]
Maybe [Tag]
Text
endpointType :: Text
dbClusterEndpointIdentifier :: Text
dbClusterIdentifier :: Text
tags :: Maybe [Tag]
staticMembers :: Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:endpointType:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:dbClusterIdentifier:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Text
$sel:tags:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Tag]
$sel:staticMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
$sel:excludedMembers:CreateDBClusterEndpoint' :: CreateDBClusterEndpoint -> Maybe [Text]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateDBClusterEndpoint" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"ExcludedMembers"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
excludedMembers
            ),
        ByteString
"StaticMembers"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
staticMembers
            ),
        ByteString
"Tags"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Tag" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"DBClusterIdentifier" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbClusterIdentifier,
        ByteString
"DBClusterEndpointIdentifier"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
dbClusterEndpointIdentifier,
        ByteString
"EndpointType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
endpointType
      ]

-- | 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 Neptune DB instance
-- endpoints, see @Endpoint@.
--
-- /See:/ 'newCreateDBClusterEndpointResponse' smart constructor.
data CreateDBClusterEndpointResponse = CreateDBClusterEndpointResponse'
  { -- | The type associated with a custom endpoint. One of: @READER@, @WRITER@,
    -- @ANY@.
    CreateDBClusterEndpointResponse -> Maybe Text
customEndpointType :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the endpoint.
    CreateDBClusterEndpointResponse -> Maybe Text
dbClusterEndpointArn :: Prelude.Maybe Prelude.Text,
    -- | The identifier associated with the endpoint. This parameter is stored as
    -- a lowercase string.
    CreateDBClusterEndpointResponse -> 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.
    CreateDBClusterEndpointResponse -> 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.
    CreateDBClusterEndpointResponse -> Maybe Text
dbClusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The DNS address of the endpoint.
    CreateDBClusterEndpointResponse -> Maybe Text
endpoint :: Prelude.Maybe Prelude.Text,
    -- | The type of the endpoint. One of: @READER@, @WRITER@, @CUSTOM@.
    CreateDBClusterEndpointResponse -> 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.
    CreateDBClusterEndpointResponse -> Maybe [Text]
excludedMembers :: Prelude.Maybe [Prelude.Text],
    -- | List of DB instance identifiers that are part of the custom endpoint
    -- group.
    CreateDBClusterEndpointResponse -> 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.
    CreateDBClusterEndpointResponse -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateDBClusterEndpointResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateDBClusterEndpointResponse
-> CreateDBClusterEndpointResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDBClusterEndpointResponse
-> CreateDBClusterEndpointResponse -> Bool
$c/= :: CreateDBClusterEndpointResponse
-> CreateDBClusterEndpointResponse -> Bool
== :: CreateDBClusterEndpointResponse
-> CreateDBClusterEndpointResponse -> Bool
$c== :: CreateDBClusterEndpointResponse
-> CreateDBClusterEndpointResponse -> Bool
Prelude.Eq, ReadPrec [CreateDBClusterEndpointResponse]
ReadPrec CreateDBClusterEndpointResponse
Int -> ReadS CreateDBClusterEndpointResponse
ReadS [CreateDBClusterEndpointResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDBClusterEndpointResponse]
$creadListPrec :: ReadPrec [CreateDBClusterEndpointResponse]
readPrec :: ReadPrec CreateDBClusterEndpointResponse
$creadPrec :: ReadPrec CreateDBClusterEndpointResponse
readList :: ReadS [CreateDBClusterEndpointResponse]
$creadList :: ReadS [CreateDBClusterEndpointResponse]
readsPrec :: Int -> ReadS CreateDBClusterEndpointResponse
$creadsPrec :: Int -> ReadS CreateDBClusterEndpointResponse
Prelude.Read, Int -> CreateDBClusterEndpointResponse -> ShowS
[CreateDBClusterEndpointResponse] -> ShowS
CreateDBClusterEndpointResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDBClusterEndpointResponse] -> ShowS
$cshowList :: [CreateDBClusterEndpointResponse] -> ShowS
show :: CreateDBClusterEndpointResponse -> String
$cshow :: CreateDBClusterEndpointResponse -> String
showsPrec :: Int -> CreateDBClusterEndpointResponse -> ShowS
$cshowsPrec :: Int -> CreateDBClusterEndpointResponse -> ShowS
Prelude.Show, forall x.
Rep CreateDBClusterEndpointResponse x
-> CreateDBClusterEndpointResponse
forall x.
CreateDBClusterEndpointResponse
-> Rep CreateDBClusterEndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDBClusterEndpointResponse x
-> CreateDBClusterEndpointResponse
$cfrom :: forall x.
CreateDBClusterEndpointResponse
-> Rep CreateDBClusterEndpointResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateDBClusterEndpointResponse' 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', 'createDBClusterEndpointResponse_customEndpointType' - The type associated with a custom endpoint. One of: @READER@, @WRITER@,
-- @ANY@.
--
-- 'dbClusterEndpointArn', 'createDBClusterEndpointResponse_dbClusterEndpointArn' - The Amazon Resource Name (ARN) for the endpoint.
--
-- 'dbClusterEndpointIdentifier', 'createDBClusterEndpointResponse_dbClusterEndpointIdentifier' - The identifier associated with the endpoint. This parameter is stored as
-- a lowercase string.
--
-- 'dbClusterEndpointResourceIdentifier', 'createDBClusterEndpointResponse_dbClusterEndpointResourceIdentifier' - A unique system-generated identifier for an endpoint. It remains the
-- same for the whole life of the endpoint.
--
-- 'dbClusterIdentifier', 'createDBClusterEndpointResponse_dbClusterIdentifier' - The DB cluster identifier of the DB cluster associated with the
-- endpoint. This parameter is stored as a lowercase string.
--
-- 'endpoint', 'createDBClusterEndpointResponse_endpoint' - The DNS address of the endpoint.
--
-- 'endpointType', 'createDBClusterEndpointResponse_endpointType' - The type of the endpoint. One of: @READER@, @WRITER@, @CUSTOM@.
--
-- 'excludedMembers', 'createDBClusterEndpointResponse_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', 'createDBClusterEndpointResponse_staticMembers' - List of DB instance identifiers that are part of the custom endpoint
-- group.
--
-- 'status', 'createDBClusterEndpointResponse_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', 'createDBClusterEndpointResponse_httpStatus' - The response's http status code.
newCreateDBClusterEndpointResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDBClusterEndpointResponse
newCreateDBClusterEndpointResponse :: Int -> CreateDBClusterEndpointResponse
newCreateDBClusterEndpointResponse Int
pHttpStatus_ =
  CreateDBClusterEndpointResponse'
    { $sel:customEndpointType:CreateDBClusterEndpointResponse' :: Maybe Text
customEndpointType =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterEndpointArn:CreateDBClusterEndpointResponse' :: Maybe Text
dbClusterEndpointArn = forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterEndpointIdentifier:CreateDBClusterEndpointResponse' :: Maybe Text
dbClusterEndpointIdentifier =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterEndpointResourceIdentifier:CreateDBClusterEndpointResponse' :: Maybe Text
dbClusterEndpointResourceIdentifier =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterIdentifier:CreateDBClusterEndpointResponse' :: Maybe Text
dbClusterIdentifier = forall a. Maybe a
Prelude.Nothing,
      $sel:endpoint:CreateDBClusterEndpointResponse' :: Maybe Text
endpoint = forall a. Maybe a
Prelude.Nothing,
      $sel:endpointType:CreateDBClusterEndpointResponse' :: Maybe Text
endpointType = forall a. Maybe a
Prelude.Nothing,
      $sel:excludedMembers:CreateDBClusterEndpointResponse' :: Maybe [Text]
excludedMembers = forall a. Maybe a
Prelude.Nothing,
      $sel:staticMembers:CreateDBClusterEndpointResponse' :: Maybe [Text]
staticMembers = forall a. Maybe a
Prelude.Nothing,
      $sel:status:CreateDBClusterEndpointResponse' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDBClusterEndpointResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

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

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

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

-- | 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.
createDBClusterEndpointResponse_excludedMembers :: Lens.Lens' CreateDBClusterEndpointResponse (Prelude.Maybe [Prelude.Text])
createDBClusterEndpointResponse_excludedMembers :: Lens' CreateDBClusterEndpointResponse (Maybe [Text])
createDBClusterEndpointResponse_excludedMembers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpointResponse' {Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:excludedMembers:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe [Text]
excludedMembers} -> Maybe [Text]
excludedMembers) (\s :: CreateDBClusterEndpointResponse
s@CreateDBClusterEndpointResponse' {} Maybe [Text]
a -> CreateDBClusterEndpointResponse
s {$sel:excludedMembers:CreateDBClusterEndpointResponse' :: Maybe [Text]
excludedMembers = Maybe [Text]
a} :: CreateDBClusterEndpointResponse) 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.
createDBClusterEndpointResponse_staticMembers :: Lens.Lens' CreateDBClusterEndpointResponse (Prelude.Maybe [Prelude.Text])
createDBClusterEndpointResponse_staticMembers :: Lens' CreateDBClusterEndpointResponse (Maybe [Text])
createDBClusterEndpointResponse_staticMembers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpointResponse' {Maybe [Text]
staticMembers :: Maybe [Text]
$sel:staticMembers:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe [Text]
staticMembers} -> Maybe [Text]
staticMembers) (\s :: CreateDBClusterEndpointResponse
s@CreateDBClusterEndpointResponse' {} Maybe [Text]
a -> CreateDBClusterEndpointResponse
s {$sel:staticMembers:CreateDBClusterEndpointResponse' :: Maybe [Text]
staticMembers = Maybe [Text]
a} :: CreateDBClusterEndpointResponse) 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.
createDBClusterEndpointResponse_status :: Lens.Lens' CreateDBClusterEndpointResponse (Prelude.Maybe Prelude.Text)
createDBClusterEndpointResponse_status :: Lens' CreateDBClusterEndpointResponse (Maybe Text)
createDBClusterEndpointResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDBClusterEndpointResponse' {Maybe Text
status :: Maybe Text
$sel:status:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe Text
status} -> Maybe Text
status) (\s :: CreateDBClusterEndpointResponse
s@CreateDBClusterEndpointResponse' {} Maybe Text
a -> CreateDBClusterEndpointResponse
s {$sel:status:CreateDBClusterEndpointResponse' :: Maybe Text
status = Maybe Text
a} :: CreateDBClusterEndpointResponse)

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

instance
  Prelude.NFData
    CreateDBClusterEndpointResponse
  where
  rnf :: CreateDBClusterEndpointResponse -> ()
rnf CreateDBClusterEndpointResponse' {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:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Int
$sel:status:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe Text
$sel:staticMembers:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe [Text]
$sel:excludedMembers:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe [Text]
$sel:endpointType:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe Text
$sel:endpoint:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe Text
$sel:dbClusterIdentifier:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe Text
$sel:dbClusterEndpointResourceIdentifier:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe Text
$sel:dbClusterEndpointIdentifier:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe Text
$sel:dbClusterEndpointArn:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> Maybe Text
$sel:customEndpointType:CreateDBClusterEndpointResponse' :: CreateDBClusterEndpointResponse -> 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