{-# 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.MacieV2.Types.UserIdentityRoot where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data UserIdentityRoot = UserIdentityRoot'
{
UserIdentityRoot -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
UserIdentityRoot -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
UserIdentityRoot -> Maybe Text
principalId :: Prelude.Maybe Prelude.Text
}
deriving (UserIdentityRoot -> UserIdentityRoot -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserIdentityRoot -> UserIdentityRoot -> Bool
$c/= :: UserIdentityRoot -> UserIdentityRoot -> Bool
== :: UserIdentityRoot -> UserIdentityRoot -> Bool
$c== :: UserIdentityRoot -> UserIdentityRoot -> Bool
Prelude.Eq, ReadPrec [UserIdentityRoot]
ReadPrec UserIdentityRoot
Int -> ReadS UserIdentityRoot
ReadS [UserIdentityRoot]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UserIdentityRoot]
$creadListPrec :: ReadPrec [UserIdentityRoot]
readPrec :: ReadPrec UserIdentityRoot
$creadPrec :: ReadPrec UserIdentityRoot
readList :: ReadS [UserIdentityRoot]
$creadList :: ReadS [UserIdentityRoot]
readsPrec :: Int -> ReadS UserIdentityRoot
$creadsPrec :: Int -> ReadS UserIdentityRoot
Prelude.Read, Int -> UserIdentityRoot -> ShowS
[UserIdentityRoot] -> ShowS
UserIdentityRoot -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserIdentityRoot] -> ShowS
$cshowList :: [UserIdentityRoot] -> ShowS
show :: UserIdentityRoot -> String
$cshow :: UserIdentityRoot -> String
showsPrec :: Int -> UserIdentityRoot -> ShowS
$cshowsPrec :: Int -> UserIdentityRoot -> ShowS
Prelude.Show, forall x. Rep UserIdentityRoot x -> UserIdentityRoot
forall x. UserIdentityRoot -> Rep UserIdentityRoot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UserIdentityRoot x -> UserIdentityRoot
$cfrom :: forall x. UserIdentityRoot -> Rep UserIdentityRoot x
Prelude.Generic)
newUserIdentityRoot ::
UserIdentityRoot
newUserIdentityRoot :: UserIdentityRoot
newUserIdentityRoot =
UserIdentityRoot'
{ $sel:accountId:UserIdentityRoot' :: Maybe Text
accountId = forall a. Maybe a
Prelude.Nothing,
$sel:arn:UserIdentityRoot' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:principalId:UserIdentityRoot' :: Maybe Text
principalId = forall a. Maybe a
Prelude.Nothing
}
userIdentityRoot_accountId :: Lens.Lens' UserIdentityRoot (Prelude.Maybe Prelude.Text)
userIdentityRoot_accountId :: Lens' UserIdentityRoot (Maybe Text)
userIdentityRoot_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdentityRoot' {Maybe Text
accountId :: Maybe Text
$sel:accountId:UserIdentityRoot' :: UserIdentityRoot -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: UserIdentityRoot
s@UserIdentityRoot' {} Maybe Text
a -> UserIdentityRoot
s {$sel:accountId:UserIdentityRoot' :: Maybe Text
accountId = Maybe Text
a} :: UserIdentityRoot)
userIdentityRoot_arn :: Lens.Lens' UserIdentityRoot (Prelude.Maybe Prelude.Text)
userIdentityRoot_arn :: Lens' UserIdentityRoot (Maybe Text)
userIdentityRoot_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdentityRoot' {Maybe Text
arn :: Maybe Text
$sel:arn:UserIdentityRoot' :: UserIdentityRoot -> Maybe Text
arn} -> Maybe Text
arn) (\s :: UserIdentityRoot
s@UserIdentityRoot' {} Maybe Text
a -> UserIdentityRoot
s {$sel:arn:UserIdentityRoot' :: Maybe Text
arn = Maybe Text
a} :: UserIdentityRoot)
userIdentityRoot_principalId :: Lens.Lens' UserIdentityRoot (Prelude.Maybe Prelude.Text)
userIdentityRoot_principalId :: Lens' UserIdentityRoot (Maybe Text)
userIdentityRoot_principalId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdentityRoot' {Maybe Text
principalId :: Maybe Text
$sel:principalId:UserIdentityRoot' :: UserIdentityRoot -> Maybe Text
principalId} -> Maybe Text
principalId) (\s :: UserIdentityRoot
s@UserIdentityRoot' {} Maybe Text
a -> UserIdentityRoot
s {$sel:principalId:UserIdentityRoot' :: Maybe Text
principalId = Maybe Text
a} :: UserIdentityRoot)
instance Data.FromJSON UserIdentityRoot where
parseJSON :: Value -> Parser UserIdentityRoot
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"UserIdentityRoot"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> UserIdentityRoot
UserIdentityRoot'
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
"accountId")
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
"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
"principalId")
)
instance Prelude.Hashable UserIdentityRoot where
hashWithSalt :: Int -> UserIdentityRoot -> Int
hashWithSalt Int
_salt UserIdentityRoot' {Maybe Text
principalId :: Maybe Text
arn :: Maybe Text
accountId :: Maybe Text
$sel:principalId:UserIdentityRoot' :: UserIdentityRoot -> Maybe Text
$sel:arn:UserIdentityRoot' :: UserIdentityRoot -> Maybe Text
$sel:accountId:UserIdentityRoot' :: UserIdentityRoot -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
principalId
instance Prelude.NFData UserIdentityRoot where
rnf :: UserIdentityRoot -> ()
rnf UserIdentityRoot' {Maybe Text
principalId :: Maybe Text
arn :: Maybe Text
accountId :: Maybe Text
$sel:principalId:UserIdentityRoot' :: UserIdentityRoot -> Maybe Text
$sel:arn:UserIdentityRoot' :: UserIdentityRoot -> Maybe Text
$sel:accountId:UserIdentityRoot' :: UserIdentityRoot -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
principalId