module Stratosphere.Logs.MetricFilter.MetricTransformationProperty (
        module Exports, MetricTransformationProperty(..),
        mkMetricTransformationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Logs.MetricFilter.DimensionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MetricTransformationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html>
    MetricTransformationProperty {MetricTransformationProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-defaultvalue>
                                  MetricTransformationProperty -> Maybe (Value Double)
defaultValue :: (Prelude.Maybe (Value Prelude.Double)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-dimensions>
                                  MetricTransformationProperty -> Maybe [DimensionProperty]
dimensions :: (Prelude.Maybe [DimensionProperty]),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricname>
                                  MetricTransformationProperty -> Value Text
metricName :: (Value Prelude.Text),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricnamespace>
                                  MetricTransformationProperty -> Value Text
metricNamespace :: (Value Prelude.Text),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricvalue>
                                  MetricTransformationProperty -> Value Text
metricValue :: (Value Prelude.Text),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-unit>
                                  MetricTransformationProperty -> Maybe (Value Text)
unit :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (MetricTransformationProperty
-> MetricTransformationProperty -> Bool
(MetricTransformationProperty
 -> MetricTransformationProperty -> Bool)
-> (MetricTransformationProperty
    -> MetricTransformationProperty -> Bool)
-> Eq MetricTransformationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MetricTransformationProperty
-> MetricTransformationProperty -> Bool
== :: MetricTransformationProperty
-> MetricTransformationProperty -> Bool
$c/= :: MetricTransformationProperty
-> MetricTransformationProperty -> Bool
/= :: MetricTransformationProperty
-> MetricTransformationProperty -> Bool
Prelude.Eq, Int -> MetricTransformationProperty -> ShowS
[MetricTransformationProperty] -> ShowS
MetricTransformationProperty -> String
(Int -> MetricTransformationProperty -> ShowS)
-> (MetricTransformationProperty -> String)
-> ([MetricTransformationProperty] -> ShowS)
-> Show MetricTransformationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MetricTransformationProperty -> ShowS
showsPrec :: Int -> MetricTransformationProperty -> ShowS
$cshow :: MetricTransformationProperty -> String
show :: MetricTransformationProperty -> String
$cshowList :: [MetricTransformationProperty] -> ShowS
showList :: [MetricTransformationProperty] -> ShowS
Prelude.Show)
mkMetricTransformationProperty ::
  Value Prelude.Text
  -> Value Prelude.Text
     -> Value Prelude.Text -> MetricTransformationProperty
mkMetricTransformationProperty :: Value Text
-> Value Text -> Value Text -> MetricTransformationProperty
mkMetricTransformationProperty
  Value Text
metricName
  Value Text
metricNamespace
  Value Text
metricValue
  = MetricTransformationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), metricName :: Value Text
metricName = Value Text
metricName,
       metricNamespace :: Value Text
metricNamespace = Value Text
metricNamespace, metricValue :: Value Text
metricValue = Value Text
metricValue,
       defaultValue :: Maybe (Value Double)
defaultValue = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing, dimensions :: Maybe [DimensionProperty]
dimensions = Maybe [DimensionProperty]
forall a. Maybe a
Prelude.Nothing,
       unit :: Maybe (Value Text)
unit = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MetricTransformationProperty where
  toResourceProperties :: MetricTransformationProperty -> ResourceProperties
toResourceProperties MetricTransformationProperty {Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricTransformationProperty -> ()
defaultValue :: MetricTransformationProperty -> Maybe (Value Double)
dimensions :: MetricTransformationProperty -> Maybe [DimensionProperty]
metricName :: MetricTransformationProperty -> Value Text
metricNamespace :: MetricTransformationProperty -> Value Text
metricValue :: MetricTransformationProperty -> Value Text
unit :: MetricTransformationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Logs::MetricFilter.MetricTransformation",
         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
"MetricName" 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..= Value Text
metricName,
                            Key
"MetricNamespace" 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..= Value Text
metricNamespace,
                            Key
"MetricValue" 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..= Value Text
metricValue]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [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
"DefaultValue" (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)
defaultValue,
                               Key -> [DimensionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Dimensions" ([DimensionProperty] -> (Key, Value))
-> Maybe [DimensionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DimensionProperty]
dimensions,
                               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
"Unit" (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)
unit]))}
instance JSON.ToJSON MetricTransformationProperty where
  toJSON :: MetricTransformationProperty -> Value
toJSON MetricTransformationProperty {Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricTransformationProperty -> ()
defaultValue :: MetricTransformationProperty -> Maybe (Value Double)
dimensions :: MetricTransformationProperty -> Maybe [DimensionProperty]
metricName :: MetricTransformationProperty -> Value Text
metricNamespace :: MetricTransformationProperty -> Value Text
metricValue :: MetricTransformationProperty -> Value Text
unit :: MetricTransformationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
    = [(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
"MetricName" 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..= Value Text
metricName,
               Key
"MetricNamespace" 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..= Value Text
metricNamespace,
               Key
"MetricValue" 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..= Value Text
metricValue]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [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
"DefaultValue" (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)
defaultValue,
                  Key -> [DimensionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Dimensions" ([DimensionProperty] -> (Key, Value))
-> Maybe [DimensionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DimensionProperty]
dimensions,
                  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
"Unit" (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)
unit])))
instance Property "DefaultValue" MetricTransformationProperty where
  type PropertyType "DefaultValue" MetricTransformationProperty = Value Prelude.Double
  set :: PropertyType "DefaultValue" MetricTransformationProperty
-> MetricTransformationProperty -> MetricTransformationProperty
set PropertyType "DefaultValue" MetricTransformationProperty
newValue MetricTransformationProperty {Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricTransformationProperty -> ()
defaultValue :: MetricTransformationProperty -> Maybe (Value Double)
dimensions :: MetricTransformationProperty -> Maybe [DimensionProperty]
metricName :: MetricTransformationProperty -> Value Text
metricNamespace :: MetricTransformationProperty -> Value Text
metricValue :: MetricTransformationProperty -> Value Text
unit :: MetricTransformationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
    = MetricTransformationProperty
        {defaultValue :: Maybe (Value Double)
defaultValue = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultValue" MetricTransformationProperty
Value Double
newValue, Maybe [DimensionProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
instance Property "Dimensions" MetricTransformationProperty where
  type PropertyType "Dimensions" MetricTransformationProperty = [DimensionProperty]
  set :: PropertyType "Dimensions" MetricTransformationProperty
-> MetricTransformationProperty -> MetricTransformationProperty
set PropertyType "Dimensions" MetricTransformationProperty
newValue MetricTransformationProperty {Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricTransformationProperty -> ()
defaultValue :: MetricTransformationProperty -> Maybe (Value Double)
dimensions :: MetricTransformationProperty -> Maybe [DimensionProperty]
metricName :: MetricTransformationProperty -> Value Text
metricNamespace :: MetricTransformationProperty -> Value Text
metricValue :: MetricTransformationProperty -> Value Text
unit :: MetricTransformationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
    = MetricTransformationProperty
        {dimensions :: Maybe [DimensionProperty]
dimensions = [DimensionProperty] -> Maybe [DimensionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [DimensionProperty]
PropertyType "Dimensions" MetricTransformationProperty
newValue, Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
instance Property "MetricName" MetricTransformationProperty where
  type PropertyType "MetricName" MetricTransformationProperty = Value Prelude.Text
  set :: PropertyType "MetricName" MetricTransformationProperty
-> MetricTransformationProperty -> MetricTransformationProperty
set PropertyType "MetricName" MetricTransformationProperty
newValue MetricTransformationProperty {Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricTransformationProperty -> ()
defaultValue :: MetricTransformationProperty -> Maybe (Value Double)
dimensions :: MetricTransformationProperty -> Maybe [DimensionProperty]
metricName :: MetricTransformationProperty -> Value Text
metricNamespace :: MetricTransformationProperty -> Value Text
metricValue :: MetricTransformationProperty -> Value Text
unit :: MetricTransformationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
    = MetricTransformationProperty {metricName :: Value Text
metricName = PropertyType "MetricName" MetricTransformationProperty
Value Text
newValue, Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
instance Property "MetricNamespace" MetricTransformationProperty where
  type PropertyType "MetricNamespace" MetricTransformationProperty = Value Prelude.Text
  set :: PropertyType "MetricNamespace" MetricTransformationProperty
-> MetricTransformationProperty -> MetricTransformationProperty
set PropertyType "MetricNamespace" MetricTransformationProperty
newValue MetricTransformationProperty {Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricTransformationProperty -> ()
defaultValue :: MetricTransformationProperty -> Maybe (Value Double)
dimensions :: MetricTransformationProperty -> Maybe [DimensionProperty]
metricName :: MetricTransformationProperty -> Value Text
metricNamespace :: MetricTransformationProperty -> Value Text
metricValue :: MetricTransformationProperty -> Value Text
unit :: MetricTransformationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
    = MetricTransformationProperty {metricNamespace :: Value Text
metricNamespace = PropertyType "MetricNamespace" MetricTransformationProperty
Value Text
newValue, Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
instance Property "MetricValue" MetricTransformationProperty where
  type PropertyType "MetricValue" MetricTransformationProperty = Value Prelude.Text
  set :: PropertyType "MetricValue" MetricTransformationProperty
-> MetricTransformationProperty -> MetricTransformationProperty
set PropertyType "MetricValue" MetricTransformationProperty
newValue MetricTransformationProperty {Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricTransformationProperty -> ()
defaultValue :: MetricTransformationProperty -> Maybe (Value Double)
dimensions :: MetricTransformationProperty -> Maybe [DimensionProperty]
metricName :: MetricTransformationProperty -> Value Text
metricNamespace :: MetricTransformationProperty -> Value Text
metricValue :: MetricTransformationProperty -> Value Text
unit :: MetricTransformationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
    = MetricTransformationProperty {metricValue :: Value Text
metricValue = PropertyType "MetricValue" MetricTransformationProperty
Value Text
newValue, Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
unit :: Maybe (Value Text)
..}
instance Property "Unit" MetricTransformationProperty where
  type PropertyType "Unit" MetricTransformationProperty = Value Prelude.Text
  set :: PropertyType "Unit" MetricTransformationProperty
-> MetricTransformationProperty -> MetricTransformationProperty
set PropertyType "Unit" MetricTransformationProperty
newValue MetricTransformationProperty {Maybe [DimensionProperty]
Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricTransformationProperty -> ()
defaultValue :: MetricTransformationProperty -> Maybe (Value Double)
dimensions :: MetricTransformationProperty -> Maybe [DimensionProperty]
metricName :: MetricTransformationProperty -> Value Text
metricNamespace :: MetricTransformationProperty -> Value Text
metricValue :: MetricTransformationProperty -> Value Text
unit :: MetricTransformationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
unit :: Maybe (Value Text)
..}
    = MetricTransformationProperty {unit :: Maybe (Value Text)
unit = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Unit" MetricTransformationProperty
Value Text
newValue, Maybe [DimensionProperty]
Maybe (Value Double)
()
Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
haddock_workaround_ :: ()
defaultValue :: Maybe (Value Double)
dimensions :: Maybe [DimensionProperty]
metricName :: Value Text
metricNamespace :: Value Text
metricValue :: Value Text
..}