{-# 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.DeleteAccountAssignment
-- 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)
--
-- Deletes a principal\'s access from a specified Amazon Web Services
-- account using a specified permission set.
module Amazonka.SSOAdmin.DeleteAccountAssignment
  ( -- * Creating a Request
    DeleteAccountAssignment (..),
    newDeleteAccountAssignment,

    -- * Request Lenses
    deleteAccountAssignment_instanceArn,
    deleteAccountAssignment_targetId,
    deleteAccountAssignment_targetType,
    deleteAccountAssignment_permissionSetArn,
    deleteAccountAssignment_principalType,
    deleteAccountAssignment_principalId,

    -- * Destructuring the Response
    DeleteAccountAssignmentResponse (..),
    newDeleteAccountAssignmentResponse,

    -- * Response Lenses
    deleteAccountAssignmentResponse_accountAssignmentDeletionStatus,
    deleteAccountAssignmentResponse_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:/ 'newDeleteAccountAssignment' smart constructor.
data DeleteAccountAssignment = DeleteAccountAssignment'
  { -- | 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/.
    DeleteAccountAssignment -> Text
instanceArn :: Prelude.Text,
    -- | TargetID is an Amazon Web Services account identifier, typically a 10-12
    -- digit string (For example, 123456789012).
    DeleteAccountAssignment -> Text
targetId :: Prelude.Text,
    -- | The entity type for which the assignment will be deleted.
    DeleteAccountAssignment -> TargetType
targetType :: TargetType,
    -- | The ARN of the permission set that will be used to remove access.
    DeleteAccountAssignment -> Text
permissionSetArn :: Prelude.Text,
    -- | The entity type for which the assignment will be deleted.
    DeleteAccountAssignment -> PrincipalType
principalType :: PrincipalType,
    -- | An identifier for an object in Amazon Web Services SSO, such as a user
    -- or group. PrincipalIds are GUIDs (For example,
    -- f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about
    -- PrincipalIds in Amazon Web Services SSO, see the
    -- </singlesignon/latest/IdentityStoreAPIReference/welcome.html Amazon Web Services SSO Identity Store API Reference>.
    DeleteAccountAssignment -> Text
principalId :: Prelude.Text
  }
  deriving (DeleteAccountAssignment -> DeleteAccountAssignment -> Bool
(DeleteAccountAssignment -> DeleteAccountAssignment -> Bool)
-> (DeleteAccountAssignment -> DeleteAccountAssignment -> Bool)
-> Eq DeleteAccountAssignment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAccountAssignment -> DeleteAccountAssignment -> Bool
$c/= :: DeleteAccountAssignment -> DeleteAccountAssignment -> Bool
== :: DeleteAccountAssignment -> DeleteAccountAssignment -> Bool
$c== :: DeleteAccountAssignment -> DeleteAccountAssignment -> Bool
Prelude.Eq, ReadPrec [DeleteAccountAssignment]
ReadPrec DeleteAccountAssignment
Int -> ReadS DeleteAccountAssignment
ReadS [DeleteAccountAssignment]
(Int -> ReadS DeleteAccountAssignment)
-> ReadS [DeleteAccountAssignment]
-> ReadPrec DeleteAccountAssignment
-> ReadPrec [DeleteAccountAssignment]
-> Read DeleteAccountAssignment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAccountAssignment]
$creadListPrec :: ReadPrec [DeleteAccountAssignment]
readPrec :: ReadPrec DeleteAccountAssignment
$creadPrec :: ReadPrec DeleteAccountAssignment
readList :: ReadS [DeleteAccountAssignment]
$creadList :: ReadS [DeleteAccountAssignment]
readsPrec :: Int -> ReadS DeleteAccountAssignment
$creadsPrec :: Int -> ReadS DeleteAccountAssignment
Prelude.Read, Int -> DeleteAccountAssignment -> ShowS
[DeleteAccountAssignment] -> ShowS
DeleteAccountAssignment -> String
(Int -> DeleteAccountAssignment -> ShowS)
-> (DeleteAccountAssignment -> String)
-> ([DeleteAccountAssignment] -> ShowS)
-> Show DeleteAccountAssignment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAccountAssignment] -> ShowS
$cshowList :: [DeleteAccountAssignment] -> ShowS
show :: DeleteAccountAssignment -> String
$cshow :: DeleteAccountAssignment -> String
showsPrec :: Int -> DeleteAccountAssignment -> ShowS
$cshowsPrec :: Int -> DeleteAccountAssignment -> ShowS
Prelude.Show, (forall x.
 DeleteAccountAssignment -> Rep DeleteAccountAssignment x)
-> (forall x.
    Rep DeleteAccountAssignment x -> DeleteAccountAssignment)
-> Generic DeleteAccountAssignment
forall x. Rep DeleteAccountAssignment x -> DeleteAccountAssignment
forall x. DeleteAccountAssignment -> Rep DeleteAccountAssignment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAccountAssignment x -> DeleteAccountAssignment
$cfrom :: forall x. DeleteAccountAssignment -> Rep DeleteAccountAssignment x
Prelude.Generic)

-- |
-- Create a value of 'DeleteAccountAssignment' 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', 'deleteAccountAssignment_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/.
--
-- 'targetId', 'deleteAccountAssignment_targetId' - TargetID is an Amazon Web Services account identifier, typically a 10-12
-- digit string (For example, 123456789012).
--
-- 'targetType', 'deleteAccountAssignment_targetType' - The entity type for which the assignment will be deleted.
--
-- 'permissionSetArn', 'deleteAccountAssignment_permissionSetArn' - The ARN of the permission set that will be used to remove access.
--
-- 'principalType', 'deleteAccountAssignment_principalType' - The entity type for which the assignment will be deleted.
--
-- 'principalId', 'deleteAccountAssignment_principalId' - An identifier for an object in Amazon Web Services SSO, such as a user
-- or group. PrincipalIds are GUIDs (For example,
-- f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about
-- PrincipalIds in Amazon Web Services SSO, see the
-- </singlesignon/latest/IdentityStoreAPIReference/welcome.html Amazon Web Services SSO Identity Store API Reference>.
newDeleteAccountAssignment ::
  -- | 'instanceArn'
  Prelude.Text ->
  -- | 'targetId'
  Prelude.Text ->
  -- | 'targetType'
  TargetType ->
  -- | 'permissionSetArn'
  Prelude.Text ->
  -- | 'principalType'
  PrincipalType ->
  -- | 'principalId'
  Prelude.Text ->
  DeleteAccountAssignment
newDeleteAccountAssignment :: Text
-> Text
-> TargetType
-> Text
-> PrincipalType
-> Text
-> DeleteAccountAssignment
newDeleteAccountAssignment
  Text
pInstanceArn_
  Text
pTargetId_
  TargetType
pTargetType_
  Text
pPermissionSetArn_
  PrincipalType
pPrincipalType_
  Text
pPrincipalId_ =
    DeleteAccountAssignment' :: Text
-> Text
-> TargetType
-> Text
-> PrincipalType
-> Text
-> DeleteAccountAssignment
DeleteAccountAssignment'
      { $sel:instanceArn:DeleteAccountAssignment' :: Text
instanceArn =
          Text
pInstanceArn_,
        $sel:targetId:DeleteAccountAssignment' :: Text
targetId = Text
pTargetId_,
        $sel:targetType:DeleteAccountAssignment' :: TargetType
targetType = TargetType
pTargetType_,
        $sel:permissionSetArn:DeleteAccountAssignment' :: Text
permissionSetArn = Text
pPermissionSetArn_,
        $sel:principalType:DeleteAccountAssignment' :: PrincipalType
principalType = PrincipalType
pPrincipalType_,
        $sel:principalId:DeleteAccountAssignment' :: Text
principalId = Text
pPrincipalId_
      }

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

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

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

-- | The ARN of the permission set that will be used to remove access.
deleteAccountAssignment_permissionSetArn :: Lens.Lens' DeleteAccountAssignment Prelude.Text
deleteAccountAssignment_permissionSetArn :: (Text -> f Text)
-> DeleteAccountAssignment -> f DeleteAccountAssignment
deleteAccountAssignment_permissionSetArn = (DeleteAccountAssignment -> Text)
-> (DeleteAccountAssignment -> Text -> DeleteAccountAssignment)
-> Lens DeleteAccountAssignment DeleteAccountAssignment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAccountAssignment' {Text
permissionSetArn :: Text
$sel:permissionSetArn:DeleteAccountAssignment' :: DeleteAccountAssignment -> Text
permissionSetArn} -> Text
permissionSetArn) (\s :: DeleteAccountAssignment
s@DeleteAccountAssignment' {} Text
a -> DeleteAccountAssignment
s {$sel:permissionSetArn:DeleteAccountAssignment' :: Text
permissionSetArn = Text
a} :: DeleteAccountAssignment)

-- | The entity type for which the assignment will be deleted.
deleteAccountAssignment_principalType :: Lens.Lens' DeleteAccountAssignment PrincipalType
deleteAccountAssignment_principalType :: (PrincipalType -> f PrincipalType)
-> DeleteAccountAssignment -> f DeleteAccountAssignment
deleteAccountAssignment_principalType = (DeleteAccountAssignment -> PrincipalType)
-> (DeleteAccountAssignment
    -> PrincipalType -> DeleteAccountAssignment)
-> Lens
     DeleteAccountAssignment
     DeleteAccountAssignment
     PrincipalType
     PrincipalType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAccountAssignment' {PrincipalType
principalType :: PrincipalType
$sel:principalType:DeleteAccountAssignment' :: DeleteAccountAssignment -> PrincipalType
principalType} -> PrincipalType
principalType) (\s :: DeleteAccountAssignment
s@DeleteAccountAssignment' {} PrincipalType
a -> DeleteAccountAssignment
s {$sel:principalType:DeleteAccountAssignment' :: PrincipalType
principalType = PrincipalType
a} :: DeleteAccountAssignment)

-- | An identifier for an object in Amazon Web Services SSO, such as a user
-- or group. PrincipalIds are GUIDs (For example,
-- f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about
-- PrincipalIds in Amazon Web Services SSO, see the
-- </singlesignon/latest/IdentityStoreAPIReference/welcome.html Amazon Web Services SSO Identity Store API Reference>.
deleteAccountAssignment_principalId :: Lens.Lens' DeleteAccountAssignment Prelude.Text
deleteAccountAssignment_principalId :: (Text -> f Text)
-> DeleteAccountAssignment -> f DeleteAccountAssignment
deleteAccountAssignment_principalId = (DeleteAccountAssignment -> Text)
-> (DeleteAccountAssignment -> Text -> DeleteAccountAssignment)
-> Lens DeleteAccountAssignment DeleteAccountAssignment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAccountAssignment' {Text
principalId :: Text
$sel:principalId:DeleteAccountAssignment' :: DeleteAccountAssignment -> Text
principalId} -> Text
principalId) (\s :: DeleteAccountAssignment
s@DeleteAccountAssignment' {} Text
a -> DeleteAccountAssignment
s {$sel:principalId:DeleteAccountAssignment' :: Text
principalId = Text
a} :: DeleteAccountAssignment)

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

instance Prelude.NFData DeleteAccountAssignment

instance Core.ToHeaders DeleteAccountAssignment where
  toHeaders :: DeleteAccountAssignment -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeleteAccountAssignment -> 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.DeleteAccountAssignment" ::
                          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 DeleteAccountAssignment where
  toJSON :: DeleteAccountAssignment -> Value
toJSON DeleteAccountAssignment' {Text
PrincipalType
TargetType
principalId :: Text
principalType :: PrincipalType
permissionSetArn :: Text
targetType :: TargetType
targetId :: Text
instanceArn :: Text
$sel:principalId:DeleteAccountAssignment' :: DeleteAccountAssignment -> Text
$sel:principalType:DeleteAccountAssignment' :: DeleteAccountAssignment -> PrincipalType
$sel:permissionSetArn:DeleteAccountAssignment' :: DeleteAccountAssignment -> Text
$sel:targetType:DeleteAccountAssignment' :: DeleteAccountAssignment -> TargetType
$sel:targetId:DeleteAccountAssignment' :: DeleteAccountAssignment -> Text
$sel:instanceArn:DeleteAccountAssignment' :: DeleteAccountAssignment -> 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
"TargetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
targetId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TargetType" Text -> TargetType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= TargetType
targetType),
            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
"PrincipalType" Text -> PrincipalType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PrincipalType
principalType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PrincipalId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
principalId)
          ]
      )

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

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

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

-- |
-- Create a value of 'DeleteAccountAssignmentResponse' 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:
--
-- 'accountAssignmentDeletionStatus', 'deleteAccountAssignmentResponse_accountAssignmentDeletionStatus' - The status object for the account assignment deletion operation.
--
-- 'httpStatus', 'deleteAccountAssignmentResponse_httpStatus' - The response's http status code.
newDeleteAccountAssignmentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteAccountAssignmentResponse
newDeleteAccountAssignmentResponse :: Int -> DeleteAccountAssignmentResponse
newDeleteAccountAssignmentResponse Int
pHttpStatus_ =
  DeleteAccountAssignmentResponse' :: Maybe AccountAssignmentOperationStatus
-> Int -> DeleteAccountAssignmentResponse
DeleteAccountAssignmentResponse'
    { $sel:accountAssignmentDeletionStatus:DeleteAccountAssignmentResponse' :: Maybe AccountAssignmentOperationStatus
accountAssignmentDeletionStatus =
        Maybe AccountAssignmentOperationStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteAccountAssignmentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status object for the account assignment deletion operation.
deleteAccountAssignmentResponse_accountAssignmentDeletionStatus :: Lens.Lens' DeleteAccountAssignmentResponse (Prelude.Maybe AccountAssignmentOperationStatus)
deleteAccountAssignmentResponse_accountAssignmentDeletionStatus :: (Maybe AccountAssignmentOperationStatus
 -> f (Maybe AccountAssignmentOperationStatus))
-> DeleteAccountAssignmentResponse
-> f DeleteAccountAssignmentResponse
deleteAccountAssignmentResponse_accountAssignmentDeletionStatus = (DeleteAccountAssignmentResponse
 -> Maybe AccountAssignmentOperationStatus)
-> (DeleteAccountAssignmentResponse
    -> Maybe AccountAssignmentOperationStatus
    -> DeleteAccountAssignmentResponse)
-> Lens
     DeleteAccountAssignmentResponse
     DeleteAccountAssignmentResponse
     (Maybe AccountAssignmentOperationStatus)
     (Maybe AccountAssignmentOperationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAccountAssignmentResponse' {Maybe AccountAssignmentOperationStatus
accountAssignmentDeletionStatus :: Maybe AccountAssignmentOperationStatus
$sel:accountAssignmentDeletionStatus:DeleteAccountAssignmentResponse' :: DeleteAccountAssignmentResponse
-> Maybe AccountAssignmentOperationStatus
accountAssignmentDeletionStatus} -> Maybe AccountAssignmentOperationStatus
accountAssignmentDeletionStatus) (\s :: DeleteAccountAssignmentResponse
s@DeleteAccountAssignmentResponse' {} Maybe AccountAssignmentOperationStatus
a -> DeleteAccountAssignmentResponse
s {$sel:accountAssignmentDeletionStatus:DeleteAccountAssignmentResponse' :: Maybe AccountAssignmentOperationStatus
accountAssignmentDeletionStatus = Maybe AccountAssignmentOperationStatus
a} :: DeleteAccountAssignmentResponse)

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

instance
  Prelude.NFData
    DeleteAccountAssignmentResponse