{-# 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.DBProxyEndpoint
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.RDS.Types.DBProxyEndpoint where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types.DBProxyEndpointStatus
import Amazonka.RDS.Types.DBProxyEndpointTargetRole

-- | The data structure representing an endpoint associated with a DB proxy.
-- RDS automatically creates one endpoint for each DB proxy. For Aurora DB
-- clusters, you can associate additional endpoints with the same DB proxy.
-- These endpoints can be read\/write or read-only. They can also reside in
-- different VPCs than the associated DB proxy.
--
-- This data type is used as a response element in the
-- @DescribeDBProxyEndpoints@ operation.
--
-- /See:/ 'newDBProxyEndpoint' smart constructor.
data DBProxyEndpoint = DBProxyEndpoint'
  { -- | The date and time when the DB proxy endpoint was first created.
    DBProxyEndpoint -> Maybe ISO8601
createdDate :: Prelude.Maybe Data.ISO8601,
    -- | The Amazon Resource Name (ARN) for the DB proxy endpoint.
    DBProxyEndpoint -> Maybe Text
dbProxyEndpointArn :: Prelude.Maybe Prelude.Text,
    -- | The name for the DB proxy endpoint. An identifier must begin with a
    -- letter and must contain only ASCII letters, digits, and hyphens; it
    -- can\'t end with a hyphen or contain two consecutive hyphens.
    DBProxyEndpoint -> Maybe Text
dbProxyEndpointName :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the DB proxy that is associated with this DB proxy
    -- endpoint.
    DBProxyEndpoint -> Maybe Text
dbProxyName :: Prelude.Maybe Prelude.Text,
    -- | The endpoint that you can use to connect to the DB proxy. You include
    -- the endpoint value in the connection string for a database client
    -- application.
    DBProxyEndpoint -> Maybe Text
endpoint :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates whether this endpoint is the default endpoint for
    -- the associated DB proxy. Default DB proxy endpoints always have
    -- read\/write capability. Other endpoints that you associate with the DB
    -- proxy can be either read\/write or read-only.
    DBProxyEndpoint -> Maybe Bool
isDefault :: Prelude.Maybe Prelude.Bool,
    -- | The current status of this DB proxy endpoint. A status of @available@
    -- means the endpoint is ready to handle requests. Other values indicate
    -- that you must wait for the endpoint to be ready, or take some action to
    -- resolve an issue.
    DBProxyEndpoint -> Maybe DBProxyEndpointStatus
status :: Prelude.Maybe DBProxyEndpointStatus,
    -- | A value that indicates whether the DB proxy endpoint can be used for
    -- read\/write or read-only operations.
    DBProxyEndpoint -> Maybe DBProxyEndpointTargetRole
targetRole :: Prelude.Maybe DBProxyEndpointTargetRole,
    -- | Provides the VPC ID of the DB proxy endpoint.
    DBProxyEndpoint -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | Provides a list of VPC security groups that the DB proxy endpoint
    -- belongs to.
    DBProxyEndpoint -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | The EC2 subnet IDs for the DB proxy endpoint.
    DBProxyEndpoint -> Maybe [Text]
vpcSubnetIds :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DBProxyEndpoint -> DBProxyEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBProxyEndpoint -> DBProxyEndpoint -> Bool
$c/= :: DBProxyEndpoint -> DBProxyEndpoint -> Bool
== :: DBProxyEndpoint -> DBProxyEndpoint -> Bool
$c== :: DBProxyEndpoint -> DBProxyEndpoint -> Bool
Prelude.Eq, ReadPrec [DBProxyEndpoint]
ReadPrec DBProxyEndpoint
Int -> ReadS DBProxyEndpoint
ReadS [DBProxyEndpoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBProxyEndpoint]
$creadListPrec :: ReadPrec [DBProxyEndpoint]
readPrec :: ReadPrec DBProxyEndpoint
$creadPrec :: ReadPrec DBProxyEndpoint
readList :: ReadS [DBProxyEndpoint]
$creadList :: ReadS [DBProxyEndpoint]
readsPrec :: Int -> ReadS DBProxyEndpoint
$creadsPrec :: Int -> ReadS DBProxyEndpoint
Prelude.Read, Int -> DBProxyEndpoint -> ShowS
[DBProxyEndpoint] -> ShowS
DBProxyEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBProxyEndpoint] -> ShowS
$cshowList :: [DBProxyEndpoint] -> ShowS
show :: DBProxyEndpoint -> String
$cshow :: DBProxyEndpoint -> String
showsPrec :: Int -> DBProxyEndpoint -> ShowS
$cshowsPrec :: Int -> DBProxyEndpoint -> ShowS
Prelude.Show, forall x. Rep DBProxyEndpoint x -> DBProxyEndpoint
forall x. DBProxyEndpoint -> Rep DBProxyEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBProxyEndpoint x -> DBProxyEndpoint
$cfrom :: forall x. DBProxyEndpoint -> Rep DBProxyEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'DBProxyEndpoint' 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:
--
-- 'createdDate', 'dbProxyEndpoint_createdDate' - The date and time when the DB proxy endpoint was first created.
--
-- 'dbProxyEndpointArn', 'dbProxyEndpoint_dbProxyEndpointArn' - The Amazon Resource Name (ARN) for the DB proxy endpoint.
--
-- 'dbProxyEndpointName', 'dbProxyEndpoint_dbProxyEndpointName' - The name for the DB proxy endpoint. An identifier must begin with a
-- letter and must contain only ASCII letters, digits, and hyphens; it
-- can\'t end with a hyphen or contain two consecutive hyphens.
--
-- 'dbProxyName', 'dbProxyEndpoint_dbProxyName' - The identifier for the DB proxy that is associated with this DB proxy
-- endpoint.
--
-- 'endpoint', 'dbProxyEndpoint_endpoint' - The endpoint that you can use to connect to the DB proxy. You include
-- the endpoint value in the connection string for a database client
-- application.
--
-- 'isDefault', 'dbProxyEndpoint_isDefault' - A value that indicates whether this endpoint is the default endpoint for
-- the associated DB proxy. Default DB proxy endpoints always have
-- read\/write capability. Other endpoints that you associate with the DB
-- proxy can be either read\/write or read-only.
--
-- 'status', 'dbProxyEndpoint_status' - The current status of this DB proxy endpoint. A status of @available@
-- means the endpoint is ready to handle requests. Other values indicate
-- that you must wait for the endpoint to be ready, or take some action to
-- resolve an issue.
--
-- 'targetRole', 'dbProxyEndpoint_targetRole' - A value that indicates whether the DB proxy endpoint can be used for
-- read\/write or read-only operations.
--
-- 'vpcId', 'dbProxyEndpoint_vpcId' - Provides the VPC ID of the DB proxy endpoint.
--
-- 'vpcSecurityGroupIds', 'dbProxyEndpoint_vpcSecurityGroupIds' - Provides a list of VPC security groups that the DB proxy endpoint
-- belongs to.
--
-- 'vpcSubnetIds', 'dbProxyEndpoint_vpcSubnetIds' - The EC2 subnet IDs for the DB proxy endpoint.
newDBProxyEndpoint ::
  DBProxyEndpoint
newDBProxyEndpoint :: DBProxyEndpoint
newDBProxyEndpoint =
  DBProxyEndpoint'
    { $sel:createdDate:DBProxyEndpoint' :: Maybe ISO8601
createdDate = forall a. Maybe a
Prelude.Nothing,
      $sel:dbProxyEndpointArn:DBProxyEndpoint' :: Maybe Text
dbProxyEndpointArn = forall a. Maybe a
Prelude.Nothing,
      $sel:dbProxyEndpointName:DBProxyEndpoint' :: Maybe Text
dbProxyEndpointName = forall a. Maybe a
Prelude.Nothing,
      $sel:dbProxyName:DBProxyEndpoint' :: Maybe Text
dbProxyName = forall a. Maybe a
Prelude.Nothing,
      $sel:endpoint:DBProxyEndpoint' :: Maybe Text
endpoint = forall a. Maybe a
Prelude.Nothing,
      $sel:isDefault:DBProxyEndpoint' :: Maybe Bool
isDefault = forall a. Maybe a
Prelude.Nothing,
      $sel:status:DBProxyEndpoint' :: Maybe DBProxyEndpointStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:targetRole:DBProxyEndpoint' :: Maybe DBProxyEndpointTargetRole
targetRole = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:DBProxyEndpoint' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcSecurityGroupIds:DBProxyEndpoint' :: Maybe [Text]
vpcSecurityGroupIds = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcSubnetIds:DBProxyEndpoint' :: Maybe [Text]
vpcSubnetIds = forall a. Maybe a
Prelude.Nothing
    }

-- | The date and time when the DB proxy endpoint was first created.
dbProxyEndpoint_createdDate :: Lens.Lens' DBProxyEndpoint (Prelude.Maybe Prelude.UTCTime)
dbProxyEndpoint_createdDate :: Lens' DBProxyEndpoint (Maybe UTCTime)
dbProxyEndpoint_createdDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBProxyEndpoint' {Maybe ISO8601
createdDate :: Maybe ISO8601
$sel:createdDate:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe ISO8601
createdDate} -> Maybe ISO8601
createdDate) (\s :: DBProxyEndpoint
s@DBProxyEndpoint' {} Maybe ISO8601
a -> DBProxyEndpoint
s {$sel:createdDate:DBProxyEndpoint' :: Maybe ISO8601
createdDate = Maybe ISO8601
a} :: DBProxyEndpoint) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

-- | The name for the DB proxy endpoint. An identifier must begin with a
-- letter and must contain only ASCII letters, digits, and hyphens; it
-- can\'t end with a hyphen or contain two consecutive hyphens.
dbProxyEndpoint_dbProxyEndpointName :: Lens.Lens' DBProxyEndpoint (Prelude.Maybe Prelude.Text)
dbProxyEndpoint_dbProxyEndpointName :: Lens' DBProxyEndpoint (Maybe Text)
dbProxyEndpoint_dbProxyEndpointName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBProxyEndpoint' {Maybe Text
dbProxyEndpointName :: Maybe Text
$sel:dbProxyEndpointName:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
dbProxyEndpointName} -> Maybe Text
dbProxyEndpointName) (\s :: DBProxyEndpoint
s@DBProxyEndpoint' {} Maybe Text
a -> DBProxyEndpoint
s {$sel:dbProxyEndpointName:DBProxyEndpoint' :: Maybe Text
dbProxyEndpointName = Maybe Text
a} :: DBProxyEndpoint)

-- | The identifier for the DB proxy that is associated with this DB proxy
-- endpoint.
dbProxyEndpoint_dbProxyName :: Lens.Lens' DBProxyEndpoint (Prelude.Maybe Prelude.Text)
dbProxyEndpoint_dbProxyName :: Lens' DBProxyEndpoint (Maybe Text)
dbProxyEndpoint_dbProxyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBProxyEndpoint' {Maybe Text
dbProxyName :: Maybe Text
$sel:dbProxyName:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
dbProxyName} -> Maybe Text
dbProxyName) (\s :: DBProxyEndpoint
s@DBProxyEndpoint' {} Maybe Text
a -> DBProxyEndpoint
s {$sel:dbProxyName:DBProxyEndpoint' :: Maybe Text
dbProxyName = Maybe Text
a} :: DBProxyEndpoint)

-- | The endpoint that you can use to connect to the DB proxy. You include
-- the endpoint value in the connection string for a database client
-- application.
dbProxyEndpoint_endpoint :: Lens.Lens' DBProxyEndpoint (Prelude.Maybe Prelude.Text)
dbProxyEndpoint_endpoint :: Lens' DBProxyEndpoint (Maybe Text)
dbProxyEndpoint_endpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBProxyEndpoint' {Maybe Text
endpoint :: Maybe Text
$sel:endpoint:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
endpoint} -> Maybe Text
endpoint) (\s :: DBProxyEndpoint
s@DBProxyEndpoint' {} Maybe Text
a -> DBProxyEndpoint
s {$sel:endpoint:DBProxyEndpoint' :: Maybe Text
endpoint = Maybe Text
a} :: DBProxyEndpoint)

-- | A value that indicates whether this endpoint is the default endpoint for
-- the associated DB proxy. Default DB proxy endpoints always have
-- read\/write capability. Other endpoints that you associate with the DB
-- proxy can be either read\/write or read-only.
dbProxyEndpoint_isDefault :: Lens.Lens' DBProxyEndpoint (Prelude.Maybe Prelude.Bool)
dbProxyEndpoint_isDefault :: Lens' DBProxyEndpoint (Maybe Bool)
dbProxyEndpoint_isDefault = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBProxyEndpoint' {Maybe Bool
isDefault :: Maybe Bool
$sel:isDefault:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Bool
isDefault} -> Maybe Bool
isDefault) (\s :: DBProxyEndpoint
s@DBProxyEndpoint' {} Maybe Bool
a -> DBProxyEndpoint
s {$sel:isDefault:DBProxyEndpoint' :: Maybe Bool
isDefault = Maybe Bool
a} :: DBProxyEndpoint)

-- | The current status of this DB proxy endpoint. A status of @available@
-- means the endpoint is ready to handle requests. Other values indicate
-- that you must wait for the endpoint to be ready, or take some action to
-- resolve an issue.
dbProxyEndpoint_status :: Lens.Lens' DBProxyEndpoint (Prelude.Maybe DBProxyEndpointStatus)
dbProxyEndpoint_status :: Lens' DBProxyEndpoint (Maybe DBProxyEndpointStatus)
dbProxyEndpoint_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBProxyEndpoint' {Maybe DBProxyEndpointStatus
status :: Maybe DBProxyEndpointStatus
$sel:status:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe DBProxyEndpointStatus
status} -> Maybe DBProxyEndpointStatus
status) (\s :: DBProxyEndpoint
s@DBProxyEndpoint' {} Maybe DBProxyEndpointStatus
a -> DBProxyEndpoint
s {$sel:status:DBProxyEndpoint' :: Maybe DBProxyEndpointStatus
status = Maybe DBProxyEndpointStatus
a} :: DBProxyEndpoint)

-- | A value that indicates whether the DB proxy endpoint can be used for
-- read\/write or read-only operations.
dbProxyEndpoint_targetRole :: Lens.Lens' DBProxyEndpoint (Prelude.Maybe DBProxyEndpointTargetRole)
dbProxyEndpoint_targetRole :: Lens' DBProxyEndpoint (Maybe DBProxyEndpointTargetRole)
dbProxyEndpoint_targetRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBProxyEndpoint' {Maybe DBProxyEndpointTargetRole
targetRole :: Maybe DBProxyEndpointTargetRole
$sel:targetRole:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe DBProxyEndpointTargetRole
targetRole} -> Maybe DBProxyEndpointTargetRole
targetRole) (\s :: DBProxyEndpoint
s@DBProxyEndpoint' {} Maybe DBProxyEndpointTargetRole
a -> DBProxyEndpoint
s {$sel:targetRole:DBProxyEndpoint' :: Maybe DBProxyEndpointTargetRole
targetRole = Maybe DBProxyEndpointTargetRole
a} :: DBProxyEndpoint)

-- | Provides the VPC ID of the DB proxy endpoint.
dbProxyEndpoint_vpcId :: Lens.Lens' DBProxyEndpoint (Prelude.Maybe Prelude.Text)
dbProxyEndpoint_vpcId :: Lens' DBProxyEndpoint (Maybe Text)
dbProxyEndpoint_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBProxyEndpoint' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: DBProxyEndpoint
s@DBProxyEndpoint' {} Maybe Text
a -> DBProxyEndpoint
s {$sel:vpcId:DBProxyEndpoint' :: Maybe Text
vpcId = Maybe Text
a} :: DBProxyEndpoint)

-- | Provides a list of VPC security groups that the DB proxy endpoint
-- belongs to.
dbProxyEndpoint_vpcSecurityGroupIds :: Lens.Lens' DBProxyEndpoint (Prelude.Maybe [Prelude.Text])
dbProxyEndpoint_vpcSecurityGroupIds :: Lens' DBProxyEndpoint (Maybe [Text])
dbProxyEndpoint_vpcSecurityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBProxyEndpoint' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: DBProxyEndpoint
s@DBProxyEndpoint' {} Maybe [Text]
a -> DBProxyEndpoint
s {$sel:vpcSecurityGroupIds:DBProxyEndpoint' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: DBProxyEndpoint) 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 EC2 subnet IDs for the DB proxy endpoint.
dbProxyEndpoint_vpcSubnetIds :: Lens.Lens' DBProxyEndpoint (Prelude.Maybe [Prelude.Text])
dbProxyEndpoint_vpcSubnetIds :: Lens' DBProxyEndpoint (Maybe [Text])
dbProxyEndpoint_vpcSubnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBProxyEndpoint' {Maybe [Text]
vpcSubnetIds :: Maybe [Text]
$sel:vpcSubnetIds:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe [Text]
vpcSubnetIds} -> Maybe [Text]
vpcSubnetIds) (\s :: DBProxyEndpoint
s@DBProxyEndpoint' {} Maybe [Text]
a -> DBProxyEndpoint
s {$sel:vpcSubnetIds:DBProxyEndpoint' :: Maybe [Text]
vpcSubnetIds = Maybe [Text]
a} :: DBProxyEndpoint) 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

instance Data.FromXML DBProxyEndpoint where
  parseXML :: [Node] -> Either String DBProxyEndpoint
parseXML [Node]
x =
    Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe DBProxyEndpointStatus
-> Maybe DBProxyEndpointTargetRole
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> DBProxyEndpoint
DBProxyEndpoint'
      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
"CreatedDate")
      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
"DBProxyEndpointArn")
      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
"DBProxyEndpointName")
      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
"DBProxyName")
      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
"IsDefault")
      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.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TargetRole")
      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
"VpcId")
      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
"VpcSecurityGroupIds"
                      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
"VpcSubnetIds"
                      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")
                  )

instance Prelude.Hashable DBProxyEndpoint where
  hashWithSalt :: Int -> DBProxyEndpoint -> Int
hashWithSalt Int
_salt DBProxyEndpoint' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe ISO8601
Maybe DBProxyEndpointStatus
Maybe DBProxyEndpointTargetRole
vpcSubnetIds :: Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
vpcId :: Maybe Text
targetRole :: Maybe DBProxyEndpointTargetRole
status :: Maybe DBProxyEndpointStatus
isDefault :: Maybe Bool
endpoint :: Maybe Text
dbProxyName :: Maybe Text
dbProxyEndpointName :: Maybe Text
dbProxyEndpointArn :: Maybe Text
createdDate :: Maybe ISO8601
$sel:vpcSubnetIds:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe [Text]
$sel:vpcSecurityGroupIds:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe [Text]
$sel:vpcId:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
$sel:targetRole:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe DBProxyEndpointTargetRole
$sel:status:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe DBProxyEndpointStatus
$sel:isDefault:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Bool
$sel:endpoint:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
$sel:dbProxyName:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
$sel:dbProxyEndpointName:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
$sel:dbProxyEndpointArn:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
$sel:createdDate:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe ISO8601
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbProxyEndpointArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbProxyEndpointName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbProxyName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
endpoint
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isDefault
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DBProxyEndpointStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DBProxyEndpointTargetRole
targetRole
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
vpcSecurityGroupIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
vpcSubnetIds

instance Prelude.NFData DBProxyEndpoint where
  rnf :: DBProxyEndpoint -> ()
rnf DBProxyEndpoint' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe ISO8601
Maybe DBProxyEndpointStatus
Maybe DBProxyEndpointTargetRole
vpcSubnetIds :: Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
vpcId :: Maybe Text
targetRole :: Maybe DBProxyEndpointTargetRole
status :: Maybe DBProxyEndpointStatus
isDefault :: Maybe Bool
endpoint :: Maybe Text
dbProxyName :: Maybe Text
dbProxyEndpointName :: Maybe Text
dbProxyEndpointArn :: Maybe Text
createdDate :: Maybe ISO8601
$sel:vpcSubnetIds:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe [Text]
$sel:vpcSecurityGroupIds:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe [Text]
$sel:vpcId:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
$sel:targetRole:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe DBProxyEndpointTargetRole
$sel:status:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe DBProxyEndpointStatus
$sel:isDefault:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Bool
$sel:endpoint:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
$sel:dbProxyName:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
$sel:dbProxyEndpointName:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
$sel:dbProxyEndpointArn:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe Text
$sel:createdDate:DBProxyEndpoint' :: DBProxyEndpoint -> Maybe ISO8601
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbProxyEndpointArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbProxyEndpointName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbProxyName
      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 Bool
isDefault
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DBProxyEndpointStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DBProxyEndpointTargetRole
targetRole
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
vpcSecurityGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
vpcSubnetIds