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