{-# 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.ChimeSDKMessaging.Types.ChannelMembershipForAppInstanceUserSummary where
import Amazonka.ChimeSDKMessaging.Types.AppInstanceUserMembershipSummary
import Amazonka.ChimeSDKMessaging.Types.ChannelSummary
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ChannelMembershipForAppInstanceUserSummary = ChannelMembershipForAppInstanceUserSummary'
{
ChannelMembershipForAppInstanceUserSummary
-> Maybe AppInstanceUserMembershipSummary
appInstanceUserMembershipSummary :: Prelude.Maybe AppInstanceUserMembershipSummary,
ChannelMembershipForAppInstanceUserSummary -> Maybe ChannelSummary
channelSummary :: Prelude.Maybe ChannelSummary
}
deriving (ChannelMembershipForAppInstanceUserSummary
-> ChannelMembershipForAppInstanceUserSummary -> Bool
(ChannelMembershipForAppInstanceUserSummary
-> ChannelMembershipForAppInstanceUserSummary -> Bool)
-> (ChannelMembershipForAppInstanceUserSummary
-> ChannelMembershipForAppInstanceUserSummary -> Bool)
-> Eq ChannelMembershipForAppInstanceUserSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelMembershipForAppInstanceUserSummary
-> ChannelMembershipForAppInstanceUserSummary -> Bool
$c/= :: ChannelMembershipForAppInstanceUserSummary
-> ChannelMembershipForAppInstanceUserSummary -> Bool
== :: ChannelMembershipForAppInstanceUserSummary
-> ChannelMembershipForAppInstanceUserSummary -> Bool
$c== :: ChannelMembershipForAppInstanceUserSummary
-> ChannelMembershipForAppInstanceUserSummary -> Bool
Prelude.Eq, Int -> ChannelMembershipForAppInstanceUserSummary -> ShowS
[ChannelMembershipForAppInstanceUserSummary] -> ShowS
ChannelMembershipForAppInstanceUserSummary -> String
(Int -> ChannelMembershipForAppInstanceUserSummary -> ShowS)
-> (ChannelMembershipForAppInstanceUserSummary -> String)
-> ([ChannelMembershipForAppInstanceUserSummary] -> ShowS)
-> Show ChannelMembershipForAppInstanceUserSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelMembershipForAppInstanceUserSummary] -> ShowS
$cshowList :: [ChannelMembershipForAppInstanceUserSummary] -> ShowS
show :: ChannelMembershipForAppInstanceUserSummary -> String
$cshow :: ChannelMembershipForAppInstanceUserSummary -> String
showsPrec :: Int -> ChannelMembershipForAppInstanceUserSummary -> ShowS
$cshowsPrec :: Int -> ChannelMembershipForAppInstanceUserSummary -> ShowS
Prelude.Show, (forall x.
ChannelMembershipForAppInstanceUserSummary
-> Rep ChannelMembershipForAppInstanceUserSummary x)
-> (forall x.
Rep ChannelMembershipForAppInstanceUserSummary x
-> ChannelMembershipForAppInstanceUserSummary)
-> Generic ChannelMembershipForAppInstanceUserSummary
forall x.
Rep ChannelMembershipForAppInstanceUserSummary x
-> ChannelMembershipForAppInstanceUserSummary
forall x.
ChannelMembershipForAppInstanceUserSummary
-> Rep ChannelMembershipForAppInstanceUserSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ChannelMembershipForAppInstanceUserSummary x
-> ChannelMembershipForAppInstanceUserSummary
$cfrom :: forall x.
ChannelMembershipForAppInstanceUserSummary
-> Rep ChannelMembershipForAppInstanceUserSummary x
Prelude.Generic)
newChannelMembershipForAppInstanceUserSummary ::
ChannelMembershipForAppInstanceUserSummary
newChannelMembershipForAppInstanceUserSummary :: ChannelMembershipForAppInstanceUserSummary
newChannelMembershipForAppInstanceUserSummary =
ChannelMembershipForAppInstanceUserSummary' :: Maybe AppInstanceUserMembershipSummary
-> Maybe ChannelSummary
-> ChannelMembershipForAppInstanceUserSummary
ChannelMembershipForAppInstanceUserSummary'
{ $sel:appInstanceUserMembershipSummary:ChannelMembershipForAppInstanceUserSummary' :: Maybe AppInstanceUserMembershipSummary
appInstanceUserMembershipSummary =
Maybe AppInstanceUserMembershipSummary
forall a. Maybe a
Prelude.Nothing,
$sel:channelSummary:ChannelMembershipForAppInstanceUserSummary' :: Maybe ChannelSummary
channelSummary =
Maybe ChannelSummary
forall a. Maybe a
Prelude.Nothing
}
channelMembershipForAppInstanceUserSummary_appInstanceUserMembershipSummary :: Lens.Lens' ChannelMembershipForAppInstanceUserSummary (Prelude.Maybe AppInstanceUserMembershipSummary)
channelMembershipForAppInstanceUserSummary_appInstanceUserMembershipSummary :: (Maybe AppInstanceUserMembershipSummary
-> f (Maybe AppInstanceUserMembershipSummary))
-> ChannelMembershipForAppInstanceUserSummary
-> f ChannelMembershipForAppInstanceUserSummary
channelMembershipForAppInstanceUserSummary_appInstanceUserMembershipSummary = (ChannelMembershipForAppInstanceUserSummary
-> Maybe AppInstanceUserMembershipSummary)
-> (ChannelMembershipForAppInstanceUserSummary
-> Maybe AppInstanceUserMembershipSummary
-> ChannelMembershipForAppInstanceUserSummary)
-> Lens
ChannelMembershipForAppInstanceUserSummary
ChannelMembershipForAppInstanceUserSummary
(Maybe AppInstanceUserMembershipSummary)
(Maybe AppInstanceUserMembershipSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMembershipForAppInstanceUserSummary' {Maybe AppInstanceUserMembershipSummary
appInstanceUserMembershipSummary :: Maybe AppInstanceUserMembershipSummary
$sel:appInstanceUserMembershipSummary:ChannelMembershipForAppInstanceUserSummary' :: ChannelMembershipForAppInstanceUserSummary
-> Maybe AppInstanceUserMembershipSummary
appInstanceUserMembershipSummary} -> Maybe AppInstanceUserMembershipSummary
appInstanceUserMembershipSummary) (\s :: ChannelMembershipForAppInstanceUserSummary
s@ChannelMembershipForAppInstanceUserSummary' {} Maybe AppInstanceUserMembershipSummary
a -> ChannelMembershipForAppInstanceUserSummary
s {$sel:appInstanceUserMembershipSummary:ChannelMembershipForAppInstanceUserSummary' :: Maybe AppInstanceUserMembershipSummary
appInstanceUserMembershipSummary = Maybe AppInstanceUserMembershipSummary
a} :: ChannelMembershipForAppInstanceUserSummary)
channelMembershipForAppInstanceUserSummary_channelSummary :: Lens.Lens' ChannelMembershipForAppInstanceUserSummary (Prelude.Maybe ChannelSummary)
channelMembershipForAppInstanceUserSummary_channelSummary :: (Maybe ChannelSummary -> f (Maybe ChannelSummary))
-> ChannelMembershipForAppInstanceUserSummary
-> f ChannelMembershipForAppInstanceUserSummary
channelMembershipForAppInstanceUserSummary_channelSummary = (ChannelMembershipForAppInstanceUserSummary
-> Maybe ChannelSummary)
-> (ChannelMembershipForAppInstanceUserSummary
-> Maybe ChannelSummary
-> ChannelMembershipForAppInstanceUserSummary)
-> Lens
ChannelMembershipForAppInstanceUserSummary
ChannelMembershipForAppInstanceUserSummary
(Maybe ChannelSummary)
(Maybe ChannelSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMembershipForAppInstanceUserSummary' {Maybe ChannelSummary
channelSummary :: Maybe ChannelSummary
$sel:channelSummary:ChannelMembershipForAppInstanceUserSummary' :: ChannelMembershipForAppInstanceUserSummary -> Maybe ChannelSummary
channelSummary} -> Maybe ChannelSummary
channelSummary) (\s :: ChannelMembershipForAppInstanceUserSummary
s@ChannelMembershipForAppInstanceUserSummary' {} Maybe ChannelSummary
a -> ChannelMembershipForAppInstanceUserSummary
s {$sel:channelSummary:ChannelMembershipForAppInstanceUserSummary' :: Maybe ChannelSummary
channelSummary = Maybe ChannelSummary
a} :: ChannelMembershipForAppInstanceUserSummary)
instance
Core.FromJSON
ChannelMembershipForAppInstanceUserSummary
where
parseJSON :: Value -> Parser ChannelMembershipForAppInstanceUserSummary
parseJSON =
String
-> (Object -> Parser ChannelMembershipForAppInstanceUserSummary)
-> Value
-> Parser ChannelMembershipForAppInstanceUserSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ChannelMembershipForAppInstanceUserSummary"
( \Object
x ->
Maybe AppInstanceUserMembershipSummary
-> Maybe ChannelSummary
-> ChannelMembershipForAppInstanceUserSummary
ChannelMembershipForAppInstanceUserSummary'
(Maybe AppInstanceUserMembershipSummary
-> Maybe ChannelSummary
-> ChannelMembershipForAppInstanceUserSummary)
-> Parser (Maybe AppInstanceUserMembershipSummary)
-> Parser
(Maybe ChannelSummary
-> ChannelMembershipForAppInstanceUserSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AppInstanceUserMembershipSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AppInstanceUserMembershipSummary")
Parser
(Maybe ChannelSummary
-> ChannelMembershipForAppInstanceUserSummary)
-> Parser (Maybe ChannelSummary)
-> Parser ChannelMembershipForAppInstanceUserSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ChannelSummary")
)
instance
Prelude.Hashable
ChannelMembershipForAppInstanceUserSummary
instance
Prelude.NFData
ChannelMembershipForAppInstanceUserSummary