{-# 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.ChannelBanSummary 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 ChannelBanSummary = ChannelBanSummary'
{
ChannelBanSummary -> Maybe Identity
member :: Prelude.Maybe Identity
}
deriving (ChannelBanSummary -> ChannelBanSummary -> Bool
(ChannelBanSummary -> ChannelBanSummary -> Bool)
-> (ChannelBanSummary -> ChannelBanSummary -> Bool)
-> Eq ChannelBanSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelBanSummary -> ChannelBanSummary -> Bool
$c/= :: ChannelBanSummary -> ChannelBanSummary -> Bool
== :: ChannelBanSummary -> ChannelBanSummary -> Bool
$c== :: ChannelBanSummary -> ChannelBanSummary -> Bool
Prelude.Eq, Int -> ChannelBanSummary -> ShowS
[ChannelBanSummary] -> ShowS
ChannelBanSummary -> String
(Int -> ChannelBanSummary -> ShowS)
-> (ChannelBanSummary -> String)
-> ([ChannelBanSummary] -> ShowS)
-> Show ChannelBanSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelBanSummary] -> ShowS
$cshowList :: [ChannelBanSummary] -> ShowS
show :: ChannelBanSummary -> String
$cshow :: ChannelBanSummary -> String
showsPrec :: Int -> ChannelBanSummary -> ShowS
$cshowsPrec :: Int -> ChannelBanSummary -> ShowS
Prelude.Show, (forall x. ChannelBanSummary -> Rep ChannelBanSummary x)
-> (forall x. Rep ChannelBanSummary x -> ChannelBanSummary)
-> Generic ChannelBanSummary
forall x. Rep ChannelBanSummary x -> ChannelBanSummary
forall x. ChannelBanSummary -> Rep ChannelBanSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelBanSummary x -> ChannelBanSummary
$cfrom :: forall x. ChannelBanSummary -> Rep ChannelBanSummary x
Prelude.Generic)
newChannelBanSummary ::
ChannelBanSummary
newChannelBanSummary :: ChannelBanSummary
newChannelBanSummary =
ChannelBanSummary' :: Maybe Identity -> ChannelBanSummary
ChannelBanSummary' {$sel:member:ChannelBanSummary' :: Maybe Identity
member = Maybe Identity
forall a. Maybe a
Prelude.Nothing}
channelBanSummary_member :: Lens.Lens' ChannelBanSummary (Prelude.Maybe Identity)
channelBanSummary_member :: (Maybe Identity -> f (Maybe Identity))
-> ChannelBanSummary -> f ChannelBanSummary
channelBanSummary_member = (ChannelBanSummary -> Maybe Identity)
-> (ChannelBanSummary -> Maybe Identity -> ChannelBanSummary)
-> Lens
ChannelBanSummary
ChannelBanSummary
(Maybe Identity)
(Maybe Identity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelBanSummary' {Maybe Identity
member :: Maybe Identity
$sel:member:ChannelBanSummary' :: ChannelBanSummary -> Maybe Identity
member} -> Maybe Identity
member) (\s :: ChannelBanSummary
s@ChannelBanSummary' {} Maybe Identity
a -> ChannelBanSummary
s {$sel:member:ChannelBanSummary' :: Maybe Identity
member = Maybe Identity
a} :: ChannelBanSummary)
instance Core.FromJSON ChannelBanSummary where
parseJSON :: Value -> Parser ChannelBanSummary
parseJSON =
String
-> (Object -> Parser ChannelBanSummary)
-> Value
-> Parser ChannelBanSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ChannelBanSummary"
( \Object
x ->
Maybe Identity -> ChannelBanSummary
ChannelBanSummary' (Maybe Identity -> ChannelBanSummary)
-> Parser (Maybe Identity) -> Parser ChannelBanSummary
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 ChannelBanSummary
instance Prelude.NFData ChannelBanSummary