{-# 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.RDS.RegisterDBProxyTargets
-- 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)
--
-- Associate one or more @DBProxyTarget@ data structures with a
-- @DBProxyTargetGroup@.
module Amazonka.RDS.RegisterDBProxyTargets
  ( -- * Creating a Request
    RegisterDBProxyTargets (..),
    newRegisterDBProxyTargets,

    -- * Request Lenses
    registerDBProxyTargets_dbClusterIdentifiers,
    registerDBProxyTargets_dbInstanceIdentifiers,
    registerDBProxyTargets_targetGroupName,
    registerDBProxyTargets_dbProxyName,

    -- * Destructuring the Response
    RegisterDBProxyTargetsResponse (..),
    newRegisterDBProxyTargetsResponse,

    -- * Response Lenses
    registerDBProxyTargetsResponse_dbProxyTargets,
    registerDBProxyTargetsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newRegisterDBProxyTargets' smart constructor.
data RegisterDBProxyTargets = RegisterDBProxyTargets'
  { -- | One or more DB cluster identifiers.
    RegisterDBProxyTargets -> Maybe [Text]
dbClusterIdentifiers :: Prelude.Maybe [Prelude.Text],
    -- | One or more DB instance identifiers.
    RegisterDBProxyTargets -> Maybe [Text]
dbInstanceIdentifiers :: Prelude.Maybe [Prelude.Text],
    -- | The identifier of the @DBProxyTargetGroup@.
    RegisterDBProxyTargets -> Maybe Text
targetGroupName :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the @DBProxy@ that is associated with the
    -- @DBProxyTargetGroup@.
    RegisterDBProxyTargets -> Text
dbProxyName :: Prelude.Text
  }
  deriving (RegisterDBProxyTargets -> RegisterDBProxyTargets -> Bool
(RegisterDBProxyTargets -> RegisterDBProxyTargets -> Bool)
-> (RegisterDBProxyTargets -> RegisterDBProxyTargets -> Bool)
-> Eq RegisterDBProxyTargets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterDBProxyTargets -> RegisterDBProxyTargets -> Bool
$c/= :: RegisterDBProxyTargets -> RegisterDBProxyTargets -> Bool
== :: RegisterDBProxyTargets -> RegisterDBProxyTargets -> Bool
$c== :: RegisterDBProxyTargets -> RegisterDBProxyTargets -> Bool
Prelude.Eq, ReadPrec [RegisterDBProxyTargets]
ReadPrec RegisterDBProxyTargets
Int -> ReadS RegisterDBProxyTargets
ReadS [RegisterDBProxyTargets]
(Int -> ReadS RegisterDBProxyTargets)
-> ReadS [RegisterDBProxyTargets]
-> ReadPrec RegisterDBProxyTargets
-> ReadPrec [RegisterDBProxyTargets]
-> Read RegisterDBProxyTargets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterDBProxyTargets]
$creadListPrec :: ReadPrec [RegisterDBProxyTargets]
readPrec :: ReadPrec RegisterDBProxyTargets
$creadPrec :: ReadPrec RegisterDBProxyTargets
readList :: ReadS [RegisterDBProxyTargets]
$creadList :: ReadS [RegisterDBProxyTargets]
readsPrec :: Int -> ReadS RegisterDBProxyTargets
$creadsPrec :: Int -> ReadS RegisterDBProxyTargets
Prelude.Read, Int -> RegisterDBProxyTargets -> ShowS
[RegisterDBProxyTargets] -> ShowS
RegisterDBProxyTargets -> String
(Int -> RegisterDBProxyTargets -> ShowS)
-> (RegisterDBProxyTargets -> String)
-> ([RegisterDBProxyTargets] -> ShowS)
-> Show RegisterDBProxyTargets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterDBProxyTargets] -> ShowS
$cshowList :: [RegisterDBProxyTargets] -> ShowS
show :: RegisterDBProxyTargets -> String
$cshow :: RegisterDBProxyTargets -> String
showsPrec :: Int -> RegisterDBProxyTargets -> ShowS
$cshowsPrec :: Int -> RegisterDBProxyTargets -> ShowS
Prelude.Show, (forall x. RegisterDBProxyTargets -> Rep RegisterDBProxyTargets x)
-> (forall x.
    Rep RegisterDBProxyTargets x -> RegisterDBProxyTargets)
-> Generic RegisterDBProxyTargets
forall x. Rep RegisterDBProxyTargets x -> RegisterDBProxyTargets
forall x. RegisterDBProxyTargets -> Rep RegisterDBProxyTargets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterDBProxyTargets x -> RegisterDBProxyTargets
$cfrom :: forall x. RegisterDBProxyTargets -> Rep RegisterDBProxyTargets x
Prelude.Generic)

-- |
-- Create a value of 'RegisterDBProxyTargets' 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:
--
-- 'dbClusterIdentifiers', 'registerDBProxyTargets_dbClusterIdentifiers' - One or more DB cluster identifiers.
--
-- 'dbInstanceIdentifiers', 'registerDBProxyTargets_dbInstanceIdentifiers' - One or more DB instance identifiers.
--
-- 'targetGroupName', 'registerDBProxyTargets_targetGroupName' - The identifier of the @DBProxyTargetGroup@.
--
-- 'dbProxyName', 'registerDBProxyTargets_dbProxyName' - The identifier of the @DBProxy@ that is associated with the
-- @DBProxyTargetGroup@.
newRegisterDBProxyTargets ::
  -- | 'dbProxyName'
  Prelude.Text ->
  RegisterDBProxyTargets
newRegisterDBProxyTargets :: Text -> RegisterDBProxyTargets
newRegisterDBProxyTargets Text
pDBProxyName_ =
  RegisterDBProxyTargets' :: Maybe [Text]
-> Maybe [Text] -> Maybe Text -> Text -> RegisterDBProxyTargets
RegisterDBProxyTargets'
    { $sel:dbClusterIdentifiers:RegisterDBProxyTargets' :: Maybe [Text]
dbClusterIdentifiers =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:dbInstanceIdentifiers:RegisterDBProxyTargets' :: Maybe [Text]
dbInstanceIdentifiers = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:targetGroupName:RegisterDBProxyTargets' :: Maybe Text
targetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbProxyName:RegisterDBProxyTargets' :: Text
dbProxyName = Text
pDBProxyName_
    }

-- | One or more DB cluster identifiers.
registerDBProxyTargets_dbClusterIdentifiers :: Lens.Lens' RegisterDBProxyTargets (Prelude.Maybe [Prelude.Text])
registerDBProxyTargets_dbClusterIdentifiers :: (Maybe [Text] -> f (Maybe [Text]))
-> RegisterDBProxyTargets -> f RegisterDBProxyTargets
registerDBProxyTargets_dbClusterIdentifiers = (RegisterDBProxyTargets -> Maybe [Text])
-> (RegisterDBProxyTargets
    -> Maybe [Text] -> RegisterDBProxyTargets)
-> Lens
     RegisterDBProxyTargets
     RegisterDBProxyTargets
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDBProxyTargets' {Maybe [Text]
dbClusterIdentifiers :: Maybe [Text]
$sel:dbClusterIdentifiers:RegisterDBProxyTargets' :: RegisterDBProxyTargets -> Maybe [Text]
dbClusterIdentifiers} -> Maybe [Text]
dbClusterIdentifiers) (\s :: RegisterDBProxyTargets
s@RegisterDBProxyTargets' {} Maybe [Text]
a -> RegisterDBProxyTargets
s {$sel:dbClusterIdentifiers:RegisterDBProxyTargets' :: Maybe [Text]
dbClusterIdentifiers = Maybe [Text]
a} :: RegisterDBProxyTargets) ((Maybe [Text] -> f (Maybe [Text]))
 -> RegisterDBProxyTargets -> f RegisterDBProxyTargets)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> RegisterDBProxyTargets
-> f RegisterDBProxyTargets
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

-- | One or more DB instance identifiers.
registerDBProxyTargets_dbInstanceIdentifiers :: Lens.Lens' RegisterDBProxyTargets (Prelude.Maybe [Prelude.Text])
registerDBProxyTargets_dbInstanceIdentifiers :: (Maybe [Text] -> f (Maybe [Text]))
-> RegisterDBProxyTargets -> f RegisterDBProxyTargets
registerDBProxyTargets_dbInstanceIdentifiers = (RegisterDBProxyTargets -> Maybe [Text])
-> (RegisterDBProxyTargets
    -> Maybe [Text] -> RegisterDBProxyTargets)
-> Lens
     RegisterDBProxyTargets
     RegisterDBProxyTargets
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDBProxyTargets' {Maybe [Text]
dbInstanceIdentifiers :: Maybe [Text]
$sel:dbInstanceIdentifiers:RegisterDBProxyTargets' :: RegisterDBProxyTargets -> Maybe [Text]
dbInstanceIdentifiers} -> Maybe [Text]
dbInstanceIdentifiers) (\s :: RegisterDBProxyTargets
s@RegisterDBProxyTargets' {} Maybe [Text]
a -> RegisterDBProxyTargets
s {$sel:dbInstanceIdentifiers:RegisterDBProxyTargets' :: Maybe [Text]
dbInstanceIdentifiers = Maybe [Text]
a} :: RegisterDBProxyTargets) ((Maybe [Text] -> f (Maybe [Text]))
 -> RegisterDBProxyTargets -> f RegisterDBProxyTargets)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> RegisterDBProxyTargets
-> f RegisterDBProxyTargets
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 identifier of the @DBProxyTargetGroup@.
registerDBProxyTargets_targetGroupName :: Lens.Lens' RegisterDBProxyTargets (Prelude.Maybe Prelude.Text)
registerDBProxyTargets_targetGroupName :: (Maybe Text -> f (Maybe Text))
-> RegisterDBProxyTargets -> f RegisterDBProxyTargets
registerDBProxyTargets_targetGroupName = (RegisterDBProxyTargets -> Maybe Text)
-> (RegisterDBProxyTargets -> Maybe Text -> RegisterDBProxyTargets)
-> Lens
     RegisterDBProxyTargets
     RegisterDBProxyTargets
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDBProxyTargets' {Maybe Text
targetGroupName :: Maybe Text
$sel:targetGroupName:RegisterDBProxyTargets' :: RegisterDBProxyTargets -> Maybe Text
targetGroupName} -> Maybe Text
targetGroupName) (\s :: RegisterDBProxyTargets
s@RegisterDBProxyTargets' {} Maybe Text
a -> RegisterDBProxyTargets
s {$sel:targetGroupName:RegisterDBProxyTargets' :: Maybe Text
targetGroupName = Maybe Text
a} :: RegisterDBProxyTargets)

-- | The identifier of the @DBProxy@ that is associated with the
-- @DBProxyTargetGroup@.
registerDBProxyTargets_dbProxyName :: Lens.Lens' RegisterDBProxyTargets Prelude.Text
registerDBProxyTargets_dbProxyName :: (Text -> f Text)
-> RegisterDBProxyTargets -> f RegisterDBProxyTargets
registerDBProxyTargets_dbProxyName = (RegisterDBProxyTargets -> Text)
-> (RegisterDBProxyTargets -> Text -> RegisterDBProxyTargets)
-> Lens RegisterDBProxyTargets RegisterDBProxyTargets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDBProxyTargets' {Text
dbProxyName :: Text
$sel:dbProxyName:RegisterDBProxyTargets' :: RegisterDBProxyTargets -> Text
dbProxyName} -> Text
dbProxyName) (\s :: RegisterDBProxyTargets
s@RegisterDBProxyTargets' {} Text
a -> RegisterDBProxyTargets
s {$sel:dbProxyName:RegisterDBProxyTargets' :: Text
dbProxyName = Text
a} :: RegisterDBProxyTargets)

instance Core.AWSRequest RegisterDBProxyTargets where
  type
    AWSResponse RegisterDBProxyTargets =
      RegisterDBProxyTargetsResponse
  request :: RegisterDBProxyTargets -> Request RegisterDBProxyTargets
request = Service -> RegisterDBProxyTargets -> Request RegisterDBProxyTargets
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy RegisterDBProxyTargets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RegisterDBProxyTargets)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse RegisterDBProxyTargets))
-> Logger
-> Service
-> Proxy RegisterDBProxyTargets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RegisterDBProxyTargets)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"RegisterDBProxyTargetsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [DBProxyTarget] -> Int -> RegisterDBProxyTargetsResponse
RegisterDBProxyTargetsResponse'
            (Maybe [DBProxyTarget] -> Int -> RegisterDBProxyTargetsResponse)
-> Either String (Maybe [DBProxyTarget])
-> Either String (Int -> RegisterDBProxyTargetsResponse)
forall (f :: * -> *) a b. Functor 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
"DBProxyTargets" 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 [DBProxyTarget]))
-> Either String (Maybe [DBProxyTarget])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [DBProxyTarget])
-> [Node] -> Either String (Maybe [DBProxyTarget])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [DBProxyTarget]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> RegisterDBProxyTargetsResponse)
-> Either String Int
-> Either String RegisterDBProxyTargetsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable RegisterDBProxyTargets

instance Prelude.NFData RegisterDBProxyTargets

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

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

instance Core.ToQuery RegisterDBProxyTargets where
  toQuery :: RegisterDBProxyTargets -> QueryString
toQuery RegisterDBProxyTargets' {Maybe [Text]
Maybe Text
Text
dbProxyName :: Text
targetGroupName :: Maybe Text
dbInstanceIdentifiers :: Maybe [Text]
dbClusterIdentifiers :: Maybe [Text]
$sel:dbProxyName:RegisterDBProxyTargets' :: RegisterDBProxyTargets -> Text
$sel:targetGroupName:RegisterDBProxyTargets' :: RegisterDBProxyTargets -> Maybe Text
$sel:dbInstanceIdentifiers:RegisterDBProxyTargets' :: RegisterDBProxyTargets -> Maybe [Text]
$sel:dbClusterIdentifiers:RegisterDBProxyTargets' :: RegisterDBProxyTargets -> Maybe [Text]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"RegisterDBProxyTargets" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"DBClusterIdentifiers"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
dbClusterIdentifiers
            ),
        ByteString
"DBInstanceIdentifiers"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
dbInstanceIdentifiers
            ),
        ByteString
"TargetGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
targetGroupName,
        ByteString
"DBProxyName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbProxyName
      ]

-- | /See:/ 'newRegisterDBProxyTargetsResponse' smart constructor.
data RegisterDBProxyTargetsResponse = RegisterDBProxyTargetsResponse'
  { -- | One or more @DBProxyTarget@ objects that are created when you register
    -- targets with a target group.
    RegisterDBProxyTargetsResponse -> Maybe [DBProxyTarget]
dbProxyTargets :: Prelude.Maybe [DBProxyTarget],
    -- | The response's http status code.
    RegisterDBProxyTargetsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RegisterDBProxyTargetsResponse
-> RegisterDBProxyTargetsResponse -> Bool
(RegisterDBProxyTargetsResponse
 -> RegisterDBProxyTargetsResponse -> Bool)
-> (RegisterDBProxyTargetsResponse
    -> RegisterDBProxyTargetsResponse -> Bool)
-> Eq RegisterDBProxyTargetsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterDBProxyTargetsResponse
-> RegisterDBProxyTargetsResponse -> Bool
$c/= :: RegisterDBProxyTargetsResponse
-> RegisterDBProxyTargetsResponse -> Bool
== :: RegisterDBProxyTargetsResponse
-> RegisterDBProxyTargetsResponse -> Bool
$c== :: RegisterDBProxyTargetsResponse
-> RegisterDBProxyTargetsResponse -> Bool
Prelude.Eq, ReadPrec [RegisterDBProxyTargetsResponse]
ReadPrec RegisterDBProxyTargetsResponse
Int -> ReadS RegisterDBProxyTargetsResponse
ReadS [RegisterDBProxyTargetsResponse]
(Int -> ReadS RegisterDBProxyTargetsResponse)
-> ReadS [RegisterDBProxyTargetsResponse]
-> ReadPrec RegisterDBProxyTargetsResponse
-> ReadPrec [RegisterDBProxyTargetsResponse]
-> Read RegisterDBProxyTargetsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterDBProxyTargetsResponse]
$creadListPrec :: ReadPrec [RegisterDBProxyTargetsResponse]
readPrec :: ReadPrec RegisterDBProxyTargetsResponse
$creadPrec :: ReadPrec RegisterDBProxyTargetsResponse
readList :: ReadS [RegisterDBProxyTargetsResponse]
$creadList :: ReadS [RegisterDBProxyTargetsResponse]
readsPrec :: Int -> ReadS RegisterDBProxyTargetsResponse
$creadsPrec :: Int -> ReadS RegisterDBProxyTargetsResponse
Prelude.Read, Int -> RegisterDBProxyTargetsResponse -> ShowS
[RegisterDBProxyTargetsResponse] -> ShowS
RegisterDBProxyTargetsResponse -> String
(Int -> RegisterDBProxyTargetsResponse -> ShowS)
-> (RegisterDBProxyTargetsResponse -> String)
-> ([RegisterDBProxyTargetsResponse] -> ShowS)
-> Show RegisterDBProxyTargetsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterDBProxyTargetsResponse] -> ShowS
$cshowList :: [RegisterDBProxyTargetsResponse] -> ShowS
show :: RegisterDBProxyTargetsResponse -> String
$cshow :: RegisterDBProxyTargetsResponse -> String
showsPrec :: Int -> RegisterDBProxyTargetsResponse -> ShowS
$cshowsPrec :: Int -> RegisterDBProxyTargetsResponse -> ShowS
Prelude.Show, (forall x.
 RegisterDBProxyTargetsResponse
 -> Rep RegisterDBProxyTargetsResponse x)
-> (forall x.
    Rep RegisterDBProxyTargetsResponse x
    -> RegisterDBProxyTargetsResponse)
-> Generic RegisterDBProxyTargetsResponse
forall x.
Rep RegisterDBProxyTargetsResponse x
-> RegisterDBProxyTargetsResponse
forall x.
RegisterDBProxyTargetsResponse
-> Rep RegisterDBProxyTargetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RegisterDBProxyTargetsResponse x
-> RegisterDBProxyTargetsResponse
$cfrom :: forall x.
RegisterDBProxyTargetsResponse
-> Rep RegisterDBProxyTargetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'RegisterDBProxyTargetsResponse' 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:
--
-- 'dbProxyTargets', 'registerDBProxyTargetsResponse_dbProxyTargets' - One or more @DBProxyTarget@ objects that are created when you register
-- targets with a target group.
--
-- 'httpStatus', 'registerDBProxyTargetsResponse_httpStatus' - The response's http status code.
newRegisterDBProxyTargetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RegisterDBProxyTargetsResponse
newRegisterDBProxyTargetsResponse :: Int -> RegisterDBProxyTargetsResponse
newRegisterDBProxyTargetsResponse Int
pHttpStatus_ =
  RegisterDBProxyTargetsResponse' :: Maybe [DBProxyTarget] -> Int -> RegisterDBProxyTargetsResponse
RegisterDBProxyTargetsResponse'
    { $sel:dbProxyTargets:RegisterDBProxyTargetsResponse' :: Maybe [DBProxyTarget]
dbProxyTargets =
        Maybe [DBProxyTarget]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RegisterDBProxyTargetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | One or more @DBProxyTarget@ objects that are created when you register
-- targets with a target group.
registerDBProxyTargetsResponse_dbProxyTargets :: Lens.Lens' RegisterDBProxyTargetsResponse (Prelude.Maybe [DBProxyTarget])
registerDBProxyTargetsResponse_dbProxyTargets :: (Maybe [DBProxyTarget] -> f (Maybe [DBProxyTarget]))
-> RegisterDBProxyTargetsResponse
-> f RegisterDBProxyTargetsResponse
registerDBProxyTargetsResponse_dbProxyTargets = (RegisterDBProxyTargetsResponse -> Maybe [DBProxyTarget])
-> (RegisterDBProxyTargetsResponse
    -> Maybe [DBProxyTarget] -> RegisterDBProxyTargetsResponse)
-> Lens
     RegisterDBProxyTargetsResponse
     RegisterDBProxyTargetsResponse
     (Maybe [DBProxyTarget])
     (Maybe [DBProxyTarget])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterDBProxyTargetsResponse' {Maybe [DBProxyTarget]
dbProxyTargets :: Maybe [DBProxyTarget]
$sel:dbProxyTargets:RegisterDBProxyTargetsResponse' :: RegisterDBProxyTargetsResponse -> Maybe [DBProxyTarget]
dbProxyTargets} -> Maybe [DBProxyTarget]
dbProxyTargets) (\s :: RegisterDBProxyTargetsResponse
s@RegisterDBProxyTargetsResponse' {} Maybe [DBProxyTarget]
a -> RegisterDBProxyTargetsResponse
s {$sel:dbProxyTargets:RegisterDBProxyTargetsResponse' :: Maybe [DBProxyTarget]
dbProxyTargets = Maybe [DBProxyTarget]
a} :: RegisterDBProxyTargetsResponse) ((Maybe [DBProxyTarget] -> f (Maybe [DBProxyTarget]))
 -> RegisterDBProxyTargetsResponse
 -> f RegisterDBProxyTargetsResponse)
-> ((Maybe [DBProxyTarget] -> f (Maybe [DBProxyTarget]))
    -> Maybe [DBProxyTarget] -> f (Maybe [DBProxyTarget]))
-> (Maybe [DBProxyTarget] -> f (Maybe [DBProxyTarget]))
-> RegisterDBProxyTargetsResponse
-> f RegisterDBProxyTargetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DBProxyTarget] [DBProxyTarget] [DBProxyTarget] [DBProxyTarget]
-> Iso
     (Maybe [DBProxyTarget])
     (Maybe [DBProxyTarget])
     (Maybe [DBProxyTarget])
     (Maybe [DBProxyTarget])
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
  [DBProxyTarget] [DBProxyTarget] [DBProxyTarget] [DBProxyTarget]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    RegisterDBProxyTargetsResponse