{-# 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.SipMediaApplicationLoggingConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SipMediaApplicationLoggingConfiguration = SipMediaApplicationLoggingConfiguration'
{
SipMediaApplicationLoggingConfiguration -> Maybe Bool
enableSipMediaApplicationMessageLogs :: Prelude.Maybe Prelude.Bool
}
deriving (SipMediaApplicationLoggingConfiguration
-> SipMediaApplicationLoggingConfiguration -> Bool
(SipMediaApplicationLoggingConfiguration
-> SipMediaApplicationLoggingConfiguration -> Bool)
-> (SipMediaApplicationLoggingConfiguration
-> SipMediaApplicationLoggingConfiguration -> Bool)
-> Eq SipMediaApplicationLoggingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SipMediaApplicationLoggingConfiguration
-> SipMediaApplicationLoggingConfiguration -> Bool
$c/= :: SipMediaApplicationLoggingConfiguration
-> SipMediaApplicationLoggingConfiguration -> Bool
== :: SipMediaApplicationLoggingConfiguration
-> SipMediaApplicationLoggingConfiguration -> Bool
$c== :: SipMediaApplicationLoggingConfiguration
-> SipMediaApplicationLoggingConfiguration -> Bool
Prelude.Eq, ReadPrec [SipMediaApplicationLoggingConfiguration]
ReadPrec SipMediaApplicationLoggingConfiguration
Int -> ReadS SipMediaApplicationLoggingConfiguration
ReadS [SipMediaApplicationLoggingConfiguration]
(Int -> ReadS SipMediaApplicationLoggingConfiguration)
-> ReadS [SipMediaApplicationLoggingConfiguration]
-> ReadPrec SipMediaApplicationLoggingConfiguration
-> ReadPrec [SipMediaApplicationLoggingConfiguration]
-> Read SipMediaApplicationLoggingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SipMediaApplicationLoggingConfiguration]
$creadListPrec :: ReadPrec [SipMediaApplicationLoggingConfiguration]
readPrec :: ReadPrec SipMediaApplicationLoggingConfiguration
$creadPrec :: ReadPrec SipMediaApplicationLoggingConfiguration
readList :: ReadS [SipMediaApplicationLoggingConfiguration]
$creadList :: ReadS [SipMediaApplicationLoggingConfiguration]
readsPrec :: Int -> ReadS SipMediaApplicationLoggingConfiguration
$creadsPrec :: Int -> ReadS SipMediaApplicationLoggingConfiguration
Prelude.Read, Int -> SipMediaApplicationLoggingConfiguration -> ShowS
[SipMediaApplicationLoggingConfiguration] -> ShowS
SipMediaApplicationLoggingConfiguration -> String
(Int -> SipMediaApplicationLoggingConfiguration -> ShowS)
-> (SipMediaApplicationLoggingConfiguration -> String)
-> ([SipMediaApplicationLoggingConfiguration] -> ShowS)
-> Show SipMediaApplicationLoggingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SipMediaApplicationLoggingConfiguration] -> ShowS
$cshowList :: [SipMediaApplicationLoggingConfiguration] -> ShowS
show :: SipMediaApplicationLoggingConfiguration -> String
$cshow :: SipMediaApplicationLoggingConfiguration -> String
showsPrec :: Int -> SipMediaApplicationLoggingConfiguration -> ShowS
$cshowsPrec :: Int -> SipMediaApplicationLoggingConfiguration -> ShowS
Prelude.Show, (forall x.
SipMediaApplicationLoggingConfiguration
-> Rep SipMediaApplicationLoggingConfiguration x)
-> (forall x.
Rep SipMediaApplicationLoggingConfiguration x
-> SipMediaApplicationLoggingConfiguration)
-> Generic SipMediaApplicationLoggingConfiguration
forall x.
Rep SipMediaApplicationLoggingConfiguration x
-> SipMediaApplicationLoggingConfiguration
forall x.
SipMediaApplicationLoggingConfiguration
-> Rep SipMediaApplicationLoggingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SipMediaApplicationLoggingConfiguration x
-> SipMediaApplicationLoggingConfiguration
$cfrom :: forall x.
SipMediaApplicationLoggingConfiguration
-> Rep SipMediaApplicationLoggingConfiguration x
Prelude.Generic)
newSipMediaApplicationLoggingConfiguration ::
SipMediaApplicationLoggingConfiguration
newSipMediaApplicationLoggingConfiguration :: SipMediaApplicationLoggingConfiguration
newSipMediaApplicationLoggingConfiguration =
SipMediaApplicationLoggingConfiguration' :: Maybe Bool -> SipMediaApplicationLoggingConfiguration
SipMediaApplicationLoggingConfiguration'
{ $sel:enableSipMediaApplicationMessageLogs:SipMediaApplicationLoggingConfiguration' :: Maybe Bool
enableSipMediaApplicationMessageLogs =
Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
sipMediaApplicationLoggingConfiguration_enableSipMediaApplicationMessageLogs :: Lens.Lens' SipMediaApplicationLoggingConfiguration (Prelude.Maybe Prelude.Bool)
sipMediaApplicationLoggingConfiguration_enableSipMediaApplicationMessageLogs :: (Maybe Bool -> f (Maybe Bool))
-> SipMediaApplicationLoggingConfiguration
-> f SipMediaApplicationLoggingConfiguration
sipMediaApplicationLoggingConfiguration_enableSipMediaApplicationMessageLogs = (SipMediaApplicationLoggingConfiguration -> Maybe Bool)
-> (SipMediaApplicationLoggingConfiguration
-> Maybe Bool -> SipMediaApplicationLoggingConfiguration)
-> Lens
SipMediaApplicationLoggingConfiguration
SipMediaApplicationLoggingConfiguration
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SipMediaApplicationLoggingConfiguration' {Maybe Bool
enableSipMediaApplicationMessageLogs :: Maybe Bool
$sel:enableSipMediaApplicationMessageLogs:SipMediaApplicationLoggingConfiguration' :: SipMediaApplicationLoggingConfiguration -> Maybe Bool
enableSipMediaApplicationMessageLogs} -> Maybe Bool
enableSipMediaApplicationMessageLogs) (\s :: SipMediaApplicationLoggingConfiguration
s@SipMediaApplicationLoggingConfiguration' {} Maybe Bool
a -> SipMediaApplicationLoggingConfiguration
s {$sel:enableSipMediaApplicationMessageLogs:SipMediaApplicationLoggingConfiguration' :: Maybe Bool
enableSipMediaApplicationMessageLogs = Maybe Bool
a} :: SipMediaApplicationLoggingConfiguration)
instance
Core.FromJSON
SipMediaApplicationLoggingConfiguration
where
parseJSON :: Value -> Parser SipMediaApplicationLoggingConfiguration
parseJSON =
String
-> (Object -> Parser SipMediaApplicationLoggingConfiguration)
-> Value
-> Parser SipMediaApplicationLoggingConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SipMediaApplicationLoggingConfiguration"
( \Object
x ->
Maybe Bool -> SipMediaApplicationLoggingConfiguration
SipMediaApplicationLoggingConfiguration'
(Maybe Bool -> SipMediaApplicationLoggingConfiguration)
-> Parser (Maybe Bool)
-> Parser SipMediaApplicationLoggingConfiguration
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnableSipMediaApplicationMessageLogs")
)
instance
Prelude.Hashable
SipMediaApplicationLoggingConfiguration
instance
Prelude.NFData
SipMediaApplicationLoggingConfiguration
instance
Core.ToJSON
SipMediaApplicationLoggingConfiguration
where
toJSON :: SipMediaApplicationLoggingConfiguration -> Value
toJSON SipMediaApplicationLoggingConfiguration' {Maybe Bool
enableSipMediaApplicationMessageLogs :: Maybe Bool
$sel:enableSipMediaApplicationMessageLogs:SipMediaApplicationLoggingConfiguration' :: SipMediaApplicationLoggingConfiguration -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EnableSipMediaApplicationMessageLogs" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableSipMediaApplicationMessageLogs
]
)