module Stratosphere.ApplicationInsights.Application.HAClusterPrometheusExporterProperty (
        HAClusterPrometheusExporterProperty(..),
        mkHAClusterPrometheusExporterProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data HAClusterPrometheusExporterProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-haclusterprometheusexporter.html>
    HAClusterPrometheusExporterProperty {HAClusterPrometheusExporterProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-haclusterprometheusexporter.html#cfn-applicationinsights-application-haclusterprometheusexporter-prometheusport>
                                         HAClusterPrometheusExporterProperty -> Maybe (Value Text)
prometheusPort :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (HAClusterPrometheusExporterProperty
-> HAClusterPrometheusExporterProperty -> Bool
(HAClusterPrometheusExporterProperty
 -> HAClusterPrometheusExporterProperty -> Bool)
-> (HAClusterPrometheusExporterProperty
    -> HAClusterPrometheusExporterProperty -> Bool)
-> Eq HAClusterPrometheusExporterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HAClusterPrometheusExporterProperty
-> HAClusterPrometheusExporterProperty -> Bool
== :: HAClusterPrometheusExporterProperty
-> HAClusterPrometheusExporterProperty -> Bool
$c/= :: HAClusterPrometheusExporterProperty
-> HAClusterPrometheusExporterProperty -> Bool
/= :: HAClusterPrometheusExporterProperty
-> HAClusterPrometheusExporterProperty -> Bool
Prelude.Eq, Int -> HAClusterPrometheusExporterProperty -> ShowS
[HAClusterPrometheusExporterProperty] -> ShowS
HAClusterPrometheusExporterProperty -> String
(Int -> HAClusterPrometheusExporterProperty -> ShowS)
-> (HAClusterPrometheusExporterProperty -> String)
-> ([HAClusterPrometheusExporterProperty] -> ShowS)
-> Show HAClusterPrometheusExporterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HAClusterPrometheusExporterProperty -> ShowS
showsPrec :: Int -> HAClusterPrometheusExporterProperty -> ShowS
$cshow :: HAClusterPrometheusExporterProperty -> String
show :: HAClusterPrometheusExporterProperty -> String
$cshowList :: [HAClusterPrometheusExporterProperty] -> ShowS
showList :: [HAClusterPrometheusExporterProperty] -> ShowS
Prelude.Show)
mkHAClusterPrometheusExporterProperty ::
  HAClusterPrometheusExporterProperty
mkHAClusterPrometheusExporterProperty :: HAClusterPrometheusExporterProperty
mkHAClusterPrometheusExporterProperty
  = HAClusterPrometheusExporterProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), prometheusPort :: Maybe (Value Text)
prometheusPort = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties HAClusterPrometheusExporterProperty where
  toResourceProperties :: HAClusterPrometheusExporterProperty -> ResourceProperties
toResourceProperties HAClusterPrometheusExporterProperty {Maybe (Value Text)
()
haddock_workaround_ :: HAClusterPrometheusExporterProperty -> ()
prometheusPort :: HAClusterPrometheusExporterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
prometheusPort :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApplicationInsights::Application.HAClusterPrometheusExporter",
         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 -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PrometheusPort" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
prometheusPort])}
instance JSON.ToJSON HAClusterPrometheusExporterProperty where
  toJSON :: HAClusterPrometheusExporterProperty -> Value
toJSON HAClusterPrometheusExporterProperty {Maybe (Value Text)
()
haddock_workaround_ :: HAClusterPrometheusExporterProperty -> ()
prometheusPort :: HAClusterPrometheusExporterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
prometheusPort :: Maybe (Value Text)
..}
    = [(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 -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PrometheusPort" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
prometheusPort]))
instance Property "PrometheusPort" HAClusterPrometheusExporterProperty where
  type PropertyType "PrometheusPort" HAClusterPrometheusExporterProperty = Value Prelude.Text
  set :: PropertyType "PrometheusPort" HAClusterPrometheusExporterProperty
-> HAClusterPrometheusExporterProperty
-> HAClusterPrometheusExporterProperty
set PropertyType "PrometheusPort" HAClusterPrometheusExporterProperty
newValue HAClusterPrometheusExporterProperty {Maybe (Value Text)
()
haddock_workaround_ :: HAClusterPrometheusExporterProperty -> ()
prometheusPort :: HAClusterPrometheusExporterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
prometheusPort :: Maybe (Value Text)
..}
    = HAClusterPrometheusExporterProperty
        {prometheusPort :: Maybe (Value Text)
prometheusPort = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PrometheusPort" HAClusterPrometheusExporterProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}