{-# 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.SSOAdmin.DetachManagedPolicyFromPermissionSet
-- 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)
--
-- Detaches the attached IAM managed policy ARN from the specified
-- permission set.
module Amazonka.SSOAdmin.DetachManagedPolicyFromPermissionSet
  ( -- * Creating a Request
    DetachManagedPolicyFromPermissionSet (..),
    newDetachManagedPolicyFromPermissionSet,

    -- * Request Lenses
    detachManagedPolicyFromPermissionSet_instanceArn,
    detachManagedPolicyFromPermissionSet_permissionSetArn,
    detachManagedPolicyFromPermissionSet_managedPolicyArn,

    -- * Destructuring the Response
    DetachManagedPolicyFromPermissionSetResponse (..),
    newDetachManagedPolicyFromPermissionSetResponse,

    -- * Response Lenses
    detachManagedPolicyFromPermissionSetResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDetachManagedPolicyFromPermissionSet' smart constructor.
data DetachManagedPolicyFromPermissionSet = DetachManagedPolicyFromPermissionSet'
  { -- | The ARN of the SSO instance under which the operation will be executed.
    -- For more information about ARNs, see
    -- </general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces>
    -- in the /Amazon Web Services General Reference/.
    DetachManagedPolicyFromPermissionSet -> Text
instanceArn :: Prelude.Text,
    -- | The ARN of the PermissionSet from which the policy should be detached.
    DetachManagedPolicyFromPermissionSet -> Text
permissionSetArn :: Prelude.Text,
    -- | The IAM managed policy ARN to be attached to a permission set.
    DetachManagedPolicyFromPermissionSet -> Text
managedPolicyArn :: Prelude.Text
  }
  deriving (DetachManagedPolicyFromPermissionSet
-> DetachManagedPolicyFromPermissionSet -> Bool
(DetachManagedPolicyFromPermissionSet
 -> DetachManagedPolicyFromPermissionSet -> Bool)
-> (DetachManagedPolicyFromPermissionSet
    -> DetachManagedPolicyFromPermissionSet -> Bool)
-> Eq DetachManagedPolicyFromPermissionSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetachManagedPolicyFromPermissionSet
-> DetachManagedPolicyFromPermissionSet -> Bool
$c/= :: DetachManagedPolicyFromPermissionSet
-> DetachManagedPolicyFromPermissionSet -> Bool
== :: DetachManagedPolicyFromPermissionSet
-> DetachManagedPolicyFromPermissionSet -> Bool
$c== :: DetachManagedPolicyFromPermissionSet
-> DetachManagedPolicyFromPermissionSet -> Bool
Prelude.Eq, ReadPrec [DetachManagedPolicyFromPermissionSet]
ReadPrec DetachManagedPolicyFromPermissionSet
Int -> ReadS DetachManagedPolicyFromPermissionSet
ReadS [DetachManagedPolicyFromPermissionSet]
(Int -> ReadS DetachManagedPolicyFromPermissionSet)
-> ReadS [DetachManagedPolicyFromPermissionSet]
-> ReadPrec DetachManagedPolicyFromPermissionSet
-> ReadPrec [DetachManagedPolicyFromPermissionSet]
-> Read DetachManagedPolicyFromPermissionSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetachManagedPolicyFromPermissionSet]
$creadListPrec :: ReadPrec [DetachManagedPolicyFromPermissionSet]
readPrec :: ReadPrec DetachManagedPolicyFromPermissionSet
$creadPrec :: ReadPrec DetachManagedPolicyFromPermissionSet
readList :: ReadS [DetachManagedPolicyFromPermissionSet]
$creadList :: ReadS [DetachManagedPolicyFromPermissionSet]
readsPrec :: Int -> ReadS DetachManagedPolicyFromPermissionSet
$creadsPrec :: Int -> ReadS DetachManagedPolicyFromPermissionSet
Prelude.Read, Int -> DetachManagedPolicyFromPermissionSet -> ShowS
[DetachManagedPolicyFromPermissionSet] -> ShowS
DetachManagedPolicyFromPermissionSet -> String
(Int -> DetachManagedPolicyFromPermissionSet -> ShowS)
-> (DetachManagedPolicyFromPermissionSet -> String)
-> ([DetachManagedPolicyFromPermissionSet] -> ShowS)
-> Show DetachManagedPolicyFromPermissionSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetachManagedPolicyFromPermissionSet] -> ShowS
$cshowList :: [DetachManagedPolicyFromPermissionSet] -> ShowS
show :: DetachManagedPolicyFromPermissionSet -> String
$cshow :: DetachManagedPolicyFromPermissionSet -> String
showsPrec :: Int -> DetachManagedPolicyFromPermissionSet -> ShowS
$cshowsPrec :: Int -> DetachManagedPolicyFromPermissionSet -> ShowS
Prelude.Show, (forall x.
 DetachManagedPolicyFromPermissionSet
 -> Rep DetachManagedPolicyFromPermissionSet x)
-> (forall x.
    Rep DetachManagedPolicyFromPermissionSet x
    -> DetachManagedPolicyFromPermissionSet)
-> Generic DetachManagedPolicyFromPermissionSet
forall x.
Rep DetachManagedPolicyFromPermissionSet x
-> DetachManagedPolicyFromPermissionSet
forall x.
DetachManagedPolicyFromPermissionSet
-> Rep DetachManagedPolicyFromPermissionSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetachManagedPolicyFromPermissionSet x
-> DetachManagedPolicyFromPermissionSet
$cfrom :: forall x.
DetachManagedPolicyFromPermissionSet
-> Rep DetachManagedPolicyFromPermissionSet x
Prelude.Generic)

-- |
-- Create a value of 'DetachManagedPolicyFromPermissionSet' 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:
--
-- 'instanceArn', 'detachManagedPolicyFromPermissionSet_instanceArn' - The ARN of the SSO instance under which the operation will be executed.
-- For more information about ARNs, see
-- </general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces>
-- in the /Amazon Web Services General Reference/.
--
-- 'permissionSetArn', 'detachManagedPolicyFromPermissionSet_permissionSetArn' - The ARN of the PermissionSet from which the policy should be detached.
--
-- 'managedPolicyArn', 'detachManagedPolicyFromPermissionSet_managedPolicyArn' - The IAM managed policy ARN to be attached to a permission set.
newDetachManagedPolicyFromPermissionSet ::
  -- | 'instanceArn'
  Prelude.Text ->
  -- | 'permissionSetArn'
  Prelude.Text ->
  -- | 'managedPolicyArn'
  Prelude.Text ->
  DetachManagedPolicyFromPermissionSet
newDetachManagedPolicyFromPermissionSet :: Text -> Text -> Text -> DetachManagedPolicyFromPermissionSet
newDetachManagedPolicyFromPermissionSet
  Text
pInstanceArn_
  Text
pPermissionSetArn_
  Text
pManagedPolicyArn_ =
    DetachManagedPolicyFromPermissionSet' :: Text -> Text -> Text -> DetachManagedPolicyFromPermissionSet
DetachManagedPolicyFromPermissionSet'
      { $sel:instanceArn:DetachManagedPolicyFromPermissionSet' :: Text
instanceArn =
          Text
pInstanceArn_,
        $sel:permissionSetArn:DetachManagedPolicyFromPermissionSet' :: Text
permissionSetArn = Text
pPermissionSetArn_,
        $sel:managedPolicyArn:DetachManagedPolicyFromPermissionSet' :: Text
managedPolicyArn = Text
pManagedPolicyArn_
      }

-- | The ARN of the SSO instance under which the operation will be executed.
-- For more information about ARNs, see
-- </general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces>
-- in the /Amazon Web Services General Reference/.
detachManagedPolicyFromPermissionSet_instanceArn :: Lens.Lens' DetachManagedPolicyFromPermissionSet Prelude.Text
detachManagedPolicyFromPermissionSet_instanceArn :: (Text -> f Text)
-> DetachManagedPolicyFromPermissionSet
-> f DetachManagedPolicyFromPermissionSet
detachManagedPolicyFromPermissionSet_instanceArn = (DetachManagedPolicyFromPermissionSet -> Text)
-> (DetachManagedPolicyFromPermissionSet
    -> Text -> DetachManagedPolicyFromPermissionSet)
-> Lens
     DetachManagedPolicyFromPermissionSet
     DetachManagedPolicyFromPermissionSet
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetachManagedPolicyFromPermissionSet' {Text
instanceArn :: Text
$sel:instanceArn:DetachManagedPolicyFromPermissionSet' :: DetachManagedPolicyFromPermissionSet -> Text
instanceArn} -> Text
instanceArn) (\s :: DetachManagedPolicyFromPermissionSet
s@DetachManagedPolicyFromPermissionSet' {} Text
a -> DetachManagedPolicyFromPermissionSet
s {$sel:instanceArn:DetachManagedPolicyFromPermissionSet' :: Text
instanceArn = Text
a} :: DetachManagedPolicyFromPermissionSet)

-- | The ARN of the PermissionSet from which the policy should be detached.
detachManagedPolicyFromPermissionSet_permissionSetArn :: Lens.Lens' DetachManagedPolicyFromPermissionSet Prelude.Text
detachManagedPolicyFromPermissionSet_permissionSetArn :: (Text -> f Text)
-> DetachManagedPolicyFromPermissionSet
-> f DetachManagedPolicyFromPermissionSet
detachManagedPolicyFromPermissionSet_permissionSetArn = (DetachManagedPolicyFromPermissionSet -> Text)
-> (DetachManagedPolicyFromPermissionSet
    -> Text -> DetachManagedPolicyFromPermissionSet)
-> Lens
     DetachManagedPolicyFromPermissionSet
     DetachManagedPolicyFromPermissionSet
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetachManagedPolicyFromPermissionSet' {Text
permissionSetArn :: Text
$sel:permissionSetArn:DetachManagedPolicyFromPermissionSet' :: DetachManagedPolicyFromPermissionSet -> Text
permissionSetArn} -> Text
permissionSetArn) (\s :: DetachManagedPolicyFromPermissionSet
s@DetachManagedPolicyFromPermissionSet' {} Text
a -> DetachManagedPolicyFromPermissionSet
s {$sel:permissionSetArn:DetachManagedPolicyFromPermissionSet' :: Text
permissionSetArn = Text
a} :: DetachManagedPolicyFromPermissionSet)

-- | The IAM managed policy ARN to be attached to a permission set.
detachManagedPolicyFromPermissionSet_managedPolicyArn :: Lens.Lens' DetachManagedPolicyFromPermissionSet Prelude.Text
detachManagedPolicyFromPermissionSet_managedPolicyArn :: (Text -> f Text)
-> DetachManagedPolicyFromPermissionSet
-> f DetachManagedPolicyFromPermissionSet
detachManagedPolicyFromPermissionSet_managedPolicyArn = (DetachManagedPolicyFromPermissionSet -> Text)
-> (DetachManagedPolicyFromPermissionSet
    -> Text -> DetachManagedPolicyFromPermissionSet)
-> Lens
     DetachManagedPolicyFromPermissionSet
     DetachManagedPolicyFromPermissionSet
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetachManagedPolicyFromPermissionSet' {Text
managedPolicyArn :: Text
$sel:managedPolicyArn:DetachManagedPolicyFromPermissionSet' :: DetachManagedPolicyFromPermissionSet -> Text
managedPolicyArn} -> Text
managedPolicyArn) (\s :: DetachManagedPolicyFromPermissionSet
s@DetachManagedPolicyFromPermissionSet' {} Text
a -> DetachManagedPolicyFromPermissionSet
s {$sel:managedPolicyArn:DetachManagedPolicyFromPermissionSet' :: Text
managedPolicyArn = Text
a} :: DetachManagedPolicyFromPermissionSet)

instance
  Core.AWSRequest
    DetachManagedPolicyFromPermissionSet
  where
  type
    AWSResponse DetachManagedPolicyFromPermissionSet =
      DetachManagedPolicyFromPermissionSetResponse
  request :: DetachManagedPolicyFromPermissionSet
-> Request DetachManagedPolicyFromPermissionSet
request = Service
-> DetachManagedPolicyFromPermissionSet
-> Request DetachManagedPolicyFromPermissionSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DetachManagedPolicyFromPermissionSet
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DetachManagedPolicyFromPermissionSet)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either
      String (AWSResponse DetachManagedPolicyFromPermissionSet))
-> Logger
-> Service
-> Proxy DetachManagedPolicyFromPermissionSet
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DetachManagedPolicyFromPermissionSet)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> DetachManagedPolicyFromPermissionSetResponse
DetachManagedPolicyFromPermissionSetResponse'
            (Int -> DetachManagedPolicyFromPermissionSetResponse)
-> Either String Int
-> Either String DetachManagedPolicyFromPermissionSetResponse
forall (f :: * -> *) a b. Functor 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
    DetachManagedPolicyFromPermissionSet

instance
  Prelude.NFData
    DetachManagedPolicyFromPermissionSet

instance
  Core.ToHeaders
    DetachManagedPolicyFromPermissionSet
  where
  toHeaders :: DetachManagedPolicyFromPermissionSet -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DetachManagedPolicyFromPermissionSet -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SWBExternalService.DetachManagedPolicyFromPermissionSet" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Core.ToJSON
    DetachManagedPolicyFromPermissionSet
  where
  toJSON :: DetachManagedPolicyFromPermissionSet -> Value
toJSON DetachManagedPolicyFromPermissionSet' {Text
managedPolicyArn :: Text
permissionSetArn :: Text
instanceArn :: Text
$sel:managedPolicyArn:DetachManagedPolicyFromPermissionSet' :: DetachManagedPolicyFromPermissionSet -> Text
$sel:permissionSetArn:DetachManagedPolicyFromPermissionSet' :: DetachManagedPolicyFromPermissionSet -> Text
$sel:instanceArn:DetachManagedPolicyFromPermissionSet' :: DetachManagedPolicyFromPermissionSet -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"InstanceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
instanceArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"PermissionSetArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
permissionSetArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ManagedPolicyArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
managedPolicyArn)
          ]
      )

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

instance
  Core.ToQuery
    DetachManagedPolicyFromPermissionSet
  where
  toQuery :: DetachManagedPolicyFromPermissionSet -> QueryString
toQuery = QueryString -> DetachManagedPolicyFromPermissionSet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

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

-- |
-- Create a value of 'DetachManagedPolicyFromPermissionSetResponse' 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:
--
-- 'httpStatus', 'detachManagedPolicyFromPermissionSetResponse_httpStatus' - The response's http status code.
newDetachManagedPolicyFromPermissionSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DetachManagedPolicyFromPermissionSetResponse
newDetachManagedPolicyFromPermissionSetResponse :: Int -> DetachManagedPolicyFromPermissionSetResponse
newDetachManagedPolicyFromPermissionSetResponse
  Int
pHttpStatus_ =
    DetachManagedPolicyFromPermissionSetResponse' :: Int -> DetachManagedPolicyFromPermissionSetResponse
DetachManagedPolicyFromPermissionSetResponse'
      { $sel:httpStatus:DetachManagedPolicyFromPermissionSetResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

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

instance
  Prelude.NFData
    DetachManagedPolicyFromPermissionSetResponse