{-# 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.ElastiCache.RevokeCacheSecurityGroupIngress
-- 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 cache security group. Use this operation to
-- disallow access from an Amazon EC2 security group that had been
-- previously authorized.
module Amazonka.ElastiCache.RevokeCacheSecurityGroupIngress
  ( -- * Creating a Request
    RevokeCacheSecurityGroupIngress (..),
    newRevokeCacheSecurityGroupIngress,

    -- * Request Lenses
    revokeCacheSecurityGroupIngress_cacheSecurityGroupName,
    revokeCacheSecurityGroupIngress_eC2SecurityGroupName,
    revokeCacheSecurityGroupIngress_eC2SecurityGroupOwnerId,

    -- * Destructuring the Response
    RevokeCacheSecurityGroupIngressResponse (..),
    newRevokeCacheSecurityGroupIngressResponse,

    -- * Response Lenses
    revokeCacheSecurityGroupIngressResponse_cacheSecurityGroup,
    revokeCacheSecurityGroupIngressResponse_httpStatus,
  )
where

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

-- | Represents the input of a @RevokeCacheSecurityGroupIngress@ operation.
--
-- /See:/ 'newRevokeCacheSecurityGroupIngress' smart constructor.
data RevokeCacheSecurityGroupIngress = RevokeCacheSecurityGroupIngress'
  { -- | The name of the cache security group to revoke ingress from.
    RevokeCacheSecurityGroupIngress -> Text
cacheSecurityGroupName :: Prelude.Text,
    -- | The name of the Amazon EC2 security group to revoke access from.
    RevokeCacheSecurityGroupIngress -> Text
eC2SecurityGroupName :: Prelude.Text,
    -- | The Amazon account number of the Amazon EC2 security group owner. Note
    -- that this is not the same thing as an Amazon access key ID - you must
    -- provide a valid Amazon account number for this parameter.
    RevokeCacheSecurityGroupIngress -> Text
eC2SecurityGroupOwnerId :: Prelude.Text
  }
  deriving (RevokeCacheSecurityGroupIngress
-> RevokeCacheSecurityGroupIngress -> Bool
(RevokeCacheSecurityGroupIngress
 -> RevokeCacheSecurityGroupIngress -> Bool)
-> (RevokeCacheSecurityGroupIngress
    -> RevokeCacheSecurityGroupIngress -> Bool)
-> Eq RevokeCacheSecurityGroupIngress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevokeCacheSecurityGroupIngress
-> RevokeCacheSecurityGroupIngress -> Bool
$c/= :: RevokeCacheSecurityGroupIngress
-> RevokeCacheSecurityGroupIngress -> Bool
== :: RevokeCacheSecurityGroupIngress
-> RevokeCacheSecurityGroupIngress -> Bool
$c== :: RevokeCacheSecurityGroupIngress
-> RevokeCacheSecurityGroupIngress -> Bool
Prelude.Eq, ReadPrec [RevokeCacheSecurityGroupIngress]
ReadPrec RevokeCacheSecurityGroupIngress
Int -> ReadS RevokeCacheSecurityGroupIngress
ReadS [RevokeCacheSecurityGroupIngress]
(Int -> ReadS RevokeCacheSecurityGroupIngress)
-> ReadS [RevokeCacheSecurityGroupIngress]
-> ReadPrec RevokeCacheSecurityGroupIngress
-> ReadPrec [RevokeCacheSecurityGroupIngress]
-> Read RevokeCacheSecurityGroupIngress
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevokeCacheSecurityGroupIngress]
$creadListPrec :: ReadPrec [RevokeCacheSecurityGroupIngress]
readPrec :: ReadPrec RevokeCacheSecurityGroupIngress
$creadPrec :: ReadPrec RevokeCacheSecurityGroupIngress
readList :: ReadS [RevokeCacheSecurityGroupIngress]
$creadList :: ReadS [RevokeCacheSecurityGroupIngress]
readsPrec :: Int -> ReadS RevokeCacheSecurityGroupIngress
$creadsPrec :: Int -> ReadS RevokeCacheSecurityGroupIngress
Prelude.Read, Int -> RevokeCacheSecurityGroupIngress -> ShowS
[RevokeCacheSecurityGroupIngress] -> ShowS
RevokeCacheSecurityGroupIngress -> String
(Int -> RevokeCacheSecurityGroupIngress -> ShowS)
-> (RevokeCacheSecurityGroupIngress -> String)
-> ([RevokeCacheSecurityGroupIngress] -> ShowS)
-> Show RevokeCacheSecurityGroupIngress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevokeCacheSecurityGroupIngress] -> ShowS
$cshowList :: [RevokeCacheSecurityGroupIngress] -> ShowS
show :: RevokeCacheSecurityGroupIngress -> String
$cshow :: RevokeCacheSecurityGroupIngress -> String
showsPrec :: Int -> RevokeCacheSecurityGroupIngress -> ShowS
$cshowsPrec :: Int -> RevokeCacheSecurityGroupIngress -> ShowS
Prelude.Show, (forall x.
 RevokeCacheSecurityGroupIngress
 -> Rep RevokeCacheSecurityGroupIngress x)
-> (forall x.
    Rep RevokeCacheSecurityGroupIngress x
    -> RevokeCacheSecurityGroupIngress)
-> Generic RevokeCacheSecurityGroupIngress
forall x.
Rep RevokeCacheSecurityGroupIngress x
-> RevokeCacheSecurityGroupIngress
forall x.
RevokeCacheSecurityGroupIngress
-> Rep RevokeCacheSecurityGroupIngress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RevokeCacheSecurityGroupIngress x
-> RevokeCacheSecurityGroupIngress
$cfrom :: forall x.
RevokeCacheSecurityGroupIngress
-> Rep RevokeCacheSecurityGroupIngress x
Prelude.Generic)

-- |
-- Create a value of 'RevokeCacheSecurityGroupIngress' 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:
--
-- 'cacheSecurityGroupName', 'revokeCacheSecurityGroupIngress_cacheSecurityGroupName' - The name of the cache security group to revoke ingress from.
--
-- 'eC2SecurityGroupName', 'revokeCacheSecurityGroupIngress_eC2SecurityGroupName' - The name of the Amazon EC2 security group to revoke access from.
--
-- 'eC2SecurityGroupOwnerId', 'revokeCacheSecurityGroupIngress_eC2SecurityGroupOwnerId' - The Amazon account number of the Amazon EC2 security group owner. Note
-- that this is not the same thing as an Amazon access key ID - you must
-- provide a valid Amazon account number for this parameter.
newRevokeCacheSecurityGroupIngress ::
  -- | 'cacheSecurityGroupName'
  Prelude.Text ->
  -- | 'eC2SecurityGroupName'
  Prelude.Text ->
  -- | 'eC2SecurityGroupOwnerId'
  Prelude.Text ->
  RevokeCacheSecurityGroupIngress
newRevokeCacheSecurityGroupIngress :: Text -> Text -> Text -> RevokeCacheSecurityGroupIngress
newRevokeCacheSecurityGroupIngress
  Text
pCacheSecurityGroupName_
  Text
pEC2SecurityGroupName_
  Text
pEC2SecurityGroupOwnerId_ =
    RevokeCacheSecurityGroupIngress' :: Text -> Text -> Text -> RevokeCacheSecurityGroupIngress
RevokeCacheSecurityGroupIngress'
      { $sel:cacheSecurityGroupName:RevokeCacheSecurityGroupIngress' :: Text
cacheSecurityGroupName =
          Text
pCacheSecurityGroupName_,
        $sel:eC2SecurityGroupName:RevokeCacheSecurityGroupIngress' :: Text
eC2SecurityGroupName =
          Text
pEC2SecurityGroupName_,
        $sel:eC2SecurityGroupOwnerId:RevokeCacheSecurityGroupIngress' :: Text
eC2SecurityGroupOwnerId =
          Text
pEC2SecurityGroupOwnerId_
      }

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

-- | The name of the Amazon EC2 security group to revoke access from.
revokeCacheSecurityGroupIngress_eC2SecurityGroupName :: Lens.Lens' RevokeCacheSecurityGroupIngress Prelude.Text
revokeCacheSecurityGroupIngress_eC2SecurityGroupName :: (Text -> f Text)
-> RevokeCacheSecurityGroupIngress
-> f RevokeCacheSecurityGroupIngress
revokeCacheSecurityGroupIngress_eC2SecurityGroupName = (RevokeCacheSecurityGroupIngress -> Text)
-> (RevokeCacheSecurityGroupIngress
    -> Text -> RevokeCacheSecurityGroupIngress)
-> Lens
     RevokeCacheSecurityGroupIngress
     RevokeCacheSecurityGroupIngress
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeCacheSecurityGroupIngress' {Text
eC2SecurityGroupName :: Text
$sel:eC2SecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
eC2SecurityGroupName} -> Text
eC2SecurityGroupName) (\s :: RevokeCacheSecurityGroupIngress
s@RevokeCacheSecurityGroupIngress' {} Text
a -> RevokeCacheSecurityGroupIngress
s {$sel:eC2SecurityGroupName:RevokeCacheSecurityGroupIngress' :: Text
eC2SecurityGroupName = Text
a} :: RevokeCacheSecurityGroupIngress)

-- | The Amazon account number of the Amazon EC2 security group owner. Note
-- that this is not the same thing as an Amazon access key ID - you must
-- provide a valid Amazon account number for this parameter.
revokeCacheSecurityGroupIngress_eC2SecurityGroupOwnerId :: Lens.Lens' RevokeCacheSecurityGroupIngress Prelude.Text
revokeCacheSecurityGroupIngress_eC2SecurityGroupOwnerId :: (Text -> f Text)
-> RevokeCacheSecurityGroupIngress
-> f RevokeCacheSecurityGroupIngress
revokeCacheSecurityGroupIngress_eC2SecurityGroupOwnerId = (RevokeCacheSecurityGroupIngress -> Text)
-> (RevokeCacheSecurityGroupIngress
    -> Text -> RevokeCacheSecurityGroupIngress)
-> Lens
     RevokeCacheSecurityGroupIngress
     RevokeCacheSecurityGroupIngress
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeCacheSecurityGroupIngress' {Text
eC2SecurityGroupOwnerId :: Text
$sel:eC2SecurityGroupOwnerId:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
eC2SecurityGroupOwnerId} -> Text
eC2SecurityGroupOwnerId) (\s :: RevokeCacheSecurityGroupIngress
s@RevokeCacheSecurityGroupIngress' {} Text
a -> RevokeCacheSecurityGroupIngress
s {$sel:eC2SecurityGroupOwnerId:RevokeCacheSecurityGroupIngress' :: Text
eC2SecurityGroupOwnerId = Text
a} :: RevokeCacheSecurityGroupIngress)

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

instance
  Prelude.NFData
    RevokeCacheSecurityGroupIngress

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

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

instance Core.ToQuery RevokeCacheSecurityGroupIngress where
  toQuery :: RevokeCacheSecurityGroupIngress -> QueryString
toQuery RevokeCacheSecurityGroupIngress' {Text
eC2SecurityGroupOwnerId :: Text
eC2SecurityGroupName :: Text
cacheSecurityGroupName :: Text
$sel:eC2SecurityGroupOwnerId:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
$sel:eC2SecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
$sel:cacheSecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> 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
"RevokeCacheSecurityGroupIngress" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"CacheSecurityGroupName"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
cacheSecurityGroupName,
        ByteString
"EC2SecurityGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
eC2SecurityGroupName,
        ByteString
"EC2SecurityGroupOwnerId"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
eC2SecurityGroupOwnerId
      ]

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

-- |
-- Create a value of 'RevokeCacheSecurityGroupIngressResponse' 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:
--
-- 'cacheSecurityGroup', 'revokeCacheSecurityGroupIngressResponse_cacheSecurityGroup' - Undocumented member.
--
-- 'httpStatus', 'revokeCacheSecurityGroupIngressResponse_httpStatus' - The response's http status code.
newRevokeCacheSecurityGroupIngressResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RevokeCacheSecurityGroupIngressResponse
newRevokeCacheSecurityGroupIngressResponse :: Int -> RevokeCacheSecurityGroupIngressResponse
newRevokeCacheSecurityGroupIngressResponse
  Int
pHttpStatus_ =
    RevokeCacheSecurityGroupIngressResponse' :: Maybe CacheSecurityGroup
-> Int -> RevokeCacheSecurityGroupIngressResponse
RevokeCacheSecurityGroupIngressResponse'
      { $sel:cacheSecurityGroup:RevokeCacheSecurityGroupIngressResponse' :: Maybe CacheSecurityGroup
cacheSecurityGroup =
          Maybe CacheSecurityGroup
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:RevokeCacheSecurityGroupIngressResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Undocumented member.
revokeCacheSecurityGroupIngressResponse_cacheSecurityGroup :: Lens.Lens' RevokeCacheSecurityGroupIngressResponse (Prelude.Maybe CacheSecurityGroup)
revokeCacheSecurityGroupIngressResponse_cacheSecurityGroup :: (Maybe CacheSecurityGroup -> f (Maybe CacheSecurityGroup))
-> RevokeCacheSecurityGroupIngressResponse
-> f RevokeCacheSecurityGroupIngressResponse
revokeCacheSecurityGroupIngressResponse_cacheSecurityGroup = (RevokeCacheSecurityGroupIngressResponse
 -> Maybe CacheSecurityGroup)
-> (RevokeCacheSecurityGroupIngressResponse
    -> Maybe CacheSecurityGroup
    -> RevokeCacheSecurityGroupIngressResponse)
-> Lens
     RevokeCacheSecurityGroupIngressResponse
     RevokeCacheSecurityGroupIngressResponse
     (Maybe CacheSecurityGroup)
     (Maybe CacheSecurityGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeCacheSecurityGroupIngressResponse' {Maybe CacheSecurityGroup
cacheSecurityGroup :: Maybe CacheSecurityGroup
$sel:cacheSecurityGroup:RevokeCacheSecurityGroupIngressResponse' :: RevokeCacheSecurityGroupIngressResponse -> Maybe CacheSecurityGroup
cacheSecurityGroup} -> Maybe CacheSecurityGroup
cacheSecurityGroup) (\s :: RevokeCacheSecurityGroupIngressResponse
s@RevokeCacheSecurityGroupIngressResponse' {} Maybe CacheSecurityGroup
a -> RevokeCacheSecurityGroupIngressResponse
s {$sel:cacheSecurityGroup:RevokeCacheSecurityGroupIngressResponse' :: Maybe CacheSecurityGroup
cacheSecurityGroup = Maybe CacheSecurityGroup
a} :: RevokeCacheSecurityGroupIngressResponse)

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

instance
  Prelude.NFData
    RevokeCacheSecurityGroupIngressResponse