{-# 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.IdentityStore.Types.GroupMembershipExistenceResult where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IdentityStore.Types.MemberId
import qualified Amazonka.Prelude as Prelude
data GroupMembershipExistenceResult = GroupMembershipExistenceResult'
{
GroupMembershipExistenceResult -> Maybe Text
groupId :: Prelude.Maybe Prelude.Text,
GroupMembershipExistenceResult -> Maybe MemberId
memberId :: Prelude.Maybe MemberId,
GroupMembershipExistenceResult -> Maybe (Sensitive Bool)
membershipExists :: Prelude.Maybe (Data.Sensitive Prelude.Bool)
}
deriving (GroupMembershipExistenceResult
-> GroupMembershipExistenceResult -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GroupMembershipExistenceResult
-> GroupMembershipExistenceResult -> Bool
$c/= :: GroupMembershipExistenceResult
-> GroupMembershipExistenceResult -> Bool
== :: GroupMembershipExistenceResult
-> GroupMembershipExistenceResult -> Bool
$c== :: GroupMembershipExistenceResult
-> GroupMembershipExistenceResult -> Bool
Prelude.Eq, Int -> GroupMembershipExistenceResult -> ShowS
[GroupMembershipExistenceResult] -> ShowS
GroupMembershipExistenceResult -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GroupMembershipExistenceResult] -> ShowS
$cshowList :: [GroupMembershipExistenceResult] -> ShowS
show :: GroupMembershipExistenceResult -> String
$cshow :: GroupMembershipExistenceResult -> String
showsPrec :: Int -> GroupMembershipExistenceResult -> ShowS
$cshowsPrec :: Int -> GroupMembershipExistenceResult -> ShowS
Prelude.Show, forall x.
Rep GroupMembershipExistenceResult x
-> GroupMembershipExistenceResult
forall x.
GroupMembershipExistenceResult
-> Rep GroupMembershipExistenceResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GroupMembershipExistenceResult x
-> GroupMembershipExistenceResult
$cfrom :: forall x.
GroupMembershipExistenceResult
-> Rep GroupMembershipExistenceResult x
Prelude.Generic)
newGroupMembershipExistenceResult ::
GroupMembershipExistenceResult
newGroupMembershipExistenceResult :: GroupMembershipExistenceResult
newGroupMembershipExistenceResult =
GroupMembershipExistenceResult'
{ $sel:groupId:GroupMembershipExistenceResult' :: Maybe Text
groupId =
forall a. Maybe a
Prelude.Nothing,
$sel:memberId:GroupMembershipExistenceResult' :: Maybe MemberId
memberId = forall a. Maybe a
Prelude.Nothing,
$sel:membershipExists:GroupMembershipExistenceResult' :: Maybe (Sensitive Bool)
membershipExists = forall a. Maybe a
Prelude.Nothing
}
groupMembershipExistenceResult_groupId :: Lens.Lens' GroupMembershipExistenceResult (Prelude.Maybe Prelude.Text)
groupMembershipExistenceResult_groupId :: Lens' GroupMembershipExistenceResult (Maybe Text)
groupMembershipExistenceResult_groupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupMembershipExistenceResult' {Maybe Text
groupId :: Maybe Text
$sel:groupId:GroupMembershipExistenceResult' :: GroupMembershipExistenceResult -> Maybe Text
groupId} -> Maybe Text
groupId) (\s :: GroupMembershipExistenceResult
s@GroupMembershipExistenceResult' {} Maybe Text
a -> GroupMembershipExistenceResult
s {$sel:groupId:GroupMembershipExistenceResult' :: Maybe Text
groupId = Maybe Text
a} :: GroupMembershipExistenceResult)
groupMembershipExistenceResult_memberId :: Lens.Lens' GroupMembershipExistenceResult (Prelude.Maybe MemberId)
groupMembershipExistenceResult_memberId :: Lens' GroupMembershipExistenceResult (Maybe MemberId)
groupMembershipExistenceResult_memberId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupMembershipExistenceResult' {Maybe MemberId
memberId :: Maybe MemberId
$sel:memberId:GroupMembershipExistenceResult' :: GroupMembershipExistenceResult -> Maybe MemberId
memberId} -> Maybe MemberId
memberId) (\s :: GroupMembershipExistenceResult
s@GroupMembershipExistenceResult' {} Maybe MemberId
a -> GroupMembershipExistenceResult
s {$sel:memberId:GroupMembershipExistenceResult' :: Maybe MemberId
memberId = Maybe MemberId
a} :: GroupMembershipExistenceResult)
groupMembershipExistenceResult_membershipExists :: Lens.Lens' GroupMembershipExistenceResult (Prelude.Maybe Prelude.Bool)
groupMembershipExistenceResult_membershipExists :: Lens' GroupMembershipExistenceResult (Maybe Bool)
groupMembershipExistenceResult_membershipExists = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupMembershipExistenceResult' {Maybe (Sensitive Bool)
membershipExists :: Maybe (Sensitive Bool)
$sel:membershipExists:GroupMembershipExistenceResult' :: GroupMembershipExistenceResult -> Maybe (Sensitive Bool)
membershipExists} -> Maybe (Sensitive Bool)
membershipExists) (\s :: GroupMembershipExistenceResult
s@GroupMembershipExistenceResult' {} Maybe (Sensitive Bool)
a -> GroupMembershipExistenceResult
s {$sel:membershipExists:GroupMembershipExistenceResult' :: Maybe (Sensitive Bool)
membershipExists = Maybe (Sensitive Bool)
a} :: GroupMembershipExistenceResult) 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
instance Data.FromJSON GroupMembershipExistenceResult where
parseJSON :: Value -> Parser GroupMembershipExistenceResult
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"GroupMembershipExistenceResult"
( \Object
x ->
Maybe Text
-> Maybe MemberId
-> Maybe (Sensitive Bool)
-> GroupMembershipExistenceResult
GroupMembershipExistenceResult'
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
"GroupId")
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
"MemberId")
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
"MembershipExists")
)
instance
Prelude.Hashable
GroupMembershipExistenceResult
where
hashWithSalt :: Int -> GroupMembershipExistenceResult -> Int
hashWithSalt
Int
_salt
GroupMembershipExistenceResult' {Maybe Text
Maybe (Sensitive Bool)
Maybe MemberId
membershipExists :: Maybe (Sensitive Bool)
memberId :: Maybe MemberId
groupId :: Maybe Text
$sel:membershipExists:GroupMembershipExistenceResult' :: GroupMembershipExistenceResult -> Maybe (Sensitive Bool)
$sel:memberId:GroupMembershipExistenceResult' :: GroupMembershipExistenceResult -> Maybe MemberId
$sel:groupId:GroupMembershipExistenceResult' :: GroupMembershipExistenceResult -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MemberId
memberId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Bool)
membershipExists
instance
Prelude.NFData
GroupMembershipExistenceResult
where
rnf :: GroupMembershipExistenceResult -> ()
rnf GroupMembershipExistenceResult' {Maybe Text
Maybe (Sensitive Bool)
Maybe MemberId
membershipExists :: Maybe (Sensitive Bool)
memberId :: Maybe MemberId
groupId :: Maybe Text
$sel:membershipExists:GroupMembershipExistenceResult' :: GroupMembershipExistenceResult -> Maybe (Sensitive Bool)
$sel:memberId:GroupMembershipExistenceResult' :: GroupMembershipExistenceResult -> Maybe MemberId
$sel:groupId:GroupMembershipExistenceResult' :: GroupMembershipExistenceResult -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MemberId
memberId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Bool)
membershipExists