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