{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.AccountAssignmentOperationStatus
-- 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)
module Amazonka.SSOAdmin.Types.AccountAssignmentOperationStatus where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSOAdmin.Types.PrincipalType
import Amazonka.SSOAdmin.Types.StatusValues
import Amazonka.SSOAdmin.Types.TargetType

-- | The status of the creation or deletion operation of an assignment that a
-- principal needs to access an account.
--
-- /See:/ 'newAccountAssignmentOperationStatus' smart constructor.
data AccountAssignmentOperationStatus = AccountAssignmentOperationStatus'
  { -- | The identifier for tracking the request operation that is generated by
    -- the universally unique identifier (UUID) workflow.
    AccountAssignmentOperationStatus -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The status of the permission set provisioning process.
    AccountAssignmentOperationStatus -> Maybe StatusValues
status :: Prelude.Maybe StatusValues,
    -- | The message that contains an error or exception in case of an operation
    -- failure.
    AccountAssignmentOperationStatus -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | TargetID is an Amazon Web Services account identifier, typically a 10-12
    -- digit string (For example, 123456789012).
    AccountAssignmentOperationStatus -> Maybe Text
targetId :: Prelude.Maybe Prelude.Text,
    -- | 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>.
    AccountAssignmentOperationStatus -> Maybe Text
principalId :: Prelude.Maybe Prelude.Text,
    -- | The entity type for which the assignment will be created.
    AccountAssignmentOperationStatus -> Maybe PrincipalType
principalType :: Prelude.Maybe PrincipalType,
    -- | The entity type for which the assignment will be created.
    AccountAssignmentOperationStatus -> Maybe TargetType
targetType :: Prelude.Maybe TargetType,
    -- | The date that the permission set was created.
    AccountAssignmentOperationStatus -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | The ARN of the permission set. 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/.
    AccountAssignmentOperationStatus -> Maybe Text
permissionSetArn :: Prelude.Maybe Prelude.Text
  }
  deriving (AccountAssignmentOperationStatus
-> AccountAssignmentOperationStatus -> Bool
(AccountAssignmentOperationStatus
 -> AccountAssignmentOperationStatus -> Bool)
-> (AccountAssignmentOperationStatus
    -> AccountAssignmentOperationStatus -> Bool)
-> Eq AccountAssignmentOperationStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountAssignmentOperationStatus
-> AccountAssignmentOperationStatus -> Bool
$c/= :: AccountAssignmentOperationStatus
-> AccountAssignmentOperationStatus -> Bool
== :: AccountAssignmentOperationStatus
-> AccountAssignmentOperationStatus -> Bool
$c== :: AccountAssignmentOperationStatus
-> AccountAssignmentOperationStatus -> Bool
Prelude.Eq, ReadPrec [AccountAssignmentOperationStatus]
ReadPrec AccountAssignmentOperationStatus
Int -> ReadS AccountAssignmentOperationStatus
ReadS [AccountAssignmentOperationStatus]
(Int -> ReadS AccountAssignmentOperationStatus)
-> ReadS [AccountAssignmentOperationStatus]
-> ReadPrec AccountAssignmentOperationStatus
-> ReadPrec [AccountAssignmentOperationStatus]
-> Read AccountAssignmentOperationStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountAssignmentOperationStatus]
$creadListPrec :: ReadPrec [AccountAssignmentOperationStatus]
readPrec :: ReadPrec AccountAssignmentOperationStatus
$creadPrec :: ReadPrec AccountAssignmentOperationStatus
readList :: ReadS [AccountAssignmentOperationStatus]
$creadList :: ReadS [AccountAssignmentOperationStatus]
readsPrec :: Int -> ReadS AccountAssignmentOperationStatus
$creadsPrec :: Int -> ReadS AccountAssignmentOperationStatus
Prelude.Read, Int -> AccountAssignmentOperationStatus -> ShowS
[AccountAssignmentOperationStatus] -> ShowS
AccountAssignmentOperationStatus -> String
(Int -> AccountAssignmentOperationStatus -> ShowS)
-> (AccountAssignmentOperationStatus -> String)
-> ([AccountAssignmentOperationStatus] -> ShowS)
-> Show AccountAssignmentOperationStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountAssignmentOperationStatus] -> ShowS
$cshowList :: [AccountAssignmentOperationStatus] -> ShowS
show :: AccountAssignmentOperationStatus -> String
$cshow :: AccountAssignmentOperationStatus -> String
showsPrec :: Int -> AccountAssignmentOperationStatus -> ShowS
$cshowsPrec :: Int -> AccountAssignmentOperationStatus -> ShowS
Prelude.Show, (forall x.
 AccountAssignmentOperationStatus
 -> Rep AccountAssignmentOperationStatus x)
-> (forall x.
    Rep AccountAssignmentOperationStatus x
    -> AccountAssignmentOperationStatus)
-> Generic AccountAssignmentOperationStatus
forall x.
Rep AccountAssignmentOperationStatus x
-> AccountAssignmentOperationStatus
forall x.
AccountAssignmentOperationStatus
-> Rep AccountAssignmentOperationStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AccountAssignmentOperationStatus x
-> AccountAssignmentOperationStatus
$cfrom :: forall x.
AccountAssignmentOperationStatus
-> Rep AccountAssignmentOperationStatus x
Prelude.Generic)

-- |
-- Create a value of 'AccountAssignmentOperationStatus' 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:
--
-- 'requestId', 'accountAssignmentOperationStatus_requestId' - The identifier for tracking the request operation that is generated by
-- the universally unique identifier (UUID) workflow.
--
-- 'status', 'accountAssignmentOperationStatus_status' - The status of the permission set provisioning process.
--
-- 'failureReason', 'accountAssignmentOperationStatus_failureReason' - The message that contains an error or exception in case of an operation
-- failure.
--
-- 'targetId', 'accountAssignmentOperationStatus_targetId' - TargetID is an Amazon Web Services account identifier, typically a 10-12
-- digit string (For example, 123456789012).
--
-- 'principalId', 'accountAssignmentOperationStatus_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>.
--
-- 'principalType', 'accountAssignmentOperationStatus_principalType' - The entity type for which the assignment will be created.
--
-- 'targetType', 'accountAssignmentOperationStatus_targetType' - The entity type for which the assignment will be created.
--
-- 'createdDate', 'accountAssignmentOperationStatus_createdDate' - The date that the permission set was created.
--
-- 'permissionSetArn', 'accountAssignmentOperationStatus_permissionSetArn' - The ARN of the permission set. 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/.
newAccountAssignmentOperationStatus ::
  AccountAssignmentOperationStatus
newAccountAssignmentOperationStatus :: AccountAssignmentOperationStatus
newAccountAssignmentOperationStatus =
  AccountAssignmentOperationStatus' :: Maybe Text
-> Maybe StatusValues
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PrincipalType
-> Maybe TargetType
-> Maybe POSIX
-> Maybe Text
-> AccountAssignmentOperationStatus
AccountAssignmentOperationStatus'
    { $sel:requestId:AccountAssignmentOperationStatus' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:AccountAssignmentOperationStatus' :: Maybe StatusValues
status = Maybe StatusValues
forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:AccountAssignmentOperationStatus' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetId:AccountAssignmentOperationStatus' :: Maybe Text
targetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:principalId:AccountAssignmentOperationStatus' :: Maybe Text
principalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:principalType:AccountAssignmentOperationStatus' :: Maybe PrincipalType
principalType = Maybe PrincipalType
forall a. Maybe a
Prelude.Nothing,
      $sel:targetType:AccountAssignmentOperationStatus' :: Maybe TargetType
targetType = Maybe TargetType
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:AccountAssignmentOperationStatus' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:permissionSetArn:AccountAssignmentOperationStatus' :: Maybe Text
permissionSetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The identifier for tracking the request operation that is generated by
-- the universally unique identifier (UUID) workflow.
accountAssignmentOperationStatus_requestId :: Lens.Lens' AccountAssignmentOperationStatus (Prelude.Maybe Prelude.Text)
accountAssignmentOperationStatus_requestId :: (Maybe Text -> f (Maybe Text))
-> AccountAssignmentOperationStatus
-> f AccountAssignmentOperationStatus
accountAssignmentOperationStatus_requestId = (AccountAssignmentOperationStatus -> Maybe Text)
-> (AccountAssignmentOperationStatus
    -> Maybe Text -> AccountAssignmentOperationStatus)
-> Lens
     AccountAssignmentOperationStatus
     AccountAssignmentOperationStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAssignmentOperationStatus' {Maybe Text
requestId :: Maybe Text
$sel:requestId:AccountAssignmentOperationStatus' :: AccountAssignmentOperationStatus -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: AccountAssignmentOperationStatus
s@AccountAssignmentOperationStatus' {} Maybe Text
a -> AccountAssignmentOperationStatus
s {$sel:requestId:AccountAssignmentOperationStatus' :: Maybe Text
requestId = Maybe Text
a} :: AccountAssignmentOperationStatus)

-- | The status of the permission set provisioning process.
accountAssignmentOperationStatus_status :: Lens.Lens' AccountAssignmentOperationStatus (Prelude.Maybe StatusValues)
accountAssignmentOperationStatus_status :: (Maybe StatusValues -> f (Maybe StatusValues))
-> AccountAssignmentOperationStatus
-> f AccountAssignmentOperationStatus
accountAssignmentOperationStatus_status = (AccountAssignmentOperationStatus -> Maybe StatusValues)
-> (AccountAssignmentOperationStatus
    -> Maybe StatusValues -> AccountAssignmentOperationStatus)
-> Lens
     AccountAssignmentOperationStatus
     AccountAssignmentOperationStatus
     (Maybe StatusValues)
     (Maybe StatusValues)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAssignmentOperationStatus' {Maybe StatusValues
status :: Maybe StatusValues
$sel:status:AccountAssignmentOperationStatus' :: AccountAssignmentOperationStatus -> Maybe StatusValues
status} -> Maybe StatusValues
status) (\s :: AccountAssignmentOperationStatus
s@AccountAssignmentOperationStatus' {} Maybe StatusValues
a -> AccountAssignmentOperationStatus
s {$sel:status:AccountAssignmentOperationStatus' :: Maybe StatusValues
status = Maybe StatusValues
a} :: AccountAssignmentOperationStatus)

-- | The message that contains an error or exception in case of an operation
-- failure.
accountAssignmentOperationStatus_failureReason :: Lens.Lens' AccountAssignmentOperationStatus (Prelude.Maybe Prelude.Text)
accountAssignmentOperationStatus_failureReason :: (Maybe Text -> f (Maybe Text))
-> AccountAssignmentOperationStatus
-> f AccountAssignmentOperationStatus
accountAssignmentOperationStatus_failureReason = (AccountAssignmentOperationStatus -> Maybe Text)
-> (AccountAssignmentOperationStatus
    -> Maybe Text -> AccountAssignmentOperationStatus)
-> Lens
     AccountAssignmentOperationStatus
     AccountAssignmentOperationStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAssignmentOperationStatus' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:AccountAssignmentOperationStatus' :: AccountAssignmentOperationStatus -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: AccountAssignmentOperationStatus
s@AccountAssignmentOperationStatus' {} Maybe Text
a -> AccountAssignmentOperationStatus
s {$sel:failureReason:AccountAssignmentOperationStatus' :: Maybe Text
failureReason = Maybe Text
a} :: AccountAssignmentOperationStatus)

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

-- | 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>.
accountAssignmentOperationStatus_principalId :: Lens.Lens' AccountAssignmentOperationStatus (Prelude.Maybe Prelude.Text)
accountAssignmentOperationStatus_principalId :: (Maybe Text -> f (Maybe Text))
-> AccountAssignmentOperationStatus
-> f AccountAssignmentOperationStatus
accountAssignmentOperationStatus_principalId = (AccountAssignmentOperationStatus -> Maybe Text)
-> (AccountAssignmentOperationStatus
    -> Maybe Text -> AccountAssignmentOperationStatus)
-> Lens
     AccountAssignmentOperationStatus
     AccountAssignmentOperationStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAssignmentOperationStatus' {Maybe Text
principalId :: Maybe Text
$sel:principalId:AccountAssignmentOperationStatus' :: AccountAssignmentOperationStatus -> Maybe Text
principalId} -> Maybe Text
principalId) (\s :: AccountAssignmentOperationStatus
s@AccountAssignmentOperationStatus' {} Maybe Text
a -> AccountAssignmentOperationStatus
s {$sel:principalId:AccountAssignmentOperationStatus' :: Maybe Text
principalId = Maybe Text
a} :: AccountAssignmentOperationStatus)

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

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

-- | The date that the permission set was created.
accountAssignmentOperationStatus_createdDate :: Lens.Lens' AccountAssignmentOperationStatus (Prelude.Maybe Prelude.UTCTime)
accountAssignmentOperationStatus_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AccountAssignmentOperationStatus
-> f AccountAssignmentOperationStatus
accountAssignmentOperationStatus_createdDate = (AccountAssignmentOperationStatus -> Maybe POSIX)
-> (AccountAssignmentOperationStatus
    -> Maybe POSIX -> AccountAssignmentOperationStatus)
-> Lens
     AccountAssignmentOperationStatus
     AccountAssignmentOperationStatus
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAssignmentOperationStatus' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:AccountAssignmentOperationStatus' :: AccountAssignmentOperationStatus -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: AccountAssignmentOperationStatus
s@AccountAssignmentOperationStatus' {} Maybe POSIX
a -> AccountAssignmentOperationStatus
s {$sel:createdDate:AccountAssignmentOperationStatus' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: AccountAssignmentOperationStatus) ((Maybe POSIX -> f (Maybe POSIX))
 -> AccountAssignmentOperationStatus
 -> f AccountAssignmentOperationStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AccountAssignmentOperationStatus
-> f AccountAssignmentOperationStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ARN of the permission set. 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/.
accountAssignmentOperationStatus_permissionSetArn :: Lens.Lens' AccountAssignmentOperationStatus (Prelude.Maybe Prelude.Text)
accountAssignmentOperationStatus_permissionSetArn :: (Maybe Text -> f (Maybe Text))
-> AccountAssignmentOperationStatus
-> f AccountAssignmentOperationStatus
accountAssignmentOperationStatus_permissionSetArn = (AccountAssignmentOperationStatus -> Maybe Text)
-> (AccountAssignmentOperationStatus
    -> Maybe Text -> AccountAssignmentOperationStatus)
-> Lens
     AccountAssignmentOperationStatus
     AccountAssignmentOperationStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAssignmentOperationStatus' {Maybe Text
permissionSetArn :: Maybe Text
$sel:permissionSetArn:AccountAssignmentOperationStatus' :: AccountAssignmentOperationStatus -> Maybe Text
permissionSetArn} -> Maybe Text
permissionSetArn) (\s :: AccountAssignmentOperationStatus
s@AccountAssignmentOperationStatus' {} Maybe Text
a -> AccountAssignmentOperationStatus
s {$sel:permissionSetArn:AccountAssignmentOperationStatus' :: Maybe Text
permissionSetArn = Maybe Text
a} :: AccountAssignmentOperationStatus)

instance
  Core.FromJSON
    AccountAssignmentOperationStatus
  where
  parseJSON :: Value -> Parser AccountAssignmentOperationStatus
parseJSON =
    String
-> (Object -> Parser AccountAssignmentOperationStatus)
-> Value
-> Parser AccountAssignmentOperationStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AccountAssignmentOperationStatus"
      ( \Object
x ->
          Maybe Text
-> Maybe StatusValues
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PrincipalType
-> Maybe TargetType
-> Maybe POSIX
-> Maybe Text
-> AccountAssignmentOperationStatus
AccountAssignmentOperationStatus'
            (Maybe Text
 -> Maybe StatusValues
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe PrincipalType
 -> Maybe TargetType
 -> Maybe POSIX
 -> Maybe Text
 -> AccountAssignmentOperationStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe StatusValues
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe PrincipalType
      -> Maybe TargetType
      -> Maybe POSIX
      -> Maybe Text
      -> AccountAssignmentOperationStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequestId")
            Parser
  (Maybe StatusValues
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe PrincipalType
   -> Maybe TargetType
   -> Maybe POSIX
   -> Maybe Text
   -> AccountAssignmentOperationStatus)
-> Parser (Maybe StatusValues)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe PrincipalType
      -> Maybe TargetType
      -> Maybe POSIX
      -> Maybe Text
      -> AccountAssignmentOperationStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StatusValues)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe PrincipalType
   -> Maybe TargetType
   -> Maybe POSIX
   -> Maybe Text
   -> AccountAssignmentOperationStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe PrincipalType
      -> Maybe TargetType
      -> Maybe POSIX
      -> Maybe Text
      -> AccountAssignmentOperationStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FailureReason")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe PrincipalType
   -> Maybe TargetType
   -> Maybe POSIX
   -> Maybe Text
   -> AccountAssignmentOperationStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe PrincipalType
      -> Maybe TargetType
      -> Maybe POSIX
      -> Maybe Text
      -> AccountAssignmentOperationStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TargetId")
            Parser
  (Maybe Text
   -> Maybe PrincipalType
   -> Maybe TargetType
   -> Maybe POSIX
   -> Maybe Text
   -> AccountAssignmentOperationStatus)
-> Parser (Maybe Text)
-> Parser
     (Maybe PrincipalType
      -> Maybe TargetType
      -> Maybe POSIX
      -> Maybe Text
      -> AccountAssignmentOperationStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PrincipalId")
            Parser
  (Maybe PrincipalType
   -> Maybe TargetType
   -> Maybe POSIX
   -> Maybe Text
   -> AccountAssignmentOperationStatus)
-> Parser (Maybe PrincipalType)
-> Parser
     (Maybe TargetType
      -> Maybe POSIX -> Maybe Text -> AccountAssignmentOperationStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PrincipalType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PrincipalType")
            Parser
  (Maybe TargetType
   -> Maybe POSIX -> Maybe Text -> AccountAssignmentOperationStatus)
-> Parser (Maybe TargetType)
-> Parser
     (Maybe POSIX -> Maybe Text -> AccountAssignmentOperationStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TargetType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TargetType")
            Parser
  (Maybe POSIX -> Maybe Text -> AccountAssignmentOperationStatus)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> AccountAssignmentOperationStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedDate")
            Parser (Maybe Text -> AccountAssignmentOperationStatus)
-> Parser (Maybe Text) -> Parser AccountAssignmentOperationStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PermissionSetArn")
      )

instance
  Prelude.Hashable
    AccountAssignmentOperationStatus

instance
  Prelude.NFData
    AccountAssignmentOperationStatus