{-# 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.Kafka.Types.JmxExporterInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JmxExporterInfo = JmxExporterInfo'
{
JmxExporterInfo -> Bool
enabledInBroker :: Prelude.Bool
}
deriving (JmxExporterInfo -> JmxExporterInfo -> Bool
(JmxExporterInfo -> JmxExporterInfo -> Bool)
-> (JmxExporterInfo -> JmxExporterInfo -> Bool)
-> Eq JmxExporterInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JmxExporterInfo -> JmxExporterInfo -> Bool
$c/= :: JmxExporterInfo -> JmxExporterInfo -> Bool
== :: JmxExporterInfo -> JmxExporterInfo -> Bool
$c== :: JmxExporterInfo -> JmxExporterInfo -> Bool
Prelude.Eq, ReadPrec [JmxExporterInfo]
ReadPrec JmxExporterInfo
Int -> ReadS JmxExporterInfo
ReadS [JmxExporterInfo]
(Int -> ReadS JmxExporterInfo)
-> ReadS [JmxExporterInfo]
-> ReadPrec JmxExporterInfo
-> ReadPrec [JmxExporterInfo]
-> Read JmxExporterInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JmxExporterInfo]
$creadListPrec :: ReadPrec [JmxExporterInfo]
readPrec :: ReadPrec JmxExporterInfo
$creadPrec :: ReadPrec JmxExporterInfo
readList :: ReadS [JmxExporterInfo]
$creadList :: ReadS [JmxExporterInfo]
readsPrec :: Int -> ReadS JmxExporterInfo
$creadsPrec :: Int -> ReadS JmxExporterInfo
Prelude.Read, Int -> JmxExporterInfo -> ShowS
[JmxExporterInfo] -> ShowS
JmxExporterInfo -> String
(Int -> JmxExporterInfo -> ShowS)
-> (JmxExporterInfo -> String)
-> ([JmxExporterInfo] -> ShowS)
-> Show JmxExporterInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JmxExporterInfo] -> ShowS
$cshowList :: [JmxExporterInfo] -> ShowS
show :: JmxExporterInfo -> String
$cshow :: JmxExporterInfo -> String
showsPrec :: Int -> JmxExporterInfo -> ShowS
$cshowsPrec :: Int -> JmxExporterInfo -> ShowS
Prelude.Show, (forall x. JmxExporterInfo -> Rep JmxExporterInfo x)
-> (forall x. Rep JmxExporterInfo x -> JmxExporterInfo)
-> Generic JmxExporterInfo
forall x. Rep JmxExporterInfo x -> JmxExporterInfo
forall x. JmxExporterInfo -> Rep JmxExporterInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JmxExporterInfo x -> JmxExporterInfo
$cfrom :: forall x. JmxExporterInfo -> Rep JmxExporterInfo x
Prelude.Generic)
newJmxExporterInfo ::
Prelude.Bool ->
JmxExporterInfo
newJmxExporterInfo :: Bool -> JmxExporterInfo
newJmxExporterInfo Bool
pEnabledInBroker_ =
JmxExporterInfo' :: Bool -> JmxExporterInfo
JmxExporterInfo'
{ $sel:enabledInBroker:JmxExporterInfo' :: Bool
enabledInBroker =
Bool
pEnabledInBroker_
}
jmxExporterInfo_enabledInBroker :: Lens.Lens' JmxExporterInfo Prelude.Bool
jmxExporterInfo_enabledInBroker :: (Bool -> f Bool) -> JmxExporterInfo -> f JmxExporterInfo
jmxExporterInfo_enabledInBroker = (JmxExporterInfo -> Bool)
-> (JmxExporterInfo -> Bool -> JmxExporterInfo)
-> Lens JmxExporterInfo JmxExporterInfo Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JmxExporterInfo' {Bool
enabledInBroker :: Bool
$sel:enabledInBroker:JmxExporterInfo' :: JmxExporterInfo -> Bool
enabledInBroker} -> Bool
enabledInBroker) (\s :: JmxExporterInfo
s@JmxExporterInfo' {} Bool
a -> JmxExporterInfo
s {$sel:enabledInBroker:JmxExporterInfo' :: Bool
enabledInBroker = Bool
a} :: JmxExporterInfo)
instance Prelude.Hashable JmxExporterInfo
instance Prelude.NFData JmxExporterInfo
instance Core.ToJSON JmxExporterInfo where
toJSON :: JmxExporterInfo -> Value
toJSON JmxExporterInfo' {Bool
enabledInBroker :: Bool
$sel:enabledInBroker:JmxExporterInfo' :: JmxExporterInfo -> Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"enabledInBroker" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
enabledInBroker)
]
)