{-# 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.Redshift.RevokeClusterSecurityGroupIngress
-- 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 an ingress rule in an Amazon Redshift security group for a
-- previously authorized IP range or Amazon EC2 security group. To add an
-- ingress rule, see AuthorizeClusterSecurityGroupIngress. For information
-- about managing security groups, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html Amazon Redshift Cluster Security Groups>
-- in the /Amazon Redshift Cluster Management Guide/.
module Amazonka.Redshift.RevokeClusterSecurityGroupIngress
  ( -- * Creating a Request
    RevokeClusterSecurityGroupIngress (..),
    newRevokeClusterSecurityGroupIngress,

    -- * Request Lenses
    revokeClusterSecurityGroupIngress_eC2SecurityGroupOwnerId,
    revokeClusterSecurityGroupIngress_eC2SecurityGroupName,
    revokeClusterSecurityGroupIngress_cidrip,
    revokeClusterSecurityGroupIngress_clusterSecurityGroupName,

    -- * Destructuring the Response
    RevokeClusterSecurityGroupIngressResponse (..),
    newRevokeClusterSecurityGroupIngressResponse,

    -- * Response Lenses
    revokeClusterSecurityGroupIngressResponse_clusterSecurityGroup,
    revokeClusterSecurityGroupIngressResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newRevokeClusterSecurityGroupIngress' smart constructor.
data RevokeClusterSecurityGroupIngress = RevokeClusterSecurityGroupIngress'
  { -- | The Amazon Web Services account number of the owner of the security
    -- group specified in the @EC2SecurityGroupName@ parameter. The Amazon Web
    -- Services access key ID is not an acceptable value. If
    -- @EC2SecurityGroupOwnerId@ is specified, @EC2SecurityGroupName@ must also
    -- be provided. and @CIDRIP@ cannot be provided.
    --
    -- Example: @111122223333@
    RevokeClusterSecurityGroupIngress -> Maybe Text
eC2SecurityGroupOwnerId :: Prelude.Maybe Prelude.Text,
    -- | The name of the EC2 Security Group whose access is to be revoked. If
    -- @EC2SecurityGroupName@ is specified, @EC2SecurityGroupOwnerId@ must also
    -- be provided and @CIDRIP@ cannot be provided.
    RevokeClusterSecurityGroupIngress -> Maybe Text
eC2SecurityGroupName :: Prelude.Maybe Prelude.Text,
    -- | The IP range for which to revoke access. This range must be a valid
    -- Classless Inter-Domain Routing (CIDR) block of IP addresses. If @CIDRIP@
    -- is specified, @EC2SecurityGroupName@ and @EC2SecurityGroupOwnerId@
    -- cannot be provided.
    RevokeClusterSecurityGroupIngress -> Maybe Text
cidrip :: Prelude.Maybe Prelude.Text,
    -- | The name of the security Group from which to revoke the ingress rule.
    RevokeClusterSecurityGroupIngress -> Text
clusterSecurityGroupName :: Prelude.Text
  }
  deriving (RevokeClusterSecurityGroupIngress
-> RevokeClusterSecurityGroupIngress -> Bool
(RevokeClusterSecurityGroupIngress
 -> RevokeClusterSecurityGroupIngress -> Bool)
-> (RevokeClusterSecurityGroupIngress
    -> RevokeClusterSecurityGroupIngress -> Bool)
-> Eq RevokeClusterSecurityGroupIngress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevokeClusterSecurityGroupIngress
-> RevokeClusterSecurityGroupIngress -> Bool
$c/= :: RevokeClusterSecurityGroupIngress
-> RevokeClusterSecurityGroupIngress -> Bool
== :: RevokeClusterSecurityGroupIngress
-> RevokeClusterSecurityGroupIngress -> Bool
$c== :: RevokeClusterSecurityGroupIngress
-> RevokeClusterSecurityGroupIngress -> Bool
Prelude.Eq, ReadPrec [RevokeClusterSecurityGroupIngress]
ReadPrec RevokeClusterSecurityGroupIngress
Int -> ReadS RevokeClusterSecurityGroupIngress
ReadS [RevokeClusterSecurityGroupIngress]
(Int -> ReadS RevokeClusterSecurityGroupIngress)
-> ReadS [RevokeClusterSecurityGroupIngress]
-> ReadPrec RevokeClusterSecurityGroupIngress
-> ReadPrec [RevokeClusterSecurityGroupIngress]
-> Read RevokeClusterSecurityGroupIngress
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevokeClusterSecurityGroupIngress]
$creadListPrec :: ReadPrec [RevokeClusterSecurityGroupIngress]
readPrec :: ReadPrec RevokeClusterSecurityGroupIngress
$creadPrec :: ReadPrec RevokeClusterSecurityGroupIngress
readList :: ReadS [RevokeClusterSecurityGroupIngress]
$creadList :: ReadS [RevokeClusterSecurityGroupIngress]
readsPrec :: Int -> ReadS RevokeClusterSecurityGroupIngress
$creadsPrec :: Int -> ReadS RevokeClusterSecurityGroupIngress
Prelude.Read, Int -> RevokeClusterSecurityGroupIngress -> ShowS
[RevokeClusterSecurityGroupIngress] -> ShowS
RevokeClusterSecurityGroupIngress -> String
(Int -> RevokeClusterSecurityGroupIngress -> ShowS)
-> (RevokeClusterSecurityGroupIngress -> String)
-> ([RevokeClusterSecurityGroupIngress] -> ShowS)
-> Show RevokeClusterSecurityGroupIngress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevokeClusterSecurityGroupIngress] -> ShowS
$cshowList :: [RevokeClusterSecurityGroupIngress] -> ShowS
show :: RevokeClusterSecurityGroupIngress -> String
$cshow :: RevokeClusterSecurityGroupIngress -> String
showsPrec :: Int -> RevokeClusterSecurityGroupIngress -> ShowS
$cshowsPrec :: Int -> RevokeClusterSecurityGroupIngress -> ShowS
Prelude.Show, (forall x.
 RevokeClusterSecurityGroupIngress
 -> Rep RevokeClusterSecurityGroupIngress x)
-> (forall x.
    Rep RevokeClusterSecurityGroupIngress x
    -> RevokeClusterSecurityGroupIngress)
-> Generic RevokeClusterSecurityGroupIngress
forall x.
Rep RevokeClusterSecurityGroupIngress x
-> RevokeClusterSecurityGroupIngress
forall x.
RevokeClusterSecurityGroupIngress
-> Rep RevokeClusterSecurityGroupIngress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RevokeClusterSecurityGroupIngress x
-> RevokeClusterSecurityGroupIngress
$cfrom :: forall x.
RevokeClusterSecurityGroupIngress
-> Rep RevokeClusterSecurityGroupIngress x
Prelude.Generic)

-- |
-- Create a value of 'RevokeClusterSecurityGroupIngress' 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', 'revokeClusterSecurityGroupIngress_eC2SecurityGroupOwnerId' - The Amazon Web Services account number of the owner of the security
-- group specified in the @EC2SecurityGroupName@ parameter. The Amazon Web
-- Services access key ID is not an acceptable value. If
-- @EC2SecurityGroupOwnerId@ is specified, @EC2SecurityGroupName@ must also
-- be provided. and @CIDRIP@ cannot be provided.
--
-- Example: @111122223333@
--
-- 'eC2SecurityGroupName', 'revokeClusterSecurityGroupIngress_eC2SecurityGroupName' - The name of the EC2 Security Group whose access is to be revoked. If
-- @EC2SecurityGroupName@ is specified, @EC2SecurityGroupOwnerId@ must also
-- be provided and @CIDRIP@ cannot be provided.
--
-- 'cidrip', 'revokeClusterSecurityGroupIngress_cidrip' - The IP range for which to revoke access. This range must be a valid
-- Classless Inter-Domain Routing (CIDR) block of IP addresses. If @CIDRIP@
-- is specified, @EC2SecurityGroupName@ and @EC2SecurityGroupOwnerId@
-- cannot be provided.
--
-- 'clusterSecurityGroupName', 'revokeClusterSecurityGroupIngress_clusterSecurityGroupName' - The name of the security Group from which to revoke the ingress rule.
newRevokeClusterSecurityGroupIngress ::
  -- | 'clusterSecurityGroupName'
  Prelude.Text ->
  RevokeClusterSecurityGroupIngress
newRevokeClusterSecurityGroupIngress :: Text -> RevokeClusterSecurityGroupIngress
newRevokeClusterSecurityGroupIngress
  Text
pClusterSecurityGroupName_ =
    RevokeClusterSecurityGroupIngress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> RevokeClusterSecurityGroupIngress
RevokeClusterSecurityGroupIngress'
      { $sel:eC2SecurityGroupOwnerId:RevokeClusterSecurityGroupIngress' :: Maybe Text
eC2SecurityGroupOwnerId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:eC2SecurityGroupName:RevokeClusterSecurityGroupIngress' :: Maybe Text
eC2SecurityGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:cidrip:RevokeClusterSecurityGroupIngress' :: Maybe Text
cidrip = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterSecurityGroupName:RevokeClusterSecurityGroupIngress' :: Text
clusterSecurityGroupName =
          Text
pClusterSecurityGroupName_
      }

-- | The Amazon Web Services account number of the owner of the security
-- group specified in the @EC2SecurityGroupName@ parameter. The Amazon Web
-- Services access key ID is not an acceptable value. If
-- @EC2SecurityGroupOwnerId@ is specified, @EC2SecurityGroupName@ must also
-- be provided. and @CIDRIP@ cannot be provided.
--
-- Example: @111122223333@
revokeClusterSecurityGroupIngress_eC2SecurityGroupOwnerId :: Lens.Lens' RevokeClusterSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeClusterSecurityGroupIngress_eC2SecurityGroupOwnerId :: (Maybe Text -> f (Maybe Text))
-> RevokeClusterSecurityGroupIngress
-> f RevokeClusterSecurityGroupIngress
revokeClusterSecurityGroupIngress_eC2SecurityGroupOwnerId = (RevokeClusterSecurityGroupIngress -> Maybe Text)
-> (RevokeClusterSecurityGroupIngress
    -> Maybe Text -> RevokeClusterSecurityGroupIngress)
-> Lens
     RevokeClusterSecurityGroupIngress
     RevokeClusterSecurityGroupIngress
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeClusterSecurityGroupIngress' {Maybe Text
eC2SecurityGroupOwnerId :: Maybe Text
$sel:eC2SecurityGroupOwnerId:RevokeClusterSecurityGroupIngress' :: RevokeClusterSecurityGroupIngress -> Maybe Text
eC2SecurityGroupOwnerId} -> Maybe Text
eC2SecurityGroupOwnerId) (\s :: RevokeClusterSecurityGroupIngress
s@RevokeClusterSecurityGroupIngress' {} Maybe Text
a -> RevokeClusterSecurityGroupIngress
s {$sel:eC2SecurityGroupOwnerId:RevokeClusterSecurityGroupIngress' :: Maybe Text
eC2SecurityGroupOwnerId = Maybe Text
a} :: RevokeClusterSecurityGroupIngress)

-- | The name of the EC2 Security Group whose access is to be revoked. If
-- @EC2SecurityGroupName@ is specified, @EC2SecurityGroupOwnerId@ must also
-- be provided and @CIDRIP@ cannot be provided.
revokeClusterSecurityGroupIngress_eC2SecurityGroupName :: Lens.Lens' RevokeClusterSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeClusterSecurityGroupIngress_eC2SecurityGroupName :: (Maybe Text -> f (Maybe Text))
-> RevokeClusterSecurityGroupIngress
-> f RevokeClusterSecurityGroupIngress
revokeClusterSecurityGroupIngress_eC2SecurityGroupName = (RevokeClusterSecurityGroupIngress -> Maybe Text)
-> (RevokeClusterSecurityGroupIngress
    -> Maybe Text -> RevokeClusterSecurityGroupIngress)
-> Lens
     RevokeClusterSecurityGroupIngress
     RevokeClusterSecurityGroupIngress
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeClusterSecurityGroupIngress' {Maybe Text
eC2SecurityGroupName :: Maybe Text
$sel:eC2SecurityGroupName:RevokeClusterSecurityGroupIngress' :: RevokeClusterSecurityGroupIngress -> Maybe Text
eC2SecurityGroupName} -> Maybe Text
eC2SecurityGroupName) (\s :: RevokeClusterSecurityGroupIngress
s@RevokeClusterSecurityGroupIngress' {} Maybe Text
a -> RevokeClusterSecurityGroupIngress
s {$sel:eC2SecurityGroupName:RevokeClusterSecurityGroupIngress' :: Maybe Text
eC2SecurityGroupName = Maybe Text
a} :: RevokeClusterSecurityGroupIngress)

-- | The IP range for which to revoke access. This range must be a valid
-- Classless Inter-Domain Routing (CIDR) block of IP addresses. If @CIDRIP@
-- is specified, @EC2SecurityGroupName@ and @EC2SecurityGroupOwnerId@
-- cannot be provided.
revokeClusterSecurityGroupIngress_cidrip :: Lens.Lens' RevokeClusterSecurityGroupIngress (Prelude.Maybe Prelude.Text)
revokeClusterSecurityGroupIngress_cidrip :: (Maybe Text -> f (Maybe Text))
-> RevokeClusterSecurityGroupIngress
-> f RevokeClusterSecurityGroupIngress
revokeClusterSecurityGroupIngress_cidrip = (RevokeClusterSecurityGroupIngress -> Maybe Text)
-> (RevokeClusterSecurityGroupIngress
    -> Maybe Text -> RevokeClusterSecurityGroupIngress)
-> Lens
     RevokeClusterSecurityGroupIngress
     RevokeClusterSecurityGroupIngress
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeClusterSecurityGroupIngress' {Maybe Text
cidrip :: Maybe Text
$sel:cidrip:RevokeClusterSecurityGroupIngress' :: RevokeClusterSecurityGroupIngress -> Maybe Text
cidrip} -> Maybe Text
cidrip) (\s :: RevokeClusterSecurityGroupIngress
s@RevokeClusterSecurityGroupIngress' {} Maybe Text
a -> RevokeClusterSecurityGroupIngress
s {$sel:cidrip:RevokeClusterSecurityGroupIngress' :: Maybe Text
cidrip = Maybe Text
a} :: RevokeClusterSecurityGroupIngress)

-- | The name of the security Group from which to revoke the ingress rule.
revokeClusterSecurityGroupIngress_clusterSecurityGroupName :: Lens.Lens' RevokeClusterSecurityGroupIngress Prelude.Text
revokeClusterSecurityGroupIngress_clusterSecurityGroupName :: (Text -> f Text)
-> RevokeClusterSecurityGroupIngress
-> f RevokeClusterSecurityGroupIngress
revokeClusterSecurityGroupIngress_clusterSecurityGroupName = (RevokeClusterSecurityGroupIngress -> Text)
-> (RevokeClusterSecurityGroupIngress
    -> Text -> RevokeClusterSecurityGroupIngress)
-> Lens
     RevokeClusterSecurityGroupIngress
     RevokeClusterSecurityGroupIngress
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeClusterSecurityGroupIngress' {Text
clusterSecurityGroupName :: Text
$sel:clusterSecurityGroupName:RevokeClusterSecurityGroupIngress' :: RevokeClusterSecurityGroupIngress -> Text
clusterSecurityGroupName} -> Text
clusterSecurityGroupName) (\s :: RevokeClusterSecurityGroupIngress
s@RevokeClusterSecurityGroupIngress' {} Text
a -> RevokeClusterSecurityGroupIngress
s {$sel:clusterSecurityGroupName:RevokeClusterSecurityGroupIngress' :: Text
clusterSecurityGroupName = Text
a} :: RevokeClusterSecurityGroupIngress)

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

instance
  Prelude.NFData
    RevokeClusterSecurityGroupIngress

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

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

instance
  Core.ToQuery
    RevokeClusterSecurityGroupIngress
  where
  toQuery :: RevokeClusterSecurityGroupIngress -> QueryString
toQuery RevokeClusterSecurityGroupIngress' {Maybe Text
Text
clusterSecurityGroupName :: Text
cidrip :: Maybe Text
eC2SecurityGroupName :: Maybe Text
eC2SecurityGroupOwnerId :: Maybe Text
$sel:clusterSecurityGroupName:RevokeClusterSecurityGroupIngress' :: RevokeClusterSecurityGroupIngress -> Text
$sel:cidrip:RevokeClusterSecurityGroupIngress' :: RevokeClusterSecurityGroupIngress -> Maybe Text
$sel:eC2SecurityGroupName:RevokeClusterSecurityGroupIngress' :: RevokeClusterSecurityGroupIngress -> Maybe Text
$sel:eC2SecurityGroupOwnerId:RevokeClusterSecurityGroupIngress' :: RevokeClusterSecurityGroupIngress -> 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
"RevokeClusterSecurityGroupIngress" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: 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
"ClusterSecurityGroupName"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterSecurityGroupName
      ]

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

-- |
-- Create a value of 'RevokeClusterSecurityGroupIngressResponse' 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:
--
-- 'clusterSecurityGroup', 'revokeClusterSecurityGroupIngressResponse_clusterSecurityGroup' - Undocumented member.
--
-- 'httpStatus', 'revokeClusterSecurityGroupIngressResponse_httpStatus' - The response's http status code.
newRevokeClusterSecurityGroupIngressResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RevokeClusterSecurityGroupIngressResponse
newRevokeClusterSecurityGroupIngressResponse :: Int -> RevokeClusterSecurityGroupIngressResponse
newRevokeClusterSecurityGroupIngressResponse
  Int
pHttpStatus_ =
    RevokeClusterSecurityGroupIngressResponse' :: Maybe ClusterSecurityGroup
-> Int -> RevokeClusterSecurityGroupIngressResponse
RevokeClusterSecurityGroupIngressResponse'
      { $sel:clusterSecurityGroup:RevokeClusterSecurityGroupIngressResponse' :: Maybe ClusterSecurityGroup
clusterSecurityGroup =
          Maybe ClusterSecurityGroup
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:RevokeClusterSecurityGroupIngressResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Undocumented member.
revokeClusterSecurityGroupIngressResponse_clusterSecurityGroup :: Lens.Lens' RevokeClusterSecurityGroupIngressResponse (Prelude.Maybe ClusterSecurityGroup)
revokeClusterSecurityGroupIngressResponse_clusterSecurityGroup :: (Maybe ClusterSecurityGroup -> f (Maybe ClusterSecurityGroup))
-> RevokeClusterSecurityGroupIngressResponse
-> f RevokeClusterSecurityGroupIngressResponse
revokeClusterSecurityGroupIngressResponse_clusterSecurityGroup = (RevokeClusterSecurityGroupIngressResponse
 -> Maybe ClusterSecurityGroup)
-> (RevokeClusterSecurityGroupIngressResponse
    -> Maybe ClusterSecurityGroup
    -> RevokeClusterSecurityGroupIngressResponse)
-> Lens
     RevokeClusterSecurityGroupIngressResponse
     RevokeClusterSecurityGroupIngressResponse
     (Maybe ClusterSecurityGroup)
     (Maybe ClusterSecurityGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeClusterSecurityGroupIngressResponse' {Maybe ClusterSecurityGroup
clusterSecurityGroup :: Maybe ClusterSecurityGroup
$sel:clusterSecurityGroup:RevokeClusterSecurityGroupIngressResponse' :: RevokeClusterSecurityGroupIngressResponse
-> Maybe ClusterSecurityGroup
clusterSecurityGroup} -> Maybe ClusterSecurityGroup
clusterSecurityGroup) (\s :: RevokeClusterSecurityGroupIngressResponse
s@RevokeClusterSecurityGroupIngressResponse' {} Maybe ClusterSecurityGroup
a -> RevokeClusterSecurityGroupIngressResponse
s {$sel:clusterSecurityGroup:RevokeClusterSecurityGroupIngressResponse' :: Maybe ClusterSecurityGroup
clusterSecurityGroup = Maybe ClusterSecurityGroup
a} :: RevokeClusterSecurityGroupIngressResponse)

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

instance
  Prelude.NFData
    RevokeClusterSecurityGroupIngressResponse