{-# 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.GuardDuty.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
invitedAt :: Prelude.Maybe Prelude.Text,
Member -> Maybe Text
detectorId :: Prelude.Maybe Prelude.Text,
Member -> Text
accountId :: Prelude.Text,
Member -> Text
masterId :: Prelude.Text,
Member -> Text
email :: Prelude.Text,
Member -> Text
relationshipStatus :: Prelude.Text,
Member -> Text
updatedAt :: Prelude.Text
}
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 ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Member
newMember :: Text -> Text -> Text -> Text -> Text -> Member
newMember
Text
pAccountId_
Text
pMasterId_
Text
pEmail_
Text
pRelationshipStatus_
Text
pUpdatedAt_ =
Member' :: Maybe Text
-> Maybe Text -> Text -> Text -> Text -> Text -> Text -> Member
Member'
{ $sel:invitedAt:Member' :: Maybe Text
invitedAt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:detectorId:Member' :: Maybe Text
detectorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:Member' :: Text
accountId = Text
pAccountId_,
$sel:masterId:Member' :: Text
masterId = Text
pMasterId_,
$sel:email:Member' :: Text
email = Text
pEmail_,
$sel:relationshipStatus:Member' :: Text
relationshipStatus = Text
pRelationshipStatus_,
$sel:updatedAt:Member' :: Text
updatedAt = Text
pUpdatedAt_
}
member_invitedAt :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_invitedAt :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_invitedAt = (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
invitedAt :: Maybe Text
$sel:invitedAt:Member' :: Member -> Maybe Text
invitedAt} -> Maybe Text
invitedAt) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:invitedAt:Member' :: Maybe Text
invitedAt = Maybe Text
a} :: Member)
member_detectorId :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_detectorId :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_detectorId = (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
detectorId :: Maybe Text
$sel:detectorId:Member' :: Member -> Maybe Text
detectorId} -> Maybe Text
detectorId) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:detectorId:Member' :: Maybe Text
detectorId = Maybe Text
a} :: Member)
member_accountId :: Lens.Lens' Member Prelude.Text
member_accountId :: (Text -> f Text) -> Member -> f Member
member_accountId = (Member -> Text)
-> (Member -> Text -> Member) -> Lens Member Member Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Text
accountId :: Text
$sel:accountId:Member' :: Member -> Text
accountId} -> Text
accountId) (\s :: Member
s@Member' {} Text
a -> Member
s {$sel:accountId:Member' :: Text
accountId = Text
a} :: Member)
member_masterId :: Lens.Lens' Member Prelude.Text
member_masterId :: (Text -> f Text) -> Member -> f Member
member_masterId = (Member -> Text)
-> (Member -> Text -> Member) -> Lens Member Member Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Text
masterId :: Text
$sel:masterId:Member' :: Member -> Text
masterId} -> Text
masterId) (\s :: Member
s@Member' {} Text
a -> Member
s {$sel:masterId:Member' :: Text
masterId = Text
a} :: Member)
member_email :: Lens.Lens' Member Prelude.Text
member_email :: (Text -> f Text) -> Member -> f Member
member_email = (Member -> Text)
-> (Member -> Text -> Member) -> Lens Member Member Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Text
email :: Text
$sel:email:Member' :: Member -> Text
email} -> Text
email) (\s :: Member
s@Member' {} Text
a -> Member
s {$sel:email:Member' :: Text
email = Text
a} :: Member)
member_relationshipStatus :: Lens.Lens' Member Prelude.Text
member_relationshipStatus :: (Text -> f Text) -> Member -> f Member
member_relationshipStatus = (Member -> Text)
-> (Member -> Text -> Member) -> Lens Member Member Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Text
relationshipStatus :: Text
$sel:relationshipStatus:Member' :: Member -> Text
relationshipStatus} -> Text
relationshipStatus) (\s :: Member
s@Member' {} Text
a -> Member
s {$sel:relationshipStatus:Member' :: Text
relationshipStatus = Text
a} :: Member)
member_updatedAt :: Lens.Lens' Member Prelude.Text
member_updatedAt :: (Text -> f Text) -> Member -> f Member
member_updatedAt = (Member -> Text)
-> (Member -> Text -> Member) -> Lens Member Member Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Text
updatedAt :: Text
$sel:updatedAt:Member' :: Member -> Text
updatedAt} -> Text
updatedAt) (\s :: Member
s@Member' {} Text
a -> Member
s {$sel:updatedAt:Member' :: Text
updatedAt = Text
a} :: Member)
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 Text -> Text -> Text -> Text -> Text -> Text -> Member
Member'
(Maybe Text
-> Maybe Text -> Text -> Text -> Text -> Text -> Text -> Member)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Text -> Text -> Text -> Text -> Text -> 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
"invitedAt")
Parser
(Maybe Text -> Text -> Text -> Text -> Text -> Text -> Member)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> Text -> Text -> Text -> 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
"detectorId")
Parser (Text -> Text -> Text -> Text -> Text -> Member)
-> Parser Text -> Parser (Text -> Text -> Text -> Text -> Member)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"accountId")
Parser (Text -> Text -> Text -> Text -> Member)
-> Parser Text -> Parser (Text -> Text -> Text -> Member)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"masterId")
Parser (Text -> Text -> Text -> Member)
-> Parser Text -> Parser (Text -> Text -> Member)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"email")
Parser (Text -> Text -> Member)
-> Parser Text -> Parser (Text -> Member)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"relationshipStatus")
Parser (Text -> Member) -> Parser Text -> Parser Member
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"updatedAt")
)
instance Prelude.Hashable Member
instance Prelude.NFData Member