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