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