{-# 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.ProvisionPermissionSet
-- 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)
--
-- The process by which a specified permission set is provisioned to the
-- specified target.
module Amazonka.SSOAdmin.ProvisionPermissionSet
  ( -- * Creating a Request
    ProvisionPermissionSet (..),
    newProvisionPermissionSet,

    -- * Request Lenses
    provisionPermissionSet_targetId,
    provisionPermissionSet_instanceArn,
    provisionPermissionSet_permissionSetArn,
    provisionPermissionSet_targetType,

    -- * Destructuring the Response
    ProvisionPermissionSetResponse (..),
    newProvisionPermissionSetResponse,

    -- * Response Lenses
    provisionPermissionSetResponse_permissionSetProvisioningStatus,
    provisionPermissionSetResponse_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:/ 'newProvisionPermissionSet' smart constructor.
data ProvisionPermissionSet = ProvisionPermissionSet'
  { -- | TargetID is an Amazon Web Services account identifier, typically a 10-12
    -- digit string (For example, 123456789012).
    ProvisionPermissionSet -> Maybe Text
targetId :: Prelude.Maybe Prelude.Text,
    -- | 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/.
    ProvisionPermissionSet -> Text
instanceArn :: Prelude.Text,
    -- | The ARN of the permission set.
    ProvisionPermissionSet -> Text
permissionSetArn :: Prelude.Text,
    -- | The entity type for which the assignment will be created.
    ProvisionPermissionSet -> ProvisionTargetType
targetType :: ProvisionTargetType
  }
  deriving (ProvisionPermissionSet -> ProvisionPermissionSet -> Bool
(ProvisionPermissionSet -> ProvisionPermissionSet -> Bool)
-> (ProvisionPermissionSet -> ProvisionPermissionSet -> Bool)
-> Eq ProvisionPermissionSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProvisionPermissionSet -> ProvisionPermissionSet -> Bool
$c/= :: ProvisionPermissionSet -> ProvisionPermissionSet -> Bool
== :: ProvisionPermissionSet -> ProvisionPermissionSet -> Bool
$c== :: ProvisionPermissionSet -> ProvisionPermissionSet -> Bool
Prelude.Eq, ReadPrec [ProvisionPermissionSet]
ReadPrec ProvisionPermissionSet
Int -> ReadS ProvisionPermissionSet
ReadS [ProvisionPermissionSet]
(Int -> ReadS ProvisionPermissionSet)
-> ReadS [ProvisionPermissionSet]
-> ReadPrec ProvisionPermissionSet
-> ReadPrec [ProvisionPermissionSet]
-> Read ProvisionPermissionSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProvisionPermissionSet]
$creadListPrec :: ReadPrec [ProvisionPermissionSet]
readPrec :: ReadPrec ProvisionPermissionSet
$creadPrec :: ReadPrec ProvisionPermissionSet
readList :: ReadS [ProvisionPermissionSet]
$creadList :: ReadS [ProvisionPermissionSet]
readsPrec :: Int -> ReadS ProvisionPermissionSet
$creadsPrec :: Int -> ReadS ProvisionPermissionSet
Prelude.Read, Int -> ProvisionPermissionSet -> ShowS
[ProvisionPermissionSet] -> ShowS
ProvisionPermissionSet -> String
(Int -> ProvisionPermissionSet -> ShowS)
-> (ProvisionPermissionSet -> String)
-> ([ProvisionPermissionSet] -> ShowS)
-> Show ProvisionPermissionSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProvisionPermissionSet] -> ShowS
$cshowList :: [ProvisionPermissionSet] -> ShowS
show :: ProvisionPermissionSet -> String
$cshow :: ProvisionPermissionSet -> String
showsPrec :: Int -> ProvisionPermissionSet -> ShowS
$cshowsPrec :: Int -> ProvisionPermissionSet -> ShowS
Prelude.Show, (forall x. ProvisionPermissionSet -> Rep ProvisionPermissionSet x)
-> (forall x.
    Rep ProvisionPermissionSet x -> ProvisionPermissionSet)
-> Generic ProvisionPermissionSet
forall x. Rep ProvisionPermissionSet x -> ProvisionPermissionSet
forall x. ProvisionPermissionSet -> Rep ProvisionPermissionSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProvisionPermissionSet x -> ProvisionPermissionSet
$cfrom :: forall x. ProvisionPermissionSet -> Rep ProvisionPermissionSet x
Prelude.Generic)

-- |
-- Create a value of 'ProvisionPermissionSet' 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:
--
-- 'targetId', 'provisionPermissionSet_targetId' - TargetID is an Amazon Web Services account identifier, typically a 10-12
-- digit string (For example, 123456789012).
--
-- 'instanceArn', 'provisionPermissionSet_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', 'provisionPermissionSet_permissionSetArn' - The ARN of the permission set.
--
-- 'targetType', 'provisionPermissionSet_targetType' - The entity type for which the assignment will be created.
newProvisionPermissionSet ::
  -- | 'instanceArn'
  Prelude.Text ->
  -- | 'permissionSetArn'
  Prelude.Text ->
  -- | 'targetType'
  ProvisionTargetType ->
  ProvisionPermissionSet
newProvisionPermissionSet :: Text -> Text -> ProvisionTargetType -> ProvisionPermissionSet
newProvisionPermissionSet
  Text
pInstanceArn_
  Text
pPermissionSetArn_
  ProvisionTargetType
pTargetType_ =
    ProvisionPermissionSet' :: Maybe Text
-> Text -> Text -> ProvisionTargetType -> ProvisionPermissionSet
ProvisionPermissionSet'
      { $sel:targetId:ProvisionPermissionSet' :: Maybe Text
targetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceArn:ProvisionPermissionSet' :: Text
instanceArn = Text
pInstanceArn_,
        $sel:permissionSetArn:ProvisionPermissionSet' :: Text
permissionSetArn = Text
pPermissionSetArn_,
        $sel:targetType:ProvisionPermissionSet' :: ProvisionTargetType
targetType = ProvisionTargetType
pTargetType_
      }

-- | TargetID is an Amazon Web Services account identifier, typically a 10-12
-- digit string (For example, 123456789012).
provisionPermissionSet_targetId :: Lens.Lens' ProvisionPermissionSet (Prelude.Maybe Prelude.Text)
provisionPermissionSet_targetId :: (Maybe Text -> f (Maybe Text))
-> ProvisionPermissionSet -> f ProvisionPermissionSet
provisionPermissionSet_targetId = (ProvisionPermissionSet -> Maybe Text)
-> (ProvisionPermissionSet -> Maybe Text -> ProvisionPermissionSet)
-> Lens
     ProvisionPermissionSet
     ProvisionPermissionSet
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionPermissionSet' {Maybe Text
targetId :: Maybe Text
$sel:targetId:ProvisionPermissionSet' :: ProvisionPermissionSet -> Maybe Text
targetId} -> Maybe Text
targetId) (\s :: ProvisionPermissionSet
s@ProvisionPermissionSet' {} Maybe Text
a -> ProvisionPermissionSet
s {$sel:targetId:ProvisionPermissionSet' :: Maybe Text
targetId = Maybe Text
a} :: ProvisionPermissionSet)

-- | 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/.
provisionPermissionSet_instanceArn :: Lens.Lens' ProvisionPermissionSet Prelude.Text
provisionPermissionSet_instanceArn :: (Text -> f Text)
-> ProvisionPermissionSet -> f ProvisionPermissionSet
provisionPermissionSet_instanceArn = (ProvisionPermissionSet -> Text)
-> (ProvisionPermissionSet -> Text -> ProvisionPermissionSet)
-> Lens ProvisionPermissionSet ProvisionPermissionSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionPermissionSet' {Text
instanceArn :: Text
$sel:instanceArn:ProvisionPermissionSet' :: ProvisionPermissionSet -> Text
instanceArn} -> Text
instanceArn) (\s :: ProvisionPermissionSet
s@ProvisionPermissionSet' {} Text
a -> ProvisionPermissionSet
s {$sel:instanceArn:ProvisionPermissionSet' :: Text
instanceArn = Text
a} :: ProvisionPermissionSet)

-- | The ARN of the permission set.
provisionPermissionSet_permissionSetArn :: Lens.Lens' ProvisionPermissionSet Prelude.Text
provisionPermissionSet_permissionSetArn :: (Text -> f Text)
-> ProvisionPermissionSet -> f ProvisionPermissionSet
provisionPermissionSet_permissionSetArn = (ProvisionPermissionSet -> Text)
-> (ProvisionPermissionSet -> Text -> ProvisionPermissionSet)
-> Lens ProvisionPermissionSet ProvisionPermissionSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionPermissionSet' {Text
permissionSetArn :: Text
$sel:permissionSetArn:ProvisionPermissionSet' :: ProvisionPermissionSet -> Text
permissionSetArn} -> Text
permissionSetArn) (\s :: ProvisionPermissionSet
s@ProvisionPermissionSet' {} Text
a -> ProvisionPermissionSet
s {$sel:permissionSetArn:ProvisionPermissionSet' :: Text
permissionSetArn = Text
a} :: ProvisionPermissionSet)

-- | The entity type for which the assignment will be created.
provisionPermissionSet_targetType :: Lens.Lens' ProvisionPermissionSet ProvisionTargetType
provisionPermissionSet_targetType :: (ProvisionTargetType -> f ProvisionTargetType)
-> ProvisionPermissionSet -> f ProvisionPermissionSet
provisionPermissionSet_targetType = (ProvisionPermissionSet -> ProvisionTargetType)
-> (ProvisionPermissionSet
    -> ProvisionTargetType -> ProvisionPermissionSet)
-> Lens
     ProvisionPermissionSet
     ProvisionPermissionSet
     ProvisionTargetType
     ProvisionTargetType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionPermissionSet' {ProvisionTargetType
targetType :: ProvisionTargetType
$sel:targetType:ProvisionPermissionSet' :: ProvisionPermissionSet -> ProvisionTargetType
targetType} -> ProvisionTargetType
targetType) (\s :: ProvisionPermissionSet
s@ProvisionPermissionSet' {} ProvisionTargetType
a -> ProvisionPermissionSet
s {$sel:targetType:ProvisionPermissionSet' :: ProvisionTargetType
targetType = ProvisionTargetType
a} :: ProvisionPermissionSet)

instance Core.AWSRequest ProvisionPermissionSet where
  type
    AWSResponse ProvisionPermissionSet =
      ProvisionPermissionSetResponse
  request :: ProvisionPermissionSet -> Request ProvisionPermissionSet
request = Service -> ProvisionPermissionSet -> Request ProvisionPermissionSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ProvisionPermissionSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ProvisionPermissionSet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ProvisionPermissionSet))
-> Logger
-> Service
-> Proxy ProvisionPermissionSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ProvisionPermissionSet)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe PermissionSetProvisioningStatus
-> Int -> ProvisionPermissionSetResponse
ProvisionPermissionSetResponse'
            (Maybe PermissionSetProvisioningStatus
 -> Int -> ProvisionPermissionSetResponse)
-> Either String (Maybe PermissionSetProvisioningStatus)
-> Either String (Int -> ProvisionPermissionSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe PermissionSetProvisioningStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PermissionSetProvisioningStatus")
            Either String (Int -> ProvisionPermissionSetResponse)
-> Either String Int
-> Either String ProvisionPermissionSetResponse
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 ProvisionPermissionSet

instance Prelude.NFData ProvisionPermissionSet

instance Core.ToHeaders ProvisionPermissionSet where
  toHeaders :: ProvisionPermissionSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ProvisionPermissionSet -> 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.ProvisionPermissionSet" ::
                          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 ProvisionPermissionSet where
  toJSON :: ProvisionPermissionSet -> Value
toJSON ProvisionPermissionSet' {Maybe Text
Text
ProvisionTargetType
targetType :: ProvisionTargetType
permissionSetArn :: Text
instanceArn :: Text
targetId :: Maybe Text
$sel:targetType:ProvisionPermissionSet' :: ProvisionPermissionSet -> ProvisionTargetType
$sel:permissionSetArn:ProvisionPermissionSet' :: ProvisionPermissionSet -> Text
$sel:instanceArn:ProvisionPermissionSet' :: ProvisionPermissionSet -> Text
$sel:targetId:ProvisionPermissionSet' :: ProvisionPermissionSet -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"TargetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
targetId,
            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
"TargetType" Text -> ProvisionTargetType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ProvisionTargetType
targetType)
          ]
      )

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

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

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

-- |
-- Create a value of 'ProvisionPermissionSetResponse' 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:
--
-- 'permissionSetProvisioningStatus', 'provisionPermissionSetResponse_permissionSetProvisioningStatus' - The status object for the permission set provisioning operation.
--
-- 'httpStatus', 'provisionPermissionSetResponse_httpStatus' - The response's http status code.
newProvisionPermissionSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ProvisionPermissionSetResponse
newProvisionPermissionSetResponse :: Int -> ProvisionPermissionSetResponse
newProvisionPermissionSetResponse Int
pHttpStatus_ =
  ProvisionPermissionSetResponse' :: Maybe PermissionSetProvisioningStatus
-> Int -> ProvisionPermissionSetResponse
ProvisionPermissionSetResponse'
    { $sel:permissionSetProvisioningStatus:ProvisionPermissionSetResponse' :: Maybe PermissionSetProvisioningStatus
permissionSetProvisioningStatus =
        Maybe PermissionSetProvisioningStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ProvisionPermissionSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status object for the permission set provisioning operation.
provisionPermissionSetResponse_permissionSetProvisioningStatus :: Lens.Lens' ProvisionPermissionSetResponse (Prelude.Maybe PermissionSetProvisioningStatus)
provisionPermissionSetResponse_permissionSetProvisioningStatus :: (Maybe PermissionSetProvisioningStatus
 -> f (Maybe PermissionSetProvisioningStatus))
-> ProvisionPermissionSetResponse
-> f ProvisionPermissionSetResponse
provisionPermissionSetResponse_permissionSetProvisioningStatus = (ProvisionPermissionSetResponse
 -> Maybe PermissionSetProvisioningStatus)
-> (ProvisionPermissionSetResponse
    -> Maybe PermissionSetProvisioningStatus
    -> ProvisionPermissionSetResponse)
-> Lens
     ProvisionPermissionSetResponse
     ProvisionPermissionSetResponse
     (Maybe PermissionSetProvisioningStatus)
     (Maybe PermissionSetProvisioningStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionPermissionSetResponse' {Maybe PermissionSetProvisioningStatus
permissionSetProvisioningStatus :: Maybe PermissionSetProvisioningStatus
$sel:permissionSetProvisioningStatus:ProvisionPermissionSetResponse' :: ProvisionPermissionSetResponse
-> Maybe PermissionSetProvisioningStatus
permissionSetProvisioningStatus} -> Maybe PermissionSetProvisioningStatus
permissionSetProvisioningStatus) (\s :: ProvisionPermissionSetResponse
s@ProvisionPermissionSetResponse' {} Maybe PermissionSetProvisioningStatus
a -> ProvisionPermissionSetResponse
s {$sel:permissionSetProvisioningStatus:ProvisionPermissionSetResponse' :: Maybe PermissionSetProvisioningStatus
permissionSetProvisioningStatus = Maybe PermissionSetProvisioningStatus
a} :: ProvisionPermissionSetResponse)

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

instance
  Prelude.NFData
    ProvisionPermissionSetResponse