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