module Stratosphere.MSK.Cluster.PrometheusProperty (
module Exports, PrometheusProperty(..), mkPrometheusProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MSK.Cluster.JmxExporterProperty as Exports
import {-# SOURCE #-} Stratosphere.MSK.Cluster.NodeExporterProperty as Exports
import Stratosphere.ResourceProperties
data PrometheusProperty
=
PrometheusProperty {PrometheusProperty -> ()
haddock_workaround_ :: (),
PrometheusProperty -> Maybe JmxExporterProperty
jmxExporter :: (Prelude.Maybe JmxExporterProperty),
PrometheusProperty -> Maybe NodeExporterProperty
nodeExporter :: (Prelude.Maybe NodeExporterProperty)}
deriving stock (PrometheusProperty -> PrometheusProperty -> Bool
(PrometheusProperty -> PrometheusProperty -> Bool)
-> (PrometheusProperty -> PrometheusProperty -> Bool)
-> Eq PrometheusProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PrometheusProperty -> PrometheusProperty -> Bool
== :: PrometheusProperty -> PrometheusProperty -> Bool
$c/= :: PrometheusProperty -> PrometheusProperty -> Bool
/= :: PrometheusProperty -> PrometheusProperty -> Bool
Prelude.Eq, Int -> PrometheusProperty -> ShowS
[PrometheusProperty] -> ShowS
PrometheusProperty -> String
(Int -> PrometheusProperty -> ShowS)
-> (PrometheusProperty -> String)
-> ([PrometheusProperty] -> ShowS)
-> Show PrometheusProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PrometheusProperty -> ShowS
showsPrec :: Int -> PrometheusProperty -> ShowS
$cshow :: PrometheusProperty -> String
show :: PrometheusProperty -> String
$cshowList :: [PrometheusProperty] -> ShowS
showList :: [PrometheusProperty] -> ShowS
Prelude.Show)
mkPrometheusProperty :: PrometheusProperty
mkPrometheusProperty :: PrometheusProperty
mkPrometheusProperty
= PrometheusProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), jmxExporter :: Maybe JmxExporterProperty
jmxExporter = Maybe JmxExporterProperty
forall a. Maybe a
Prelude.Nothing,
nodeExporter :: Maybe NodeExporterProperty
nodeExporter = Maybe NodeExporterProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PrometheusProperty where
toResourceProperties :: PrometheusProperty -> ResourceProperties
toResourceProperties PrometheusProperty {Maybe JmxExporterProperty
Maybe NodeExporterProperty
()
haddock_workaround_ :: PrometheusProperty -> ()
jmxExporter :: PrometheusProperty -> Maybe JmxExporterProperty
nodeExporter :: PrometheusProperty -> Maybe NodeExporterProperty
haddock_workaround_ :: ()
jmxExporter :: Maybe JmxExporterProperty
nodeExporter :: Maybe NodeExporterProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MSK::Cluster.Prometheus",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> JmxExporterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"JmxExporter" (JmxExporterProperty -> (Key, Value))
-> Maybe JmxExporterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JmxExporterProperty
jmxExporter,
Key -> NodeExporterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NodeExporter" (NodeExporterProperty -> (Key, Value))
-> Maybe NodeExporterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NodeExporterProperty
nodeExporter])}
instance JSON.ToJSON PrometheusProperty where
toJSON :: PrometheusProperty -> Value
toJSON PrometheusProperty {Maybe JmxExporterProperty
Maybe NodeExporterProperty
()
haddock_workaround_ :: PrometheusProperty -> ()
jmxExporter :: PrometheusProperty -> Maybe JmxExporterProperty
nodeExporter :: PrometheusProperty -> Maybe NodeExporterProperty
haddock_workaround_ :: ()
jmxExporter :: Maybe JmxExporterProperty
nodeExporter :: Maybe NodeExporterProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> JmxExporterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"JmxExporter" (JmxExporterProperty -> (Key, Value))
-> Maybe JmxExporterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JmxExporterProperty
jmxExporter,
Key -> NodeExporterProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NodeExporter" (NodeExporterProperty -> (Key, Value))
-> Maybe NodeExporterProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NodeExporterProperty
nodeExporter]))
instance Property "JmxExporter" PrometheusProperty where
type PropertyType "JmxExporter" PrometheusProperty = JmxExporterProperty
set :: PropertyType "JmxExporter" PrometheusProperty
-> PrometheusProperty -> PrometheusProperty
set PropertyType "JmxExporter" PrometheusProperty
newValue PrometheusProperty {Maybe JmxExporterProperty
Maybe NodeExporterProperty
()
haddock_workaround_ :: PrometheusProperty -> ()
jmxExporter :: PrometheusProperty -> Maybe JmxExporterProperty
nodeExporter :: PrometheusProperty -> Maybe NodeExporterProperty
haddock_workaround_ :: ()
jmxExporter :: Maybe JmxExporterProperty
nodeExporter :: Maybe NodeExporterProperty
..}
= PrometheusProperty {jmxExporter :: Maybe JmxExporterProperty
jmxExporter = JmxExporterProperty -> Maybe JmxExporterProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "JmxExporter" PrometheusProperty
JmxExporterProperty
newValue, Maybe NodeExporterProperty
()
haddock_workaround_ :: ()
nodeExporter :: Maybe NodeExporterProperty
haddock_workaround_ :: ()
nodeExporter :: Maybe NodeExporterProperty
..}
instance Property "NodeExporter" PrometheusProperty where
type PropertyType "NodeExporter" PrometheusProperty = NodeExporterProperty
set :: PropertyType "NodeExporter" PrometheusProperty
-> PrometheusProperty -> PrometheusProperty
set PropertyType "NodeExporter" PrometheusProperty
newValue PrometheusProperty {Maybe JmxExporterProperty
Maybe NodeExporterProperty
()
haddock_workaround_ :: PrometheusProperty -> ()
jmxExporter :: PrometheusProperty -> Maybe JmxExporterProperty
nodeExporter :: PrometheusProperty -> Maybe NodeExporterProperty
haddock_workaround_ :: ()
jmxExporter :: Maybe JmxExporterProperty
nodeExporter :: Maybe NodeExporterProperty
..}
= PrometheusProperty {nodeExporter :: Maybe NodeExporterProperty
nodeExporter = NodeExporterProperty -> Maybe NodeExporterProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NodeExporter" PrometheusProperty
NodeExporterProperty
newValue, Maybe JmxExporterProperty
()
haddock_workaround_ :: ()
jmxExporter :: Maybe JmxExporterProperty
haddock_workaround_ :: ()
jmxExporter :: Maybe JmxExporterProperty
..}