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