module Stratosphere.ApplicationSignals.ServiceLevelObjective.RequestBasedSliProperty (
        module Exports, RequestBasedSliProperty(..),
        mkRequestBasedSliProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ApplicationSignals.ServiceLevelObjective.RequestBasedSliMetricProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RequestBasedSliProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedsli.html>
    RequestBasedSliProperty {RequestBasedSliProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedsli.html#cfn-applicationsignals-servicelevelobjective-requestbasedsli-comparisonoperator>
                             RequestBasedSliProperty -> Maybe (Value Text)
comparisonOperator :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedsli.html#cfn-applicationsignals-servicelevelobjective-requestbasedsli-metricthreshold>
                             RequestBasedSliProperty -> Maybe (Value Double)
metricThreshold :: (Prelude.Maybe (Value Prelude.Double)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedsli.html#cfn-applicationsignals-servicelevelobjective-requestbasedsli-requestbasedslimetric>
                             RequestBasedSliProperty -> RequestBasedSliMetricProperty
requestBasedSliMetric :: RequestBasedSliMetricProperty}
  deriving stock (RequestBasedSliProperty -> RequestBasedSliProperty -> Bool
(RequestBasedSliProperty -> RequestBasedSliProperty -> Bool)
-> (RequestBasedSliProperty -> RequestBasedSliProperty -> Bool)
-> Eq RequestBasedSliProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RequestBasedSliProperty -> RequestBasedSliProperty -> Bool
== :: RequestBasedSliProperty -> RequestBasedSliProperty -> Bool
$c/= :: RequestBasedSliProperty -> RequestBasedSliProperty -> Bool
/= :: RequestBasedSliProperty -> RequestBasedSliProperty -> Bool
Prelude.Eq, Int -> RequestBasedSliProperty -> ShowS
[RequestBasedSliProperty] -> ShowS
RequestBasedSliProperty -> String
(Int -> RequestBasedSliProperty -> ShowS)
-> (RequestBasedSliProperty -> String)
-> ([RequestBasedSliProperty] -> ShowS)
-> Show RequestBasedSliProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RequestBasedSliProperty -> ShowS
showsPrec :: Int -> RequestBasedSliProperty -> ShowS
$cshow :: RequestBasedSliProperty -> String
show :: RequestBasedSliProperty -> String
$cshowList :: [RequestBasedSliProperty] -> ShowS
showList :: [RequestBasedSliProperty] -> ShowS
Prelude.Show)
mkRequestBasedSliProperty ::
  RequestBasedSliMetricProperty -> RequestBasedSliProperty
mkRequestBasedSliProperty :: RequestBasedSliMetricProperty -> RequestBasedSliProperty
mkRequestBasedSliProperty RequestBasedSliMetricProperty
requestBasedSliMetric
  = RequestBasedSliProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       requestBasedSliMetric :: RequestBasedSliMetricProperty
requestBasedSliMetric = RequestBasedSliMetricProperty
requestBasedSliMetric,
       comparisonOperator :: Maybe (Value Text)
comparisonOperator = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       metricThreshold :: Maybe (Value Double)
metricThreshold = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RequestBasedSliProperty where
  toResourceProperties :: RequestBasedSliProperty -> ResourceProperties
toResourceProperties RequestBasedSliProperty {Maybe (Value Double)
Maybe (Value Text)
()
RequestBasedSliMetricProperty
haddock_workaround_ :: RequestBasedSliProperty -> ()
comparisonOperator :: RequestBasedSliProperty -> Maybe (Value Text)
metricThreshold :: RequestBasedSliProperty -> Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliProperty -> RequestBasedSliMetricProperty
haddock_workaround_ :: ()
comparisonOperator :: Maybe (Value Text)
metricThreshold :: Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliMetricProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApplicationSignals::ServiceLevelObjective.RequestBasedSli",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"RequestBasedSliMetric" Key -> RequestBasedSliMetricProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RequestBasedSliMetricProperty
requestBasedSliMetric]
                           ([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
"ComparisonOperator" (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)
comparisonOperator,
                               Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MetricThreshold" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
metricThreshold]))}
instance JSON.ToJSON RequestBasedSliProperty where
  toJSON :: RequestBasedSliProperty -> Value
toJSON RequestBasedSliProperty {Maybe (Value Double)
Maybe (Value Text)
()
RequestBasedSliMetricProperty
haddock_workaround_ :: RequestBasedSliProperty -> ()
comparisonOperator :: RequestBasedSliProperty -> Maybe (Value Text)
metricThreshold :: RequestBasedSliProperty -> Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliProperty -> RequestBasedSliMetricProperty
haddock_workaround_ :: ()
comparisonOperator :: Maybe (Value Text)
metricThreshold :: Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliMetricProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"RequestBasedSliMetric" Key -> RequestBasedSliMetricProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= RequestBasedSliMetricProperty
requestBasedSliMetric]
              ([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
"ComparisonOperator" (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)
comparisonOperator,
                  Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MetricThreshold" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
metricThreshold])))
instance Property "ComparisonOperator" RequestBasedSliProperty where
  type PropertyType "ComparisonOperator" RequestBasedSliProperty = Value Prelude.Text
  set :: PropertyType "ComparisonOperator" RequestBasedSliProperty
-> RequestBasedSliProperty -> RequestBasedSliProperty
set PropertyType "ComparisonOperator" RequestBasedSliProperty
newValue RequestBasedSliProperty {Maybe (Value Double)
Maybe (Value Text)
()
RequestBasedSliMetricProperty
haddock_workaround_ :: RequestBasedSliProperty -> ()
comparisonOperator :: RequestBasedSliProperty -> Maybe (Value Text)
metricThreshold :: RequestBasedSliProperty -> Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliProperty -> RequestBasedSliMetricProperty
haddock_workaround_ :: ()
comparisonOperator :: Maybe (Value Text)
metricThreshold :: Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliMetricProperty
..}
    = RequestBasedSliProperty
        {comparisonOperator :: Maybe (Value Text)
comparisonOperator = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ComparisonOperator" RequestBasedSliProperty
Value Text
newValue, Maybe (Value Double)
()
RequestBasedSliMetricProperty
haddock_workaround_ :: ()
metricThreshold :: Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliMetricProperty
haddock_workaround_ :: ()
metricThreshold :: Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliMetricProperty
..}
instance Property "MetricThreshold" RequestBasedSliProperty where
  type PropertyType "MetricThreshold" RequestBasedSliProperty = Value Prelude.Double
  set :: PropertyType "MetricThreshold" RequestBasedSliProperty
-> RequestBasedSliProperty -> RequestBasedSliProperty
set PropertyType "MetricThreshold" RequestBasedSliProperty
newValue RequestBasedSliProperty {Maybe (Value Double)
Maybe (Value Text)
()
RequestBasedSliMetricProperty
haddock_workaround_ :: RequestBasedSliProperty -> ()
comparisonOperator :: RequestBasedSliProperty -> Maybe (Value Text)
metricThreshold :: RequestBasedSliProperty -> Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliProperty -> RequestBasedSliMetricProperty
haddock_workaround_ :: ()
comparisonOperator :: Maybe (Value Text)
metricThreshold :: Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliMetricProperty
..}
    = RequestBasedSliProperty
        {metricThreshold :: Maybe (Value Double)
metricThreshold = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MetricThreshold" RequestBasedSliProperty
Value Double
newValue, Maybe (Value Text)
()
RequestBasedSliMetricProperty
haddock_workaround_ :: ()
comparisonOperator :: Maybe (Value Text)
requestBasedSliMetric :: RequestBasedSliMetricProperty
haddock_workaround_ :: ()
comparisonOperator :: Maybe (Value Text)
requestBasedSliMetric :: RequestBasedSliMetricProperty
..}
instance Property "RequestBasedSliMetric" RequestBasedSliProperty where
  type PropertyType "RequestBasedSliMetric" RequestBasedSliProperty = RequestBasedSliMetricProperty
  set :: PropertyType "RequestBasedSliMetric" RequestBasedSliProperty
-> RequestBasedSliProperty -> RequestBasedSliProperty
set PropertyType "RequestBasedSliMetric" RequestBasedSliProperty
newValue RequestBasedSliProperty {Maybe (Value Double)
Maybe (Value Text)
()
RequestBasedSliMetricProperty
haddock_workaround_ :: RequestBasedSliProperty -> ()
comparisonOperator :: RequestBasedSliProperty -> Maybe (Value Text)
metricThreshold :: RequestBasedSliProperty -> Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliProperty -> RequestBasedSliMetricProperty
haddock_workaround_ :: ()
comparisonOperator :: Maybe (Value Text)
metricThreshold :: Maybe (Value Double)
requestBasedSliMetric :: RequestBasedSliMetricProperty
..}
    = RequestBasedSliProperty {requestBasedSliMetric :: RequestBasedSliMetricProperty
requestBasedSliMetric = PropertyType "RequestBasedSliMetric" RequestBasedSliProperty
RequestBasedSliMetricProperty
newValue, Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: ()
comparisonOperator :: Maybe (Value Text)
metricThreshold :: Maybe (Value Double)
haddock_workaround_ :: ()
comparisonOperator :: Maybe (Value Text)
metricThreshold :: Maybe (Value Double)
..}