{-# 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.Organizations.Types.DelegatedAdministrator where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Organizations.Types.AccountJoinedMethod
import Amazonka.Organizations.Types.AccountStatus
import qualified Amazonka.Prelude as Prelude
data DelegatedAdministrator = DelegatedAdministrator'
{
DelegatedAdministrator -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DelegatedAdministrator -> Maybe POSIX
delegationEnabledDate :: Prelude.Maybe Data.POSIX,
DelegatedAdministrator -> Maybe (Sensitive Text)
email :: Prelude.Maybe (Data.Sensitive Prelude.Text),
DelegatedAdministrator -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
DelegatedAdministrator -> Maybe AccountJoinedMethod
joinedMethod :: Prelude.Maybe AccountJoinedMethod,
DelegatedAdministrator -> Maybe POSIX
joinedTimestamp :: Prelude.Maybe Data.POSIX,
DelegatedAdministrator -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Data.Sensitive Prelude.Text),
DelegatedAdministrator -> Maybe AccountStatus
status :: Prelude.Maybe AccountStatus
}
deriving (DelegatedAdministrator -> DelegatedAdministrator -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DelegatedAdministrator -> DelegatedAdministrator -> Bool
$c/= :: DelegatedAdministrator -> DelegatedAdministrator -> Bool
== :: DelegatedAdministrator -> DelegatedAdministrator -> Bool
$c== :: DelegatedAdministrator -> DelegatedAdministrator -> Bool
Prelude.Eq, Int -> DelegatedAdministrator -> ShowS
[DelegatedAdministrator] -> ShowS
DelegatedAdministrator -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DelegatedAdministrator] -> ShowS
$cshowList :: [DelegatedAdministrator] -> ShowS
show :: DelegatedAdministrator -> String
$cshow :: DelegatedAdministrator -> String
showsPrec :: Int -> DelegatedAdministrator -> ShowS
$cshowsPrec :: Int -> DelegatedAdministrator -> ShowS
Prelude.Show, forall x. Rep DelegatedAdministrator x -> DelegatedAdministrator
forall x. DelegatedAdministrator -> Rep DelegatedAdministrator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DelegatedAdministrator x -> DelegatedAdministrator
$cfrom :: forall x. DelegatedAdministrator -> Rep DelegatedAdministrator x
Prelude.Generic)
newDelegatedAdministrator ::
DelegatedAdministrator
newDelegatedAdministrator :: DelegatedAdministrator
newDelegatedAdministrator =
DelegatedAdministrator'
{ $sel:arn:DelegatedAdministrator' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:delegationEnabledDate:DelegatedAdministrator' :: Maybe POSIX
delegationEnabledDate = forall a. Maybe a
Prelude.Nothing,
$sel:email:DelegatedAdministrator' :: Maybe (Sensitive Text)
email = forall a. Maybe a
Prelude.Nothing,
$sel:id:DelegatedAdministrator' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:joinedMethod:DelegatedAdministrator' :: Maybe AccountJoinedMethod
joinedMethod = forall a. Maybe a
Prelude.Nothing,
$sel:joinedTimestamp:DelegatedAdministrator' :: Maybe POSIX
joinedTimestamp = forall a. Maybe a
Prelude.Nothing,
$sel:name:DelegatedAdministrator' :: Maybe (Sensitive Text)
name = forall a. Maybe a
Prelude.Nothing,
$sel:status:DelegatedAdministrator' :: Maybe AccountStatus
status = forall a. Maybe a
Prelude.Nothing
}
delegatedAdministrator_arn :: Lens.Lens' DelegatedAdministrator (Prelude.Maybe Prelude.Text)
delegatedAdministrator_arn :: Lens' DelegatedAdministrator (Maybe Text)
delegatedAdministrator_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DelegatedAdministrator' {Maybe Text
arn :: Maybe Text
$sel:arn:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DelegatedAdministrator
s@DelegatedAdministrator' {} Maybe Text
a -> DelegatedAdministrator
s {$sel:arn:DelegatedAdministrator' :: Maybe Text
arn = Maybe Text
a} :: DelegatedAdministrator)
delegatedAdministrator_delegationEnabledDate :: Lens.Lens' DelegatedAdministrator (Prelude.Maybe Prelude.UTCTime)
delegatedAdministrator_delegationEnabledDate :: Lens' DelegatedAdministrator (Maybe UTCTime)
delegatedAdministrator_delegationEnabledDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DelegatedAdministrator' {Maybe POSIX
delegationEnabledDate :: Maybe POSIX
$sel:delegationEnabledDate:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe POSIX
delegationEnabledDate} -> Maybe POSIX
delegationEnabledDate) (\s :: DelegatedAdministrator
s@DelegatedAdministrator' {} Maybe POSIX
a -> DelegatedAdministrator
s {$sel:delegationEnabledDate:DelegatedAdministrator' :: Maybe POSIX
delegationEnabledDate = Maybe POSIX
a} :: DelegatedAdministrator) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
delegatedAdministrator_email :: Lens.Lens' DelegatedAdministrator (Prelude.Maybe Prelude.Text)
delegatedAdministrator_email :: Lens' DelegatedAdministrator (Maybe Text)
delegatedAdministrator_email = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DelegatedAdministrator' {Maybe (Sensitive Text)
email :: Maybe (Sensitive Text)
$sel:email:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe (Sensitive Text)
email} -> Maybe (Sensitive Text)
email) (\s :: DelegatedAdministrator
s@DelegatedAdministrator' {} Maybe (Sensitive Text)
a -> DelegatedAdministrator
s {$sel:email:DelegatedAdministrator' :: Maybe (Sensitive Text)
email = Maybe (Sensitive Text)
a} :: DelegatedAdministrator) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
delegatedAdministrator_id :: Lens.Lens' DelegatedAdministrator (Prelude.Maybe Prelude.Text)
delegatedAdministrator_id :: Lens' DelegatedAdministrator (Maybe Text)
delegatedAdministrator_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DelegatedAdministrator' {Maybe Text
id :: Maybe Text
$sel:id:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe Text
id} -> Maybe Text
id) (\s :: DelegatedAdministrator
s@DelegatedAdministrator' {} Maybe Text
a -> DelegatedAdministrator
s {$sel:id:DelegatedAdministrator' :: Maybe Text
id = Maybe Text
a} :: DelegatedAdministrator)
delegatedAdministrator_joinedMethod :: Lens.Lens' DelegatedAdministrator (Prelude.Maybe AccountJoinedMethod)
delegatedAdministrator_joinedMethod :: Lens' DelegatedAdministrator (Maybe AccountJoinedMethod)
delegatedAdministrator_joinedMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DelegatedAdministrator' {Maybe AccountJoinedMethod
joinedMethod :: Maybe AccountJoinedMethod
$sel:joinedMethod:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe AccountJoinedMethod
joinedMethod} -> Maybe AccountJoinedMethod
joinedMethod) (\s :: DelegatedAdministrator
s@DelegatedAdministrator' {} Maybe AccountJoinedMethod
a -> DelegatedAdministrator
s {$sel:joinedMethod:DelegatedAdministrator' :: Maybe AccountJoinedMethod
joinedMethod = Maybe AccountJoinedMethod
a} :: DelegatedAdministrator)
delegatedAdministrator_joinedTimestamp :: Lens.Lens' DelegatedAdministrator (Prelude.Maybe Prelude.UTCTime)
delegatedAdministrator_joinedTimestamp :: Lens' DelegatedAdministrator (Maybe UTCTime)
delegatedAdministrator_joinedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DelegatedAdministrator' {Maybe POSIX
joinedTimestamp :: Maybe POSIX
$sel:joinedTimestamp:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe POSIX
joinedTimestamp} -> Maybe POSIX
joinedTimestamp) (\s :: DelegatedAdministrator
s@DelegatedAdministrator' {} Maybe POSIX
a -> DelegatedAdministrator
s {$sel:joinedTimestamp:DelegatedAdministrator' :: Maybe POSIX
joinedTimestamp = Maybe POSIX
a} :: DelegatedAdministrator) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
delegatedAdministrator_name :: Lens.Lens' DelegatedAdministrator (Prelude.Maybe Prelude.Text)
delegatedAdministrator_name :: Lens' DelegatedAdministrator (Maybe Text)
delegatedAdministrator_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DelegatedAdministrator' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: DelegatedAdministrator
s@DelegatedAdministrator' {} Maybe (Sensitive Text)
a -> DelegatedAdministrator
s {$sel:name:DelegatedAdministrator' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: DelegatedAdministrator) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
delegatedAdministrator_status :: Lens.Lens' DelegatedAdministrator (Prelude.Maybe AccountStatus)
delegatedAdministrator_status :: Lens' DelegatedAdministrator (Maybe AccountStatus)
delegatedAdministrator_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DelegatedAdministrator' {Maybe AccountStatus
status :: Maybe AccountStatus
$sel:status:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe AccountStatus
status} -> Maybe AccountStatus
status) (\s :: DelegatedAdministrator
s@DelegatedAdministrator' {} Maybe AccountStatus
a -> DelegatedAdministrator
s {$sel:status:DelegatedAdministrator' :: Maybe AccountStatus
status = Maybe AccountStatus
a} :: DelegatedAdministrator)
instance Data.FromJSON DelegatedAdministrator where
parseJSON :: Value -> Parser DelegatedAdministrator
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DelegatedAdministrator"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe AccountJoinedMethod
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe AccountStatus
-> DelegatedAdministrator
DelegatedAdministrator'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DelegationEnabledDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Email")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"JoinedMethod")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"JoinedTimestamp")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
)
instance Prelude.Hashable DelegatedAdministrator where
hashWithSalt :: Int -> DelegatedAdministrator -> Int
hashWithSalt Int
_salt DelegatedAdministrator' {Maybe Text
Maybe (Sensitive Text)
Maybe POSIX
Maybe AccountJoinedMethod
Maybe AccountStatus
status :: Maybe AccountStatus
name :: Maybe (Sensitive Text)
joinedTimestamp :: Maybe POSIX
joinedMethod :: Maybe AccountJoinedMethod
id :: Maybe Text
email :: Maybe (Sensitive Text)
delegationEnabledDate :: Maybe POSIX
arn :: Maybe Text
$sel:status:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe AccountStatus
$sel:name:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe (Sensitive Text)
$sel:joinedTimestamp:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe POSIX
$sel:joinedMethod:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe AccountJoinedMethod
$sel:id:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe Text
$sel:email:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe (Sensitive Text)
$sel:delegationEnabledDate:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe POSIX
$sel:arn:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
delegationEnabledDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
email
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AccountJoinedMethod
joinedMethod
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
joinedTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AccountStatus
status
instance Prelude.NFData DelegatedAdministrator where
rnf :: DelegatedAdministrator -> ()
rnf DelegatedAdministrator' {Maybe Text
Maybe (Sensitive Text)
Maybe POSIX
Maybe AccountJoinedMethod
Maybe AccountStatus
status :: Maybe AccountStatus
name :: Maybe (Sensitive Text)
joinedTimestamp :: Maybe POSIX
joinedMethod :: Maybe AccountJoinedMethod
id :: Maybe Text
email :: Maybe (Sensitive Text)
delegationEnabledDate :: Maybe POSIX
arn :: Maybe Text
$sel:status:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe AccountStatus
$sel:name:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe (Sensitive Text)
$sel:joinedTimestamp:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe POSIX
$sel:joinedMethod:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe AccountJoinedMethod
$sel:id:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe Text
$sel:email:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe (Sensitive Text)
$sel:delegationEnabledDate:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe POSIX
$sel:arn:DelegatedAdministrator' :: DelegatedAdministrator -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
delegationEnabledDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
email
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AccountJoinedMethod
joinedMethod
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
joinedTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AccountStatus
status