{-# 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.RevokeDBSecurityGroupIngress
-- 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)
--
-- Revokes ingress from a DBSecurityGroup for previously authorized IP
-- ranges or EC2 or VPC security groups. Required parameters for this API
-- are one of CIDRIP, EC2SecurityGroupId for VPC, or
-- (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or
-- EC2SecurityGroupId).
module Amazonka.RDS.RevokeDBSecurityGroupIngress
  ( -- * Creating a Request
    RevokeDBSecurityGroupIngress (..),
    newRevokeDBSecurityGroupIngress,

    -- * Request Lenses
    revokeDBSecurityGroupIngress_eC2SecurityGroupOwnerId,
    revokeDBSecurityGroupIngress_eC2SecurityGroupName,
    revokeDBSecurityGroupIngress_cidrip,
    revokeDBSecurityGroupIngress_eC2SecurityGroupId,
    revokeDBSecurityGroupIngress_dbSecurityGroupName,

    -- * Destructuring the Response
    RevokeDBSecurityGroupIngressResponse (..),
    newRevokeDBSecurityGroupIngressResponse,

    -- * Response Lenses
    revokeDBSecurityGroupIngressResponse_dbSecurityGroup,
    revokeDBSecurityGroupIngressResponse_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:/ 'newRevokeDBSecurityGroupIngress' smart constructor.
data RevokeDBSecurityGroupIngress = RevokeDBSecurityGroupIngress'
  { -- | The Amazon Web Services account number of the owner of the EC2 security
    -- group specified in the @EC2SecurityGroupName@ parameter. The Amazon Web
    -- Services access key ID isn\'t an acceptable value. For VPC DB security
    -- groups, @EC2SecurityGroupId@ must be provided. Otherwise,
    -- EC2SecurityGroupOwnerId and either @EC2SecurityGroupName@ or
    -- @EC2SecurityGroupId@ must be provided.
    RevokeDBSecurityGroupIngress -> Maybe Text
eC2SecurityGroupOwnerId :: Prelude.Maybe Prelude.Text,
    -- | The name of the EC2 security group to revoke access from. For VPC DB
    -- security groups, @EC2SecurityGroupId@ must be provided. Otherwise,
    -- EC2SecurityGroupOwnerId and either @EC2SecurityGroupName@ or
    -- @EC2SecurityGroupId@ must be provided.
    RevokeDBSecurityGroupIngress -> Maybe Text
eC2SecurityGroupName :: Prelude.Maybe Prelude.Text,
    -- | The IP range to revoke access from. Must be a valid CIDR range. If
    -- @CIDRIP@ is specified, @EC2SecurityGroupName@, @EC2SecurityGroupId@ and
    -- @EC2SecurityGroupOwnerId@ can\'t be provided.
    RevokeDBSecurityGroupIngress -> Maybe Text
cidrip :: Prelude.Maybe Prelude.Text,
    -- | The id of the EC2 security group to revoke access from. For VPC DB
    -- security groups, @EC2SecurityGroupId@ must be provided. Otherwise,
    -- EC2SecurityGroupOwnerId and either @EC2SecurityGroupName@ or
    -- @EC2SecurityGroupId@ must be provided.
    RevokeDBSecurityGroupIngress -> Maybe Text
eC2SecurityGroupId :: Prelude.Maybe Prelude.Text,
    -- | The name of the DB security group to revoke ingress from.
    RevokeDBSecurityGroupIngress -> Text
dbSecurityGroupName :: Prelude.Text
  }
  deriving (RevokeDBSecurityGroupIngress
-> RevokeDBSecurityGroupIngress -> Bool
(RevokeDBSecurityGroupIngress
 -> RevokeDBSecurityGroupIngress -> Bool)
-> (RevokeDBSecurityGroupIngress
    -> RevokeDBSecurityGroupIngress -> Bool)
-> Eq RevokeDBSecurityGroupIngress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevokeDBSecurityGroupIngress
-> RevokeDBSecurityGroupIngress -> Bool
$c/= :: RevokeDBSecurityGroupIngress
-> RevokeDBSecurityGroupIngress -> Bool
== :: RevokeDBSecurityGroupIngress
-> RevokeDBSecurityGroupIngress -> Bool
$c== :: RevokeDBSecurityGroupIngress
-> RevokeDBSecurityGroupIngress -> Bool
Prelude.Eq, ReadPrec [RevokeDBSecurityGroupIngress]
ReadPrec RevokeDBSecurityGroupIngress
Int -> ReadS RevokeDBSecurityGroupIngress
ReadS [RevokeDBSecurityGroupIngress]
(Int -> ReadS RevokeDBSecurityGroupIngress)
-> ReadS [RevokeDBSecurityGroupIngress]
-> ReadPrec RevokeDBSecurityGroupIngress
-> ReadPrec [RevokeDBSecurityGroupIngress]
-> Read RevokeDBSecurityGroupIngress
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevokeDBSecurityGroupIngress]
$creadListPrec :: ReadPrec [RevokeDBSecurityGroupIngress]
readPrec :: ReadPrec RevokeDBSecurityGroupIngress
$creadPrec :: ReadPrec RevokeDBSecurityGroupIngress
readList :: ReadS [RevokeDBSecurityGroupIngress]
$creadList :: ReadS [RevokeDBSecurityGroupIngress]
readsPrec :: Int -> ReadS RevokeDBSecurityGroupIngress
$creadsPrec :: Int -> ReadS RevokeDBSecurityGroupIngress
Prelude.Read, Int -> RevokeDBSecurityGroupIngress -> ShowS
[RevokeDBSecurityGroupIngress] -> ShowS
RevokeDBSecurityGroupIngress -> String
(Int -> RevokeDBSecurityGroupIngress -> ShowS)
-> (RevokeDBSecurityGroupIngress -> String)
-> ([RevokeDBSecurityGroupIngress] -> ShowS)
-> Show RevokeDBSecurityGroupIngress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevokeDBSecurityGroupIngress] -> ShowS
$cshowList :: [RevokeDBSecurityGroupIngress] -> ShowS
show :: RevokeDBSecurityGroupIngress -> String
$cshow :: RevokeDBSecurityGroupIngress -> String
showsPrec :: Int -> RevokeDBSecurityGroupIngress -> ShowS
$cshowsPrec :: Int -> RevokeDBSecurityGroupIngress -> ShowS
Prelude.Show, (forall x.
 RevokeDBSecurityGroupIngress -> Rep RevokeDBSecurityGroupIngress x)
-> (forall x.
    Rep RevokeDBSecurityGroupIngress x -> RevokeDBSecurityGroupIngress)
-> Generic RevokeDBSecurityGroupIngress
forall x.
Rep RevokeDBSecurityGroupIngress x -> RevokeDBSecurityGroupIngress
forall x.
RevokeDBSecurityGroupIngress -> Rep RevokeDBSecurityGroupIngress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RevokeDBSecurityGroupIngress x -> RevokeDBSecurityGroupIngress
$cfrom :: forall x.
RevokeDBSecurityGroupIngress -> Rep RevokeDBSecurityGroupIngress x
Prelude.Generic)

-- |
-- Create a value of 'RevokeDBSecurityGroupIngress' 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:
--
-- 'eC2SecurityGroupOwnerId', 'revokeDBSecurityGroupIngress_eC2SecurityGroupOwnerId' - The Amazon Web Services account number of the owner of the EC2 security
-- group specified in the @EC2SecurityGroupName@ parameter. The Amazon Web
-- Services access key ID isn\'t an acceptable value. For VPC DB security
-- groups, @EC2SecurityGroupId@ must be provided. Otherwise,
-- EC2SecurityGroupOwnerId and either @EC2SecurityGroupName@ or
-- @EC2SecurityGroupId@ must be provided.
--
-- 'eC2SecurityGroupName', 'revokeDBSecurityGroupIngress_eC2SecurityGroupName' - The name of the EC2 security group to revoke access from. For VPC DB
-- security groups, @EC2SecurityGroupId@ must be provided. Otherwise,
-- EC2SecurityGroupOwnerId and either @EC2SecurityGroupName@ or
-- @EC2SecurityGroupId@ must be provided.
--
-- 'cidrip', 'revokeDBSecurityGroupIngress_cidrip' - The IP range to revoke access from. Must be a valid CIDR range. If
-- @CIDRIP@ is specified, @EC2SecurityGroupName@, @EC2SecurityGroupId@ and
-- @EC2SecurityGroupOwnerId@ can\'t be provided.
--
-- 'eC2SecurityGroupId', 'revokeDBSecurityGroupIngress_eC2SecurityGroupId' - The id of the EC2 security group to revoke access from. For VPC DB
-- security groups, @EC2SecurityGroupId@ must be provided. Otherwise,
-- EC2SecurityGroupOwnerId and either @EC2SecurityGroupName@ or
-- @EC2SecurityGroupId@ must be provided.
--
-- 'dbSecurityGroupName', 'revokeDBSecurityGroupIngress_dbSecurityGroupName' - The name of the DB security group to revoke ingress from.
newRevokeDBSecurityGroupIngress ::
  -- | 'dbSecurityGroupName'
  Prelude.Text ->
  RevokeDBSecurityGroupIngress
newRevokeDBSecurityGroupIngress :: Text -> RevokeDBSecurityGroupIngress
newRevokeDBSecurityGroupIngress Text
pDBSecurityGroupName_ =
  RevokeDBSecurityGroupIngress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> RevokeDBSecurityGroupIngress
RevokeDBSecurityGroupIngress'
    { $sel:eC2SecurityGroupOwnerId:RevokeDBSecurityGroupIngress' :: Maybe Text
eC2SecurityGroupOwnerId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eC2SecurityGroupName:RevokeDBSecurityGroupIngress' :: Maybe Text
eC2SecurityGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cidrip:RevokeDBSecurityGroupIngress' :: Maybe Text
cidrip = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eC2SecurityGroupId:RevokeDBSecurityGroupIngress' :: Maybe Text
eC2SecurityGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbSecurityGroupName:RevokeDBSecurityGroupIngress' :: Text
dbSecurityGroupName = Text
pDBSecurityGroupName_
    }

-- | The Amazon Web Services account number of the owner of the EC2 security
-- group specified in the @EC2SecurityGroupName@ parameter. The Amazon Web
-- Services access key ID isn\'t an acceptable value. For VPC DB security
-- groups, @EC2SecurityGroupId@ must be provided. Otherwise,
-- EC2SecurityGroupOwnerId and either @EC2SecurityGroupName@ or
-- @EC2SecurityGroupId@ must be provided.
revokeDBSecurityGroupIngress_eC2SecurityGroupOwnerId :: Lens.Lens' RevokeDBSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeDBSecurityGroupIngress_eC2SecurityGroupOwnerId :: (Maybe Text -> f (Maybe Text))
-> RevokeDBSecurityGroupIngress -> f RevokeDBSecurityGroupIngress
revokeDBSecurityGroupIngress_eC2SecurityGroupOwnerId = (RevokeDBSecurityGroupIngress -> Maybe Text)
-> (RevokeDBSecurityGroupIngress
    -> Maybe Text -> RevokeDBSecurityGroupIngress)
-> Lens
     RevokeDBSecurityGroupIngress
     RevokeDBSecurityGroupIngress
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeDBSecurityGroupIngress' {Maybe Text
eC2SecurityGroupOwnerId :: Maybe Text
$sel:eC2SecurityGroupOwnerId:RevokeDBSecurityGroupIngress' :: RevokeDBSecurityGroupIngress -> Maybe Text
eC2SecurityGroupOwnerId} -> Maybe Text
eC2SecurityGroupOwnerId) (\s :: RevokeDBSecurityGroupIngress
s@RevokeDBSecurityGroupIngress' {} Maybe Text
a -> RevokeDBSecurityGroupIngress
s {$sel:eC2SecurityGroupOwnerId:RevokeDBSecurityGroupIngress' :: Maybe Text
eC2SecurityGroupOwnerId = Maybe Text
a} :: RevokeDBSecurityGroupIngress)

-- | The name of the EC2 security group to revoke access from. For VPC DB
-- security groups, @EC2SecurityGroupId@ must be provided. Otherwise,
-- EC2SecurityGroupOwnerId and either @EC2SecurityGroupName@ or
-- @EC2SecurityGroupId@ must be provided.
revokeDBSecurityGroupIngress_eC2SecurityGroupName :: Lens.Lens' RevokeDBSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeDBSecurityGroupIngress_eC2SecurityGroupName :: (Maybe Text -> f (Maybe Text))
-> RevokeDBSecurityGroupIngress -> f RevokeDBSecurityGroupIngress
revokeDBSecurityGroupIngress_eC2SecurityGroupName = (RevokeDBSecurityGroupIngress -> Maybe Text)
-> (RevokeDBSecurityGroupIngress
    -> Maybe Text -> RevokeDBSecurityGroupIngress)
-> Lens
     RevokeDBSecurityGroupIngress
     RevokeDBSecurityGroupIngress
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeDBSecurityGroupIngress' {Maybe Text
eC2SecurityGroupName :: Maybe Text
$sel:eC2SecurityGroupName:RevokeDBSecurityGroupIngress' :: RevokeDBSecurityGroupIngress -> Maybe Text
eC2SecurityGroupName} -> Maybe Text
eC2SecurityGroupName) (\s :: RevokeDBSecurityGroupIngress
s@RevokeDBSecurityGroupIngress' {} Maybe Text
a -> RevokeDBSecurityGroupIngress
s {$sel:eC2SecurityGroupName:RevokeDBSecurityGroupIngress' :: Maybe Text
eC2SecurityGroupName = Maybe Text
a} :: RevokeDBSecurityGroupIngress)

-- | The IP range to revoke access from. Must be a valid CIDR range. If
-- @CIDRIP@ is specified, @EC2SecurityGroupName@, @EC2SecurityGroupId@ and
-- @EC2SecurityGroupOwnerId@ can\'t be provided.
revokeDBSecurityGroupIngress_cidrip :: Lens.Lens' RevokeDBSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeDBSecurityGroupIngress_cidrip :: (Maybe Text -> f (Maybe Text))
-> RevokeDBSecurityGroupIngress -> f RevokeDBSecurityGroupIngress
revokeDBSecurityGroupIngress_cidrip = (RevokeDBSecurityGroupIngress -> Maybe Text)
-> (RevokeDBSecurityGroupIngress
    -> Maybe Text -> RevokeDBSecurityGroupIngress)
-> Lens
     RevokeDBSecurityGroupIngress
     RevokeDBSecurityGroupIngress
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeDBSecurityGroupIngress' {Maybe Text
cidrip :: Maybe Text
$sel:cidrip:RevokeDBSecurityGroupIngress' :: RevokeDBSecurityGroupIngress -> Maybe Text
cidrip} -> Maybe Text
cidrip) (\s :: RevokeDBSecurityGroupIngress
s@RevokeDBSecurityGroupIngress' {} Maybe Text
a -> RevokeDBSecurityGroupIngress
s {$sel:cidrip:RevokeDBSecurityGroupIngress' :: Maybe Text
cidrip = Maybe Text
a} :: RevokeDBSecurityGroupIngress)

-- | The id of the EC2 security group to revoke access from. For VPC DB
-- security groups, @EC2SecurityGroupId@ must be provided. Otherwise,
-- EC2SecurityGroupOwnerId and either @EC2SecurityGroupName@ or
-- @EC2SecurityGroupId@ must be provided.
revokeDBSecurityGroupIngress_eC2SecurityGroupId :: Lens.Lens' RevokeDBSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeDBSecurityGroupIngress_eC2SecurityGroupId :: (Maybe Text -> f (Maybe Text))
-> RevokeDBSecurityGroupIngress -> f RevokeDBSecurityGroupIngress
revokeDBSecurityGroupIngress_eC2SecurityGroupId = (RevokeDBSecurityGroupIngress -> Maybe Text)
-> (RevokeDBSecurityGroupIngress
    -> Maybe Text -> RevokeDBSecurityGroupIngress)
-> Lens
     RevokeDBSecurityGroupIngress
     RevokeDBSecurityGroupIngress
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeDBSecurityGroupIngress' {Maybe Text
eC2SecurityGroupId :: Maybe Text
$sel:eC2SecurityGroupId:RevokeDBSecurityGroupIngress' :: RevokeDBSecurityGroupIngress -> Maybe Text
eC2SecurityGroupId} -> Maybe Text
eC2SecurityGroupId) (\s :: RevokeDBSecurityGroupIngress
s@RevokeDBSecurityGroupIngress' {} Maybe Text
a -> RevokeDBSecurityGroupIngress
s {$sel:eC2SecurityGroupId:RevokeDBSecurityGroupIngress' :: Maybe Text
eC2SecurityGroupId = Maybe Text
a} :: RevokeDBSecurityGroupIngress)

-- | The name of the DB security group to revoke ingress from.
revokeDBSecurityGroupIngress_dbSecurityGroupName :: Lens.Lens' RevokeDBSecurityGroupIngress Prelude.Text
revokeDBSecurityGroupIngress_dbSecurityGroupName :: (Text -> f Text)
-> RevokeDBSecurityGroupIngress -> f RevokeDBSecurityGroupIngress
revokeDBSecurityGroupIngress_dbSecurityGroupName = (RevokeDBSecurityGroupIngress -> Text)
-> (RevokeDBSecurityGroupIngress
    -> Text -> RevokeDBSecurityGroupIngress)
-> Lens
     RevokeDBSecurityGroupIngress RevokeDBSecurityGroupIngress Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeDBSecurityGroupIngress' {Text
dbSecurityGroupName :: Text
$sel:dbSecurityGroupName:RevokeDBSecurityGroupIngress' :: RevokeDBSecurityGroupIngress -> Text
dbSecurityGroupName} -> Text
dbSecurityGroupName) (\s :: RevokeDBSecurityGroupIngress
s@RevokeDBSecurityGroupIngress' {} Text
a -> RevokeDBSecurityGroupIngress
s {$sel:dbSecurityGroupName:RevokeDBSecurityGroupIngress' :: Text
dbSecurityGroupName = Text
a} :: RevokeDBSecurityGroupIngress)

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

instance Prelude.NFData RevokeDBSecurityGroupIngress

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

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

instance Core.ToQuery RevokeDBSecurityGroupIngress where
  toQuery :: RevokeDBSecurityGroupIngress -> QueryString
toQuery RevokeDBSecurityGroupIngress' {Maybe Text
Text
dbSecurityGroupName :: Text
eC2SecurityGroupId :: Maybe Text
cidrip :: Maybe Text
eC2SecurityGroupName :: Maybe Text
eC2SecurityGroupOwnerId :: Maybe Text
$sel:dbSecurityGroupName:RevokeDBSecurityGroupIngress' :: RevokeDBSecurityGroupIngress -> Text
$sel:eC2SecurityGroupId:RevokeDBSecurityGroupIngress' :: RevokeDBSecurityGroupIngress -> Maybe Text
$sel:cidrip:RevokeDBSecurityGroupIngress' :: RevokeDBSecurityGroupIngress -> Maybe Text
$sel:eC2SecurityGroupName:RevokeDBSecurityGroupIngress' :: RevokeDBSecurityGroupIngress -> Maybe Text
$sel:eC2SecurityGroupOwnerId:RevokeDBSecurityGroupIngress' :: RevokeDBSecurityGroupIngress -> 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
"RevokeDBSecurityGroupIngress" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"EC2SecurityGroupOwnerId"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
eC2SecurityGroupOwnerId,
        ByteString
"EC2SecurityGroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
eC2SecurityGroupName,
        ByteString
"CIDRIP" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cidrip,
        ByteString
"EC2SecurityGroupId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
eC2SecurityGroupId,
        ByteString
"DBSecurityGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbSecurityGroupName
      ]

-- | /See:/ 'newRevokeDBSecurityGroupIngressResponse' smart constructor.
data RevokeDBSecurityGroupIngressResponse = RevokeDBSecurityGroupIngressResponse'
  { RevokeDBSecurityGroupIngressResponse -> Maybe DBSecurityGroup
dbSecurityGroup :: Prelude.Maybe DBSecurityGroup,
    -- | The response's http status code.
    RevokeDBSecurityGroupIngressResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RevokeDBSecurityGroupIngressResponse
-> RevokeDBSecurityGroupIngressResponse -> Bool
(RevokeDBSecurityGroupIngressResponse
 -> RevokeDBSecurityGroupIngressResponse -> Bool)
-> (RevokeDBSecurityGroupIngressResponse
    -> RevokeDBSecurityGroupIngressResponse -> Bool)
-> Eq RevokeDBSecurityGroupIngressResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevokeDBSecurityGroupIngressResponse
-> RevokeDBSecurityGroupIngressResponse -> Bool
$c/= :: RevokeDBSecurityGroupIngressResponse
-> RevokeDBSecurityGroupIngressResponse -> Bool
== :: RevokeDBSecurityGroupIngressResponse
-> RevokeDBSecurityGroupIngressResponse -> Bool
$c== :: RevokeDBSecurityGroupIngressResponse
-> RevokeDBSecurityGroupIngressResponse -> Bool
Prelude.Eq, ReadPrec [RevokeDBSecurityGroupIngressResponse]
ReadPrec RevokeDBSecurityGroupIngressResponse
Int -> ReadS RevokeDBSecurityGroupIngressResponse
ReadS [RevokeDBSecurityGroupIngressResponse]
(Int -> ReadS RevokeDBSecurityGroupIngressResponse)
-> ReadS [RevokeDBSecurityGroupIngressResponse]
-> ReadPrec RevokeDBSecurityGroupIngressResponse
-> ReadPrec [RevokeDBSecurityGroupIngressResponse]
-> Read RevokeDBSecurityGroupIngressResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevokeDBSecurityGroupIngressResponse]
$creadListPrec :: ReadPrec [RevokeDBSecurityGroupIngressResponse]
readPrec :: ReadPrec RevokeDBSecurityGroupIngressResponse
$creadPrec :: ReadPrec RevokeDBSecurityGroupIngressResponse
readList :: ReadS [RevokeDBSecurityGroupIngressResponse]
$creadList :: ReadS [RevokeDBSecurityGroupIngressResponse]
readsPrec :: Int -> ReadS RevokeDBSecurityGroupIngressResponse
$creadsPrec :: Int -> ReadS RevokeDBSecurityGroupIngressResponse
Prelude.Read, Int -> RevokeDBSecurityGroupIngressResponse -> ShowS
[RevokeDBSecurityGroupIngressResponse] -> ShowS
RevokeDBSecurityGroupIngressResponse -> String
(Int -> RevokeDBSecurityGroupIngressResponse -> ShowS)
-> (RevokeDBSecurityGroupIngressResponse -> String)
-> ([RevokeDBSecurityGroupIngressResponse] -> ShowS)
-> Show RevokeDBSecurityGroupIngressResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevokeDBSecurityGroupIngressResponse] -> ShowS
$cshowList :: [RevokeDBSecurityGroupIngressResponse] -> ShowS
show :: RevokeDBSecurityGroupIngressResponse -> String
$cshow :: RevokeDBSecurityGroupIngressResponse -> String
showsPrec :: Int -> RevokeDBSecurityGroupIngressResponse -> ShowS
$cshowsPrec :: Int -> RevokeDBSecurityGroupIngressResponse -> ShowS
Prelude.Show, (forall x.
 RevokeDBSecurityGroupIngressResponse
 -> Rep RevokeDBSecurityGroupIngressResponse x)
-> (forall x.
    Rep RevokeDBSecurityGroupIngressResponse x
    -> RevokeDBSecurityGroupIngressResponse)
-> Generic RevokeDBSecurityGroupIngressResponse
forall x.
Rep RevokeDBSecurityGroupIngressResponse x
-> RevokeDBSecurityGroupIngressResponse
forall x.
RevokeDBSecurityGroupIngressResponse
-> Rep RevokeDBSecurityGroupIngressResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RevokeDBSecurityGroupIngressResponse x
-> RevokeDBSecurityGroupIngressResponse
$cfrom :: forall x.
RevokeDBSecurityGroupIngressResponse
-> Rep RevokeDBSecurityGroupIngressResponse x
Prelude.Generic)

-- |
-- Create a value of 'RevokeDBSecurityGroupIngressResponse' 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:
--
-- 'dbSecurityGroup', 'revokeDBSecurityGroupIngressResponse_dbSecurityGroup' - Undocumented member.
--
-- 'httpStatus', 'revokeDBSecurityGroupIngressResponse_httpStatus' - The response's http status code.
newRevokeDBSecurityGroupIngressResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RevokeDBSecurityGroupIngressResponse
newRevokeDBSecurityGroupIngressResponse :: Int -> RevokeDBSecurityGroupIngressResponse
newRevokeDBSecurityGroupIngressResponse Int
pHttpStatus_ =
  RevokeDBSecurityGroupIngressResponse' :: Maybe DBSecurityGroup
-> Int -> RevokeDBSecurityGroupIngressResponse
RevokeDBSecurityGroupIngressResponse'
    { $sel:dbSecurityGroup:RevokeDBSecurityGroupIngressResponse' :: Maybe DBSecurityGroup
dbSecurityGroup =
        Maybe DBSecurityGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RevokeDBSecurityGroupIngressResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
revokeDBSecurityGroupIngressResponse_dbSecurityGroup :: Lens.Lens' RevokeDBSecurityGroupIngressResponse (Prelude.Maybe DBSecurityGroup)
revokeDBSecurityGroupIngressResponse_dbSecurityGroup :: (Maybe DBSecurityGroup -> f (Maybe DBSecurityGroup))
-> RevokeDBSecurityGroupIngressResponse
-> f RevokeDBSecurityGroupIngressResponse
revokeDBSecurityGroupIngressResponse_dbSecurityGroup = (RevokeDBSecurityGroupIngressResponse -> Maybe DBSecurityGroup)
-> (RevokeDBSecurityGroupIngressResponse
    -> Maybe DBSecurityGroup -> RevokeDBSecurityGroupIngressResponse)
-> Lens
     RevokeDBSecurityGroupIngressResponse
     RevokeDBSecurityGroupIngressResponse
     (Maybe DBSecurityGroup)
     (Maybe DBSecurityGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeDBSecurityGroupIngressResponse' {Maybe DBSecurityGroup
dbSecurityGroup :: Maybe DBSecurityGroup
$sel:dbSecurityGroup:RevokeDBSecurityGroupIngressResponse' :: RevokeDBSecurityGroupIngressResponse -> Maybe DBSecurityGroup
dbSecurityGroup} -> Maybe DBSecurityGroup
dbSecurityGroup) (\s :: RevokeDBSecurityGroupIngressResponse
s@RevokeDBSecurityGroupIngressResponse' {} Maybe DBSecurityGroup
a -> RevokeDBSecurityGroupIngressResponse
s {$sel:dbSecurityGroup:RevokeDBSecurityGroupIngressResponse' :: Maybe DBSecurityGroup
dbSecurityGroup = Maybe DBSecurityGroup
a} :: RevokeDBSecurityGroupIngressResponse)

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

instance
  Prelude.NFData
    RevokeDBSecurityGroupIngressResponse