{-# 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 #-}
module Amazonka.SSOAdmin.Types.AccountAssignmentOperationStatusMetadata where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSOAdmin.Types.StatusValues
data AccountAssignmentOperationStatusMetadata = AccountAssignmentOperationStatusMetadata'
{
AccountAssignmentOperationStatusMetadata -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
AccountAssignmentOperationStatusMetadata -> Maybe StatusValues
status :: Prelude.Maybe StatusValues,
AccountAssignmentOperationStatusMetadata -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX
}
deriving (AccountAssignmentOperationStatusMetadata
-> AccountAssignmentOperationStatusMetadata -> Bool
(AccountAssignmentOperationStatusMetadata
-> AccountAssignmentOperationStatusMetadata -> Bool)
-> (AccountAssignmentOperationStatusMetadata
-> AccountAssignmentOperationStatusMetadata -> Bool)
-> Eq AccountAssignmentOperationStatusMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountAssignmentOperationStatusMetadata
-> AccountAssignmentOperationStatusMetadata -> Bool
$c/= :: AccountAssignmentOperationStatusMetadata
-> AccountAssignmentOperationStatusMetadata -> Bool
== :: AccountAssignmentOperationStatusMetadata
-> AccountAssignmentOperationStatusMetadata -> Bool
$c== :: AccountAssignmentOperationStatusMetadata
-> AccountAssignmentOperationStatusMetadata -> Bool
Prelude.Eq, ReadPrec [AccountAssignmentOperationStatusMetadata]
ReadPrec AccountAssignmentOperationStatusMetadata
Int -> ReadS AccountAssignmentOperationStatusMetadata
ReadS [AccountAssignmentOperationStatusMetadata]
(Int -> ReadS AccountAssignmentOperationStatusMetadata)
-> ReadS [AccountAssignmentOperationStatusMetadata]
-> ReadPrec AccountAssignmentOperationStatusMetadata
-> ReadPrec [AccountAssignmentOperationStatusMetadata]
-> Read AccountAssignmentOperationStatusMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountAssignmentOperationStatusMetadata]
$creadListPrec :: ReadPrec [AccountAssignmentOperationStatusMetadata]
readPrec :: ReadPrec AccountAssignmentOperationStatusMetadata
$creadPrec :: ReadPrec AccountAssignmentOperationStatusMetadata
readList :: ReadS [AccountAssignmentOperationStatusMetadata]
$creadList :: ReadS [AccountAssignmentOperationStatusMetadata]
readsPrec :: Int -> ReadS AccountAssignmentOperationStatusMetadata
$creadsPrec :: Int -> ReadS AccountAssignmentOperationStatusMetadata
Prelude.Read, Int -> AccountAssignmentOperationStatusMetadata -> ShowS
[AccountAssignmentOperationStatusMetadata] -> ShowS
AccountAssignmentOperationStatusMetadata -> String
(Int -> AccountAssignmentOperationStatusMetadata -> ShowS)
-> (AccountAssignmentOperationStatusMetadata -> String)
-> ([AccountAssignmentOperationStatusMetadata] -> ShowS)
-> Show AccountAssignmentOperationStatusMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountAssignmentOperationStatusMetadata] -> ShowS
$cshowList :: [AccountAssignmentOperationStatusMetadata] -> ShowS
show :: AccountAssignmentOperationStatusMetadata -> String
$cshow :: AccountAssignmentOperationStatusMetadata -> String
showsPrec :: Int -> AccountAssignmentOperationStatusMetadata -> ShowS
$cshowsPrec :: Int -> AccountAssignmentOperationStatusMetadata -> ShowS
Prelude.Show, (forall x.
AccountAssignmentOperationStatusMetadata
-> Rep AccountAssignmentOperationStatusMetadata x)
-> (forall x.
Rep AccountAssignmentOperationStatusMetadata x
-> AccountAssignmentOperationStatusMetadata)
-> Generic AccountAssignmentOperationStatusMetadata
forall x.
Rep AccountAssignmentOperationStatusMetadata x
-> AccountAssignmentOperationStatusMetadata
forall x.
AccountAssignmentOperationStatusMetadata
-> Rep AccountAssignmentOperationStatusMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AccountAssignmentOperationStatusMetadata x
-> AccountAssignmentOperationStatusMetadata
$cfrom :: forall x.
AccountAssignmentOperationStatusMetadata
-> Rep AccountAssignmentOperationStatusMetadata x
Prelude.Generic)
newAccountAssignmentOperationStatusMetadata ::
AccountAssignmentOperationStatusMetadata
newAccountAssignmentOperationStatusMetadata :: AccountAssignmentOperationStatusMetadata
newAccountAssignmentOperationStatusMetadata =
AccountAssignmentOperationStatusMetadata' :: Maybe Text
-> Maybe StatusValues
-> Maybe POSIX
-> AccountAssignmentOperationStatusMetadata
AccountAssignmentOperationStatusMetadata'
{ $sel:requestId:AccountAssignmentOperationStatusMetadata' :: Maybe Text
requestId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:AccountAssignmentOperationStatusMetadata' :: Maybe StatusValues
status = Maybe StatusValues
forall a. Maybe a
Prelude.Nothing,
$sel:createdDate:AccountAssignmentOperationStatusMetadata' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
accountAssignmentOperationStatusMetadata_requestId :: Lens.Lens' AccountAssignmentOperationStatusMetadata (Prelude.Maybe Prelude.Text)
accountAssignmentOperationStatusMetadata_requestId :: (Maybe Text -> f (Maybe Text))
-> AccountAssignmentOperationStatusMetadata
-> f AccountAssignmentOperationStatusMetadata
accountAssignmentOperationStatusMetadata_requestId = (AccountAssignmentOperationStatusMetadata -> Maybe Text)
-> (AccountAssignmentOperationStatusMetadata
-> Maybe Text -> AccountAssignmentOperationStatusMetadata)
-> Lens
AccountAssignmentOperationStatusMetadata
AccountAssignmentOperationStatusMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAssignmentOperationStatusMetadata' {Maybe Text
requestId :: Maybe Text
$sel:requestId:AccountAssignmentOperationStatusMetadata' :: AccountAssignmentOperationStatusMetadata -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: AccountAssignmentOperationStatusMetadata
s@AccountAssignmentOperationStatusMetadata' {} Maybe Text
a -> AccountAssignmentOperationStatusMetadata
s {$sel:requestId:AccountAssignmentOperationStatusMetadata' :: Maybe Text
requestId = Maybe Text
a} :: AccountAssignmentOperationStatusMetadata)
accountAssignmentOperationStatusMetadata_status :: Lens.Lens' AccountAssignmentOperationStatusMetadata (Prelude.Maybe StatusValues)
accountAssignmentOperationStatusMetadata_status :: (Maybe StatusValues -> f (Maybe StatusValues))
-> AccountAssignmentOperationStatusMetadata
-> f AccountAssignmentOperationStatusMetadata
accountAssignmentOperationStatusMetadata_status = (AccountAssignmentOperationStatusMetadata -> Maybe StatusValues)
-> (AccountAssignmentOperationStatusMetadata
-> Maybe StatusValues -> AccountAssignmentOperationStatusMetadata)
-> Lens
AccountAssignmentOperationStatusMetadata
AccountAssignmentOperationStatusMetadata
(Maybe StatusValues)
(Maybe StatusValues)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAssignmentOperationStatusMetadata' {Maybe StatusValues
status :: Maybe StatusValues
$sel:status:AccountAssignmentOperationStatusMetadata' :: AccountAssignmentOperationStatusMetadata -> Maybe StatusValues
status} -> Maybe StatusValues
status) (\s :: AccountAssignmentOperationStatusMetadata
s@AccountAssignmentOperationStatusMetadata' {} Maybe StatusValues
a -> AccountAssignmentOperationStatusMetadata
s {$sel:status:AccountAssignmentOperationStatusMetadata' :: Maybe StatusValues
status = Maybe StatusValues
a} :: AccountAssignmentOperationStatusMetadata)
accountAssignmentOperationStatusMetadata_createdDate :: Lens.Lens' AccountAssignmentOperationStatusMetadata (Prelude.Maybe Prelude.UTCTime)
accountAssignmentOperationStatusMetadata_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AccountAssignmentOperationStatusMetadata
-> f AccountAssignmentOperationStatusMetadata
accountAssignmentOperationStatusMetadata_createdDate = (AccountAssignmentOperationStatusMetadata -> Maybe POSIX)
-> (AccountAssignmentOperationStatusMetadata
-> Maybe POSIX -> AccountAssignmentOperationStatusMetadata)
-> Lens
AccountAssignmentOperationStatusMetadata
AccountAssignmentOperationStatusMetadata
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountAssignmentOperationStatusMetadata' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:AccountAssignmentOperationStatusMetadata' :: AccountAssignmentOperationStatusMetadata -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: AccountAssignmentOperationStatusMetadata
s@AccountAssignmentOperationStatusMetadata' {} Maybe POSIX
a -> AccountAssignmentOperationStatusMetadata
s {$sel:createdDate:AccountAssignmentOperationStatusMetadata' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: AccountAssignmentOperationStatusMetadata) ((Maybe POSIX -> f (Maybe POSIX))
-> AccountAssignmentOperationStatusMetadata
-> f AccountAssignmentOperationStatusMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AccountAssignmentOperationStatusMetadata
-> f AccountAssignmentOperationStatusMetadata
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
instance
Core.FromJSON
AccountAssignmentOperationStatusMetadata
where
parseJSON :: Value -> Parser AccountAssignmentOperationStatusMetadata
parseJSON =
String
-> (Object -> Parser AccountAssignmentOperationStatusMetadata)
-> Value
-> Parser AccountAssignmentOperationStatusMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AccountAssignmentOperationStatusMetadata"
( \Object
x ->
Maybe Text
-> Maybe StatusValues
-> Maybe POSIX
-> AccountAssignmentOperationStatusMetadata
AccountAssignmentOperationStatusMetadata'
(Maybe Text
-> Maybe StatusValues
-> Maybe POSIX
-> AccountAssignmentOperationStatusMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe StatusValues
-> Maybe POSIX -> AccountAssignmentOperationStatusMetadata)
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 POSIX -> AccountAssignmentOperationStatusMetadata)
-> Parser (Maybe StatusValues)
-> Parser (Maybe POSIX -> AccountAssignmentOperationStatusMetadata)
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 POSIX -> AccountAssignmentOperationStatusMetadata)
-> Parser (Maybe POSIX)
-> Parser AccountAssignmentOperationStatusMetadata
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")
)
instance
Prelude.Hashable
AccountAssignmentOperationStatusMetadata
instance
Prelude.NFData
AccountAssignmentOperationStatusMetadata