module Stratosphere.CloudWatch.MetricStream.MetricStreamFilterProperty (
        MetricStreamFilterProperty(..), mkMetricStreamFilterProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MetricStreamFilterProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html>
    MetricStreamFilterProperty {MetricStreamFilterProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html#cfn-cloudwatch-metricstream-metricstreamfilter-metricnames>
                                MetricStreamFilterProperty -> Maybe (ValueList Text)
metricNames :: (Prelude.Maybe (ValueList Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html#cfn-cloudwatch-metricstream-metricstreamfilter-namespace>
                                MetricStreamFilterProperty -> Value Text
namespace :: (Value Prelude.Text)}
  deriving stock (MetricStreamFilterProperty -> MetricStreamFilterProperty -> Bool
(MetricStreamFilterProperty -> MetricStreamFilterProperty -> Bool)
-> (MetricStreamFilterProperty
    -> MetricStreamFilterProperty -> Bool)
-> Eq MetricStreamFilterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MetricStreamFilterProperty -> MetricStreamFilterProperty -> Bool
== :: MetricStreamFilterProperty -> MetricStreamFilterProperty -> Bool
$c/= :: MetricStreamFilterProperty -> MetricStreamFilterProperty -> Bool
/= :: MetricStreamFilterProperty -> MetricStreamFilterProperty -> Bool
Prelude.Eq, Int -> MetricStreamFilterProperty -> ShowS
[MetricStreamFilterProperty] -> ShowS
MetricStreamFilterProperty -> String
(Int -> MetricStreamFilterProperty -> ShowS)
-> (MetricStreamFilterProperty -> String)
-> ([MetricStreamFilterProperty] -> ShowS)
-> Show MetricStreamFilterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MetricStreamFilterProperty -> ShowS
showsPrec :: Int -> MetricStreamFilterProperty -> ShowS
$cshow :: MetricStreamFilterProperty -> String
show :: MetricStreamFilterProperty -> String
$cshowList :: [MetricStreamFilterProperty] -> ShowS
showList :: [MetricStreamFilterProperty] -> ShowS
Prelude.Show)
mkMetricStreamFilterProperty ::
  Value Prelude.Text -> MetricStreamFilterProperty
mkMetricStreamFilterProperty :: Value Text -> MetricStreamFilterProperty
mkMetricStreamFilterProperty Value Text
namespace
  = MetricStreamFilterProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), namespace :: Value Text
namespace = Value Text
namespace,
       metricNames :: Maybe (ValueList Text)
metricNames = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MetricStreamFilterProperty where
  toResourceProperties :: MetricStreamFilterProperty -> ResourceProperties
toResourceProperties MetricStreamFilterProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: MetricStreamFilterProperty -> ()
metricNames :: MetricStreamFilterProperty -> Maybe (ValueList Text)
namespace :: MetricStreamFilterProperty -> Value Text
haddock_workaround_ :: ()
metricNames :: Maybe (ValueList Text)
namespace :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudWatch::MetricStream.MetricStreamFilter",
         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
"Namespace" 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
namespace]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ValueList 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
"MetricNames" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
metricNames]))}
instance JSON.ToJSON MetricStreamFilterProperty where
  toJSON :: MetricStreamFilterProperty -> Value
toJSON MetricStreamFilterProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: MetricStreamFilterProperty -> ()
metricNames :: MetricStreamFilterProperty -> Maybe (ValueList Text)
namespace :: MetricStreamFilterProperty -> Value Text
haddock_workaround_ :: ()
metricNames :: Maybe (ValueList Text)
namespace :: 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
"Namespace" 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
namespace]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ValueList 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
"MetricNames" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
metricNames])))
instance Property "MetricNames" MetricStreamFilterProperty where
  type PropertyType "MetricNames" MetricStreamFilterProperty = ValueList Prelude.Text
  set :: PropertyType "MetricNames" MetricStreamFilterProperty
-> MetricStreamFilterProperty -> MetricStreamFilterProperty
set PropertyType "MetricNames" MetricStreamFilterProperty
newValue MetricStreamFilterProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: MetricStreamFilterProperty -> ()
metricNames :: MetricStreamFilterProperty -> Maybe (ValueList Text)
namespace :: MetricStreamFilterProperty -> Value Text
haddock_workaround_ :: ()
metricNames :: Maybe (ValueList Text)
namespace :: Value Text
..}
    = MetricStreamFilterProperty
        {metricNames :: Maybe (ValueList Text)
metricNames = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MetricNames" MetricStreamFilterProperty
ValueList Text
newValue, ()
Value Text
haddock_workaround_ :: ()
namespace :: Value Text
haddock_workaround_ :: ()
namespace :: Value Text
..}
instance Property "Namespace" MetricStreamFilterProperty where
  type PropertyType "Namespace" MetricStreamFilterProperty = Value Prelude.Text
  set :: PropertyType "Namespace" MetricStreamFilterProperty
-> MetricStreamFilterProperty -> MetricStreamFilterProperty
set PropertyType "Namespace" MetricStreamFilterProperty
newValue MetricStreamFilterProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: MetricStreamFilterProperty -> ()
metricNames :: MetricStreamFilterProperty -> Maybe (ValueList Text)
namespace :: MetricStreamFilterProperty -> Value Text
haddock_workaround_ :: ()
metricNames :: Maybe (ValueList Text)
namespace :: Value Text
..}
    = MetricStreamFilterProperty {namespace :: Value Text
namespace = PropertyType "Namespace" MetricStreamFilterProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
metricNames :: Maybe (ValueList Text)
haddock_workaround_ :: ()
metricNames :: Maybe (ValueList Text)
..}