{-# 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.SecurityHub.Types.Member where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Member = Member'
{
Member -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
Member -> Maybe POSIX
invitedAt :: Prelude.Maybe Core.POSIX,
Member -> Maybe Text
administratorId :: Prelude.Maybe Prelude.Text,
Member -> Maybe Text
masterId :: Prelude.Maybe Prelude.Text,
Member -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
Member -> Maybe Text
memberStatus :: Prelude.Maybe Prelude.Text,
Member -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX
}
deriving (Member -> Member -> Bool
(Member -> Member -> Bool)
-> (Member -> Member -> Bool) -> Eq Member
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Member -> Member -> Bool
$c/= :: Member -> Member -> Bool
== :: Member -> Member -> Bool
$c== :: Member -> Member -> Bool
Prelude.Eq, ReadPrec [Member]
ReadPrec Member
Int -> ReadS Member
ReadS [Member]
(Int -> ReadS Member)
-> ReadS [Member]
-> ReadPrec Member
-> ReadPrec [Member]
-> Read Member
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Member]
$creadListPrec :: ReadPrec [Member]
readPrec :: ReadPrec Member
$creadPrec :: ReadPrec Member
readList :: ReadS [Member]
$creadList :: ReadS [Member]
readsPrec :: Int -> ReadS Member
$creadsPrec :: Int -> ReadS Member
Prelude.Read, Int -> Member -> ShowS
[Member] -> ShowS
Member -> String
(Int -> Member -> ShowS)
-> (Member -> String) -> ([Member] -> ShowS) -> Show Member
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Member] -> ShowS
$cshowList :: [Member] -> ShowS
show :: Member -> String
$cshow :: Member -> String
showsPrec :: Int -> Member -> ShowS
$cshowsPrec :: Int -> Member -> ShowS
Prelude.Show, (forall x. Member -> Rep Member x)
-> (forall x. Rep Member x -> Member) -> Generic Member
forall x. Rep Member x -> Member
forall x. Member -> Rep Member x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Member x -> Member
$cfrom :: forall x. Member -> Rep Member x
Prelude.Generic)
newMember ::
Member
newMember :: Member
newMember =
Member' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Member
Member'
{ $sel:email:Member' :: Maybe Text
email = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:invitedAt:Member' :: Maybe POSIX
invitedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:administratorId:Member' :: Maybe Text
administratorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:masterId:Member' :: Maybe Text
masterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:Member' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:memberStatus:Member' :: Maybe Text
memberStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updatedAt:Member' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
member_email :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_email :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_email = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
email :: Maybe Text
$sel:email:Member' :: Member -> Maybe Text
email} -> Maybe Text
email) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:email:Member' :: Maybe Text
email = Maybe Text
a} :: Member)
member_invitedAt :: Lens.Lens' Member (Prelude.Maybe Prelude.UTCTime)
member_invitedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Member -> f Member
member_invitedAt = (Member -> Maybe POSIX)
-> (Member -> Maybe POSIX -> Member)
-> Lens Member Member (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe POSIX
invitedAt :: Maybe POSIX
$sel:invitedAt:Member' :: Member -> Maybe POSIX
invitedAt} -> Maybe POSIX
invitedAt) (\s :: Member
s@Member' {} Maybe POSIX
a -> Member
s {$sel:invitedAt:Member' :: Maybe POSIX
invitedAt = Maybe POSIX
a} :: Member) ((Maybe POSIX -> f (Maybe POSIX)) -> Member -> f Member)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Member
-> f Member
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
member_administratorId :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_administratorId :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_administratorId = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
administratorId :: Maybe Text
$sel:administratorId:Member' :: Member -> Maybe Text
administratorId} -> Maybe Text
administratorId) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:administratorId:Member' :: Maybe Text
administratorId = Maybe Text
a} :: Member)
member_masterId :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_masterId :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_masterId = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
masterId :: Maybe Text
$sel:masterId:Member' :: Member -> Maybe Text
masterId} -> Maybe Text
masterId) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:masterId:Member' :: Maybe Text
masterId = Maybe Text
a} :: Member)
member_accountId :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_accountId :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_accountId = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
accountId :: Maybe Text
$sel:accountId:Member' :: Member -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:accountId:Member' :: Maybe Text
accountId = Maybe Text
a} :: Member)
member_memberStatus :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_memberStatus :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_memberStatus = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
memberStatus :: Maybe Text
$sel:memberStatus:Member' :: Member -> Maybe Text
memberStatus} -> Maybe Text
memberStatus) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:memberStatus:Member' :: Maybe Text
memberStatus = Maybe Text
a} :: Member)
member_updatedAt :: Lens.Lens' Member (Prelude.Maybe Prelude.UTCTime)
member_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Member -> f Member
member_updatedAt = (Member -> Maybe POSIX)
-> (Member -> Maybe POSIX -> Member)
-> Lens Member Member (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:Member' :: Member -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: Member
s@Member' {} Maybe POSIX
a -> Member
s {$sel:updatedAt:Member' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: Member) ((Maybe POSIX -> f (Maybe POSIX)) -> Member -> f Member)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Member
-> f Member
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 Member where
parseJSON :: Value -> Parser Member
parseJSON =
String -> (Object -> Parser Member) -> Value -> Parser Member
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Member"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Member
Member'
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Member)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Member)
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
"Email")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Member)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe POSIX -> Member)
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
"InvitedAt")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> Maybe POSIX -> Member)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe POSIX -> Member)
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
"AdministratorId")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe POSIX -> Member)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe POSIX -> Member)
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
"MasterId")
Parser (Maybe Text -> Maybe Text -> Maybe POSIX -> Member)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> Member)
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
"AccountId")
Parser (Maybe Text -> Maybe POSIX -> Member)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> Member)
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
"MemberStatus")
Parser (Maybe POSIX -> Member)
-> Parser (Maybe POSIX) -> Parser Member
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
"UpdatedAt")
)
instance Prelude.Hashable Member
instance Prelude.NFData Member