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