{-# 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.ModifyDBProxyEndpoint
-- 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)
--
-- Changes the settings for an existing DB proxy endpoint.
module Amazonka.RDS.ModifyDBProxyEndpoint
  ( -- * Creating a Request
    ModifyDBProxyEndpoint (..),
    newModifyDBProxyEndpoint,

    -- * Request Lenses
    modifyDBProxyEndpoint_vpcSecurityGroupIds,
    modifyDBProxyEndpoint_newDBProxyEndpointName,
    modifyDBProxyEndpoint_dbProxyEndpointName,

    -- * Destructuring the Response
    ModifyDBProxyEndpointResponse (..),
    newModifyDBProxyEndpointResponse,

    -- * Response Lenses
    modifyDBProxyEndpointResponse_dbProxyEndpoint,
    modifyDBProxyEndpointResponse_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:/ 'newModifyDBProxyEndpoint' smart constructor.
data ModifyDBProxyEndpoint = ModifyDBProxyEndpoint'
  { -- | The VPC security group IDs for the DB proxy endpoint. When the DB proxy
    -- endpoint uses a different VPC than the original proxy, you also specify
    -- a different set of security group IDs than for the original proxy.
    ModifyDBProxyEndpoint -> Maybe [Text]
vpcSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | The new identifier for the @DBProxyEndpoint@. 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.
    ModifyDBProxyEndpoint -> Maybe Text
newDBProxyEndpointName' :: Prelude.Maybe Prelude.Text,
    -- | The name of the DB proxy sociated with the DB proxy endpoint that you
    -- want to modify.
    ModifyDBProxyEndpoint -> Text
dbProxyEndpointName :: Prelude.Text
  }
  deriving (ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool
(ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool)
-> (ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool)
-> Eq ModifyDBProxyEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool
$c/= :: ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool
== :: ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool
$c== :: ModifyDBProxyEndpoint -> ModifyDBProxyEndpoint -> Bool
Prelude.Eq, ReadPrec [ModifyDBProxyEndpoint]
ReadPrec ModifyDBProxyEndpoint
Int -> ReadS ModifyDBProxyEndpoint
ReadS [ModifyDBProxyEndpoint]
(Int -> ReadS ModifyDBProxyEndpoint)
-> ReadS [ModifyDBProxyEndpoint]
-> ReadPrec ModifyDBProxyEndpoint
-> ReadPrec [ModifyDBProxyEndpoint]
-> Read ModifyDBProxyEndpoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyDBProxyEndpoint]
$creadListPrec :: ReadPrec [ModifyDBProxyEndpoint]
readPrec :: ReadPrec ModifyDBProxyEndpoint
$creadPrec :: ReadPrec ModifyDBProxyEndpoint
readList :: ReadS [ModifyDBProxyEndpoint]
$creadList :: ReadS [ModifyDBProxyEndpoint]
readsPrec :: Int -> ReadS ModifyDBProxyEndpoint
$creadsPrec :: Int -> ReadS ModifyDBProxyEndpoint
Prelude.Read, Int -> ModifyDBProxyEndpoint -> ShowS
[ModifyDBProxyEndpoint] -> ShowS
ModifyDBProxyEndpoint -> String
(Int -> ModifyDBProxyEndpoint -> ShowS)
-> (ModifyDBProxyEndpoint -> String)
-> ([ModifyDBProxyEndpoint] -> ShowS)
-> Show ModifyDBProxyEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyDBProxyEndpoint] -> ShowS
$cshowList :: [ModifyDBProxyEndpoint] -> ShowS
show :: ModifyDBProxyEndpoint -> String
$cshow :: ModifyDBProxyEndpoint -> String
showsPrec :: Int -> ModifyDBProxyEndpoint -> ShowS
$cshowsPrec :: Int -> ModifyDBProxyEndpoint -> ShowS
Prelude.Show, (forall x. ModifyDBProxyEndpoint -> Rep ModifyDBProxyEndpoint x)
-> (forall x. Rep ModifyDBProxyEndpoint x -> ModifyDBProxyEndpoint)
-> Generic ModifyDBProxyEndpoint
forall x. Rep ModifyDBProxyEndpoint x -> ModifyDBProxyEndpoint
forall x. ModifyDBProxyEndpoint -> Rep ModifyDBProxyEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyDBProxyEndpoint x -> ModifyDBProxyEndpoint
$cfrom :: forall x. ModifyDBProxyEndpoint -> Rep ModifyDBProxyEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'ModifyDBProxyEndpoint' 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:
--
-- 'vpcSecurityGroupIds', 'modifyDBProxyEndpoint_vpcSecurityGroupIds' - The VPC security group IDs for the DB proxy endpoint. When the DB proxy
-- endpoint uses a different VPC than the original proxy, you also specify
-- a different set of security group IDs than for the original proxy.
--
-- 'newDBProxyEndpointName'', 'modifyDBProxyEndpoint_newDBProxyEndpointName' - The new identifier for the @DBProxyEndpoint@. 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.
--
-- 'dbProxyEndpointName', 'modifyDBProxyEndpoint_dbProxyEndpointName' - The name of the DB proxy sociated with the DB proxy endpoint that you
-- want to modify.
newModifyDBProxyEndpoint ::
  -- | 'dbProxyEndpointName'
  Prelude.Text ->
  ModifyDBProxyEndpoint
newModifyDBProxyEndpoint :: Text -> ModifyDBProxyEndpoint
newModifyDBProxyEndpoint Text
pDBProxyEndpointName_ =
  ModifyDBProxyEndpoint' :: Maybe [Text] -> Maybe Text -> Text -> ModifyDBProxyEndpoint
ModifyDBProxyEndpoint'
    { $sel:vpcSecurityGroupIds:ModifyDBProxyEndpoint' :: Maybe [Text]
vpcSecurityGroupIds =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:newDBProxyEndpointName':ModifyDBProxyEndpoint' :: Maybe Text
newDBProxyEndpointName' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbProxyEndpointName:ModifyDBProxyEndpoint' :: Text
dbProxyEndpointName = Text
pDBProxyEndpointName_
    }

-- | The VPC security group IDs for the DB proxy endpoint. When the DB proxy
-- endpoint uses a different VPC than the original proxy, you also specify
-- a different set of security group IDs than for the original proxy.
modifyDBProxyEndpoint_vpcSecurityGroupIds :: Lens.Lens' ModifyDBProxyEndpoint (Prelude.Maybe [Prelude.Text])
modifyDBProxyEndpoint_vpcSecurityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyDBProxyEndpoint -> f ModifyDBProxyEndpoint
modifyDBProxyEndpoint_vpcSecurityGroupIds = (ModifyDBProxyEndpoint -> Maybe [Text])
-> (ModifyDBProxyEndpoint -> Maybe [Text] -> ModifyDBProxyEndpoint)
-> Lens
     ModifyDBProxyEndpoint
     ModifyDBProxyEndpoint
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBProxyEndpoint' {Maybe [Text]
vpcSecurityGroupIds :: Maybe [Text]
$sel:vpcSecurityGroupIds:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe [Text]
vpcSecurityGroupIds} -> Maybe [Text]
vpcSecurityGroupIds) (\s :: ModifyDBProxyEndpoint
s@ModifyDBProxyEndpoint' {} Maybe [Text]
a -> ModifyDBProxyEndpoint
s {$sel:vpcSecurityGroupIds:ModifyDBProxyEndpoint' :: Maybe [Text]
vpcSecurityGroupIds = Maybe [Text]
a} :: ModifyDBProxyEndpoint) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyDBProxyEndpoint -> f ModifyDBProxyEndpoint)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyDBProxyEndpoint
-> f ModifyDBProxyEndpoint
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 new identifier for the @DBProxyEndpoint@. 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.
modifyDBProxyEndpoint_newDBProxyEndpointName :: Lens.Lens' ModifyDBProxyEndpoint (Prelude.Maybe Prelude.Text)
modifyDBProxyEndpoint_newDBProxyEndpointName :: (Maybe Text -> f (Maybe Text))
-> ModifyDBProxyEndpoint -> f ModifyDBProxyEndpoint
modifyDBProxyEndpoint_newDBProxyEndpointName = (ModifyDBProxyEndpoint -> Maybe Text)
-> (ModifyDBProxyEndpoint -> Maybe Text -> ModifyDBProxyEndpoint)
-> Lens
     ModifyDBProxyEndpoint
     ModifyDBProxyEndpoint
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBProxyEndpoint' {Maybe Text
newDBProxyEndpointName' :: Maybe Text
$sel:newDBProxyEndpointName':ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe Text
newDBProxyEndpointName'} -> Maybe Text
newDBProxyEndpointName') (\s :: ModifyDBProxyEndpoint
s@ModifyDBProxyEndpoint' {} Maybe Text
a -> ModifyDBProxyEndpoint
s {$sel:newDBProxyEndpointName':ModifyDBProxyEndpoint' :: Maybe Text
newDBProxyEndpointName' = Maybe Text
a} :: ModifyDBProxyEndpoint)

-- | The name of the DB proxy sociated with the DB proxy endpoint that you
-- want to modify.
modifyDBProxyEndpoint_dbProxyEndpointName :: Lens.Lens' ModifyDBProxyEndpoint Prelude.Text
modifyDBProxyEndpoint_dbProxyEndpointName :: (Text -> f Text)
-> ModifyDBProxyEndpoint -> f ModifyDBProxyEndpoint
modifyDBProxyEndpoint_dbProxyEndpointName = (ModifyDBProxyEndpoint -> Text)
-> (ModifyDBProxyEndpoint -> Text -> ModifyDBProxyEndpoint)
-> Lens ModifyDBProxyEndpoint ModifyDBProxyEndpoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBProxyEndpoint' {Text
dbProxyEndpointName :: Text
$sel:dbProxyEndpointName:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Text
dbProxyEndpointName} -> Text
dbProxyEndpointName) (\s :: ModifyDBProxyEndpoint
s@ModifyDBProxyEndpoint' {} Text
a -> ModifyDBProxyEndpoint
s {$sel:dbProxyEndpointName:ModifyDBProxyEndpoint' :: Text
dbProxyEndpointName = Text
a} :: ModifyDBProxyEndpoint)

instance Core.AWSRequest ModifyDBProxyEndpoint where
  type
    AWSResponse ModifyDBProxyEndpoint =
      ModifyDBProxyEndpointResponse
  request :: ModifyDBProxyEndpoint -> Request ModifyDBProxyEndpoint
request = Service -> ModifyDBProxyEndpoint -> Request ModifyDBProxyEndpoint
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifyDBProxyEndpoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyDBProxyEndpoint)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ModifyDBProxyEndpoint))
-> Logger
-> Service
-> Proxy ModifyDBProxyEndpoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyDBProxyEndpoint)))
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
"ModifyDBProxyEndpointResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe DBProxyEndpoint -> Int -> ModifyDBProxyEndpointResponse
ModifyDBProxyEndpointResponse'
            (Maybe DBProxyEndpoint -> Int -> ModifyDBProxyEndpointResponse)
-> Either String (Maybe DBProxyEndpoint)
-> Either String (Int -> ModifyDBProxyEndpointResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe DBProxyEndpoint)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBProxyEndpoint")
            Either String (Int -> ModifyDBProxyEndpointResponse)
-> Either String Int -> Either String ModifyDBProxyEndpointResponse
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 ModifyDBProxyEndpoint

instance Prelude.NFData ModifyDBProxyEndpoint

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

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

instance Core.ToQuery ModifyDBProxyEndpoint where
  toQuery :: ModifyDBProxyEndpoint -> QueryString
toQuery ModifyDBProxyEndpoint' {Maybe [Text]
Maybe Text
Text
dbProxyEndpointName :: Text
newDBProxyEndpointName' :: Maybe Text
vpcSecurityGroupIds :: Maybe [Text]
$sel:dbProxyEndpointName:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Text
$sel:newDBProxyEndpointName':ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> Maybe Text
$sel:vpcSecurityGroupIds:ModifyDBProxyEndpoint' :: ModifyDBProxyEndpoint -> 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
"ModifyDBProxyEndpoint" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"VpcSecurityGroupIds"
          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]
vpcSecurityGroupIds
            ),
        ByteString
"NewDBProxyEndpointName"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
newDBProxyEndpointName',
        ByteString
"DBProxyEndpointName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbProxyEndpointName
      ]

-- | /See:/ 'newModifyDBProxyEndpointResponse' smart constructor.
data ModifyDBProxyEndpointResponse = ModifyDBProxyEndpointResponse'
  { -- | The @DBProxyEndpoint@ object representing the new settings for the DB
    -- proxy endpoint.
    ModifyDBProxyEndpointResponse -> Maybe DBProxyEndpoint
dbProxyEndpoint :: Prelude.Maybe DBProxyEndpoint,
    -- | The response's http status code.
    ModifyDBProxyEndpointResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ModifyDBProxyEndpointResponse
-> ModifyDBProxyEndpointResponse -> Bool
(ModifyDBProxyEndpointResponse
 -> ModifyDBProxyEndpointResponse -> Bool)
-> (ModifyDBProxyEndpointResponse
    -> ModifyDBProxyEndpointResponse -> Bool)
-> Eq ModifyDBProxyEndpointResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyDBProxyEndpointResponse
-> ModifyDBProxyEndpointResponse -> Bool
$c/= :: ModifyDBProxyEndpointResponse
-> ModifyDBProxyEndpointResponse -> Bool
== :: ModifyDBProxyEndpointResponse
-> ModifyDBProxyEndpointResponse -> Bool
$c== :: ModifyDBProxyEndpointResponse
-> ModifyDBProxyEndpointResponse -> Bool
Prelude.Eq, ReadPrec [ModifyDBProxyEndpointResponse]
ReadPrec ModifyDBProxyEndpointResponse
Int -> ReadS ModifyDBProxyEndpointResponse
ReadS [ModifyDBProxyEndpointResponse]
(Int -> ReadS ModifyDBProxyEndpointResponse)
-> ReadS [ModifyDBProxyEndpointResponse]
-> ReadPrec ModifyDBProxyEndpointResponse
-> ReadPrec [ModifyDBProxyEndpointResponse]
-> Read ModifyDBProxyEndpointResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyDBProxyEndpointResponse]
$creadListPrec :: ReadPrec [ModifyDBProxyEndpointResponse]
readPrec :: ReadPrec ModifyDBProxyEndpointResponse
$creadPrec :: ReadPrec ModifyDBProxyEndpointResponse
readList :: ReadS [ModifyDBProxyEndpointResponse]
$creadList :: ReadS [ModifyDBProxyEndpointResponse]
readsPrec :: Int -> ReadS ModifyDBProxyEndpointResponse
$creadsPrec :: Int -> ReadS ModifyDBProxyEndpointResponse
Prelude.Read, Int -> ModifyDBProxyEndpointResponse -> ShowS
[ModifyDBProxyEndpointResponse] -> ShowS
ModifyDBProxyEndpointResponse -> String
(Int -> ModifyDBProxyEndpointResponse -> ShowS)
-> (ModifyDBProxyEndpointResponse -> String)
-> ([ModifyDBProxyEndpointResponse] -> ShowS)
-> Show ModifyDBProxyEndpointResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyDBProxyEndpointResponse] -> ShowS
$cshowList :: [ModifyDBProxyEndpointResponse] -> ShowS
show :: ModifyDBProxyEndpointResponse -> String
$cshow :: ModifyDBProxyEndpointResponse -> String
showsPrec :: Int -> ModifyDBProxyEndpointResponse -> ShowS
$cshowsPrec :: Int -> ModifyDBProxyEndpointResponse -> ShowS
Prelude.Show, (forall x.
 ModifyDBProxyEndpointResponse
 -> Rep ModifyDBProxyEndpointResponse x)
-> (forall x.
    Rep ModifyDBProxyEndpointResponse x
    -> ModifyDBProxyEndpointResponse)
-> Generic ModifyDBProxyEndpointResponse
forall x.
Rep ModifyDBProxyEndpointResponse x
-> ModifyDBProxyEndpointResponse
forall x.
ModifyDBProxyEndpointResponse
-> Rep ModifyDBProxyEndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyDBProxyEndpointResponse x
-> ModifyDBProxyEndpointResponse
$cfrom :: forall x.
ModifyDBProxyEndpointResponse
-> Rep ModifyDBProxyEndpointResponse x
Prelude.Generic)

-- |
-- Create a value of 'ModifyDBProxyEndpointResponse' 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:
--
-- 'dbProxyEndpoint', 'modifyDBProxyEndpointResponse_dbProxyEndpoint' - The @DBProxyEndpoint@ object representing the new settings for the DB
-- proxy endpoint.
--
-- 'httpStatus', 'modifyDBProxyEndpointResponse_httpStatus' - The response's http status code.
newModifyDBProxyEndpointResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifyDBProxyEndpointResponse
newModifyDBProxyEndpointResponse :: Int -> ModifyDBProxyEndpointResponse
newModifyDBProxyEndpointResponse Int
pHttpStatus_ =
  ModifyDBProxyEndpointResponse' :: Maybe DBProxyEndpoint -> Int -> ModifyDBProxyEndpointResponse
ModifyDBProxyEndpointResponse'
    { $sel:dbProxyEndpoint:ModifyDBProxyEndpointResponse' :: Maybe DBProxyEndpoint
dbProxyEndpoint =
        Maybe DBProxyEndpoint
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ModifyDBProxyEndpointResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The @DBProxyEndpoint@ object representing the new settings for the DB
-- proxy endpoint.
modifyDBProxyEndpointResponse_dbProxyEndpoint :: Lens.Lens' ModifyDBProxyEndpointResponse (Prelude.Maybe DBProxyEndpoint)
modifyDBProxyEndpointResponse_dbProxyEndpoint :: (Maybe DBProxyEndpoint -> f (Maybe DBProxyEndpoint))
-> ModifyDBProxyEndpointResponse -> f ModifyDBProxyEndpointResponse
modifyDBProxyEndpointResponse_dbProxyEndpoint = (ModifyDBProxyEndpointResponse -> Maybe DBProxyEndpoint)
-> (ModifyDBProxyEndpointResponse
    -> Maybe DBProxyEndpoint -> ModifyDBProxyEndpointResponse)
-> Lens
     ModifyDBProxyEndpointResponse
     ModifyDBProxyEndpointResponse
     (Maybe DBProxyEndpoint)
     (Maybe DBProxyEndpoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyDBProxyEndpointResponse' {Maybe DBProxyEndpoint
dbProxyEndpoint :: Maybe DBProxyEndpoint
$sel:dbProxyEndpoint:ModifyDBProxyEndpointResponse' :: ModifyDBProxyEndpointResponse -> Maybe DBProxyEndpoint
dbProxyEndpoint} -> Maybe DBProxyEndpoint
dbProxyEndpoint) (\s :: ModifyDBProxyEndpointResponse
s@ModifyDBProxyEndpointResponse' {} Maybe DBProxyEndpoint
a -> ModifyDBProxyEndpointResponse
s {$sel:dbProxyEndpoint:ModifyDBProxyEndpointResponse' :: Maybe DBProxyEndpoint
dbProxyEndpoint = Maybe DBProxyEndpoint
a} :: ModifyDBProxyEndpointResponse)

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

instance Prelude.NFData ModifyDBProxyEndpointResponse