{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.RDS.Types.DBClusterEndpoint
-- 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)
module Amazonka.RDS.Types.DBClusterEndpoint where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | This data type represents the information you need to connect to an
-- Amazon Aurora 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:/ 'newDBClusterEndpoint' smart constructor.
data DBClusterEndpoint = DBClusterEndpoint'
  { -- | The current status of the endpoint. One of: @creating@, @available@,
    -- @deleting@, @inactive@, @modifying@. The @inactive@ state applies to an
    -- endpoint that can\'t be used for a certain kind of cluster, such as a
    -- @writer@ endpoint for a read-only secondary cluster in a global
    -- database.
    DBClusterEndpoint -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The DB cluster identifier of the DB cluster associated with the
    -- endpoint. This parameter is stored as a lowercase string.
    DBClusterEndpoint -> Maybe Text
dbClusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the endpoint.
    DBClusterEndpoint -> Maybe Text
dbClusterEndpointArn :: Prelude.Maybe Prelude.Text,
    -- | The type associated with a custom endpoint. One of: @READER@, @WRITER@,
    -- @ANY@.
    DBClusterEndpoint -> Maybe Text
customEndpointType :: Prelude.Maybe Prelude.Text,
    -- | List of DB instance identifiers that are part of the custom endpoint
    -- group.
    DBClusterEndpoint -> Maybe [Text]
staticMembers :: Prelude.Maybe [Prelude.Text],
    -- | The type of the endpoint. One of: @READER@, @WRITER@, @CUSTOM@.
    DBClusterEndpoint -> Maybe Text
endpointType :: Prelude.Maybe Prelude.Text,
    -- | The identifier associated with the endpoint. This parameter is stored as
    -- a lowercase string.
    DBClusterEndpoint -> Maybe Text
dbClusterEndpointIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The DNS address of the endpoint.
    DBClusterEndpoint -> Maybe Text
endpoint :: Prelude.Maybe Prelude.Text,
    -- | A unique system-generated identifier for an endpoint. It remains the
    -- same for the whole life of the endpoint.
    DBClusterEndpoint -> Maybe Text
dbClusterEndpointResourceIdentifier :: 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.
    DBClusterEndpoint -> Maybe [Text]
excludedMembers :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DBClusterEndpoint -> DBClusterEndpoint -> Bool
(DBClusterEndpoint -> DBClusterEndpoint -> Bool)
-> (DBClusterEndpoint -> DBClusterEndpoint -> Bool)
-> Eq DBClusterEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBClusterEndpoint -> DBClusterEndpoint -> Bool
$c/= :: DBClusterEndpoint -> DBClusterEndpoint -> Bool
== :: DBClusterEndpoint -> DBClusterEndpoint -> Bool
$c== :: DBClusterEndpoint -> DBClusterEndpoint -> Bool
Prelude.Eq, ReadPrec [DBClusterEndpoint]
ReadPrec DBClusterEndpoint
Int -> ReadS DBClusterEndpoint
ReadS [DBClusterEndpoint]
(Int -> ReadS DBClusterEndpoint)
-> ReadS [DBClusterEndpoint]
-> ReadPrec DBClusterEndpoint
-> ReadPrec [DBClusterEndpoint]
-> Read DBClusterEndpoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBClusterEndpoint]
$creadListPrec :: ReadPrec [DBClusterEndpoint]
readPrec :: ReadPrec DBClusterEndpoint
$creadPrec :: ReadPrec DBClusterEndpoint
readList :: ReadS [DBClusterEndpoint]
$creadList :: ReadS [DBClusterEndpoint]
readsPrec :: Int -> ReadS DBClusterEndpoint
$creadsPrec :: Int -> ReadS DBClusterEndpoint
Prelude.Read, Int -> DBClusterEndpoint -> ShowS
[DBClusterEndpoint] -> ShowS
DBClusterEndpoint -> String
(Int -> DBClusterEndpoint -> ShowS)
-> (DBClusterEndpoint -> String)
-> ([DBClusterEndpoint] -> ShowS)
-> Show DBClusterEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBClusterEndpoint] -> ShowS
$cshowList :: [DBClusterEndpoint] -> ShowS
show :: DBClusterEndpoint -> String
$cshow :: DBClusterEndpoint -> String
showsPrec :: Int -> DBClusterEndpoint -> ShowS
$cshowsPrec :: Int -> DBClusterEndpoint -> ShowS
Prelude.Show, (forall x. DBClusterEndpoint -> Rep DBClusterEndpoint x)
-> (forall x. Rep DBClusterEndpoint x -> DBClusterEndpoint)
-> Generic DBClusterEndpoint
forall x. Rep DBClusterEndpoint x -> DBClusterEndpoint
forall x. DBClusterEndpoint -> Rep DBClusterEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBClusterEndpoint x -> DBClusterEndpoint
$cfrom :: forall x. DBClusterEndpoint -> Rep DBClusterEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'DBClusterEndpoint' 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:
--
-- 'status', 'dbClusterEndpoint_status' - The current status of the endpoint. One of: @creating@, @available@,
-- @deleting@, @inactive@, @modifying@. The @inactive@ state applies to an
-- endpoint that can\'t be used for a certain kind of cluster, such as a
-- @writer@ endpoint for a read-only secondary cluster in a global
-- database.
--
-- 'dbClusterIdentifier', 'dbClusterEndpoint_dbClusterIdentifier' - The DB cluster identifier of the DB cluster associated with the
-- endpoint. This parameter is stored as a lowercase string.
--
-- 'dbClusterEndpointArn', 'dbClusterEndpoint_dbClusterEndpointArn' - The Amazon Resource Name (ARN) for the endpoint.
--
-- 'customEndpointType', 'dbClusterEndpoint_customEndpointType' - The type associated with a custom endpoint. One of: @READER@, @WRITER@,
-- @ANY@.
--
-- 'staticMembers', 'dbClusterEndpoint_staticMembers' - List of DB instance identifiers that are part of the custom endpoint
-- group.
--
-- 'endpointType', 'dbClusterEndpoint_endpointType' - The type of the endpoint. One of: @READER@, @WRITER@, @CUSTOM@.
--
-- 'dbClusterEndpointIdentifier', 'dbClusterEndpoint_dbClusterEndpointIdentifier' - The identifier associated with the endpoint. This parameter is stored as
-- a lowercase string.
--
-- 'endpoint', 'dbClusterEndpoint_endpoint' - The DNS address of the endpoint.
--
-- 'dbClusterEndpointResourceIdentifier', 'dbClusterEndpoint_dbClusterEndpointResourceIdentifier' - A unique system-generated identifier for an endpoint. It remains the
-- same for the whole life of the endpoint.
--
-- 'excludedMembers', 'dbClusterEndpoint_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.
newDBClusterEndpoint ::
  DBClusterEndpoint
newDBClusterEndpoint :: DBClusterEndpoint
newDBClusterEndpoint =
  DBClusterEndpoint' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> DBClusterEndpoint
DBClusterEndpoint'
    { $sel:status:DBClusterEndpoint' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterIdentifier:DBClusterEndpoint' :: Maybe Text
dbClusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterEndpointArn:DBClusterEndpoint' :: Maybe Text
dbClusterEndpointArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customEndpointType:DBClusterEndpoint' :: Maybe Text
customEndpointType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:staticMembers:DBClusterEndpoint' :: Maybe [Text]
staticMembers = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointType:DBClusterEndpoint' :: Maybe Text
endpointType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterEndpointIdentifier:DBClusterEndpoint' :: Maybe Text
dbClusterEndpointIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpoint:DBClusterEndpoint' :: Maybe Text
endpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterEndpointResourceIdentifier:DBClusterEndpoint' :: Maybe Text
dbClusterEndpointResourceIdentifier =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:excludedMembers:DBClusterEndpoint' :: Maybe [Text]
excludedMembers = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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

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

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

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

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

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

-- | 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.
dbClusterEndpoint_excludedMembers :: Lens.Lens' DBClusterEndpoint (Prelude.Maybe [Prelude.Text])
dbClusterEndpoint_excludedMembers :: (Maybe [Text] -> f (Maybe [Text]))
-> DBClusterEndpoint -> f DBClusterEndpoint
dbClusterEndpoint_excludedMembers = (DBClusterEndpoint -> Maybe [Text])
-> (DBClusterEndpoint -> Maybe [Text] -> DBClusterEndpoint)
-> Lens
     DBClusterEndpoint DBClusterEndpoint (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterEndpoint' {Maybe [Text]
excludedMembers :: Maybe [Text]
$sel:excludedMembers:DBClusterEndpoint' :: DBClusterEndpoint -> Maybe [Text]
excludedMembers} -> Maybe [Text]
excludedMembers) (\s :: DBClusterEndpoint
s@DBClusterEndpoint' {} Maybe [Text]
a -> DBClusterEndpoint
s {$sel:excludedMembers:DBClusterEndpoint' :: Maybe [Text]
excludedMembers = Maybe [Text]
a} :: DBClusterEndpoint) ((Maybe [Text] -> f (Maybe [Text]))
 -> DBClusterEndpoint -> f DBClusterEndpoint)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DBClusterEndpoint
-> f DBClusterEndpoint
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromXML DBClusterEndpoint where
  parseXML :: [Node] -> Either String DBClusterEndpoint
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> DBClusterEndpoint
DBClusterEndpoint'
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> DBClusterEndpoint)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> DBClusterEndpoint)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> DBClusterEndpoint)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> DBClusterEndpoint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBClusterIdentifier")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> DBClusterEndpoint)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> DBClusterEndpoint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBClusterEndpointArn")
      Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> DBClusterEndpoint)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> DBClusterEndpoint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CustomEndpointType")
      Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> DBClusterEndpoint)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> DBClusterEndpoint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StaticMembers" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> DBClusterEndpoint)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe [Text] -> DBClusterEndpoint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EndpointType")
      Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe [Text] -> DBClusterEndpoint)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe Text -> Maybe [Text] -> DBClusterEndpoint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBClusterEndpointIdentifier")
      Either
  String
  (Maybe Text -> Maybe Text -> Maybe [Text] -> DBClusterEndpoint)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe [Text] -> DBClusterEndpoint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Endpoint")
      Either String (Maybe Text -> Maybe [Text] -> DBClusterEndpoint)
-> Either String (Maybe Text)
-> Either String (Maybe [Text] -> DBClusterEndpoint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBClusterEndpointResourceIdentifier")
      Either String (Maybe [Text] -> DBClusterEndpoint)
-> Either String (Maybe [Text]) -> Either String DBClusterEndpoint
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ExcludedMembers" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )

instance Prelude.Hashable DBClusterEndpoint

instance Prelude.NFData DBClusterEndpoint