module Stratosphere.IoT.SecurityProfile.MetricDimensionProperty (
MetricDimensionProperty(..), mkMetricDimensionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MetricDimensionProperty
=
MetricDimensionProperty {MetricDimensionProperty -> ()
haddock_workaround_ :: (),
MetricDimensionProperty -> Value Text
dimensionName :: (Value Prelude.Text),
MetricDimensionProperty -> Maybe (Value Text)
operator :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (MetricDimensionProperty -> MetricDimensionProperty -> Bool
(MetricDimensionProperty -> MetricDimensionProperty -> Bool)
-> (MetricDimensionProperty -> MetricDimensionProperty -> Bool)
-> Eq MetricDimensionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MetricDimensionProperty -> MetricDimensionProperty -> Bool
== :: MetricDimensionProperty -> MetricDimensionProperty -> Bool
$c/= :: MetricDimensionProperty -> MetricDimensionProperty -> Bool
/= :: MetricDimensionProperty -> MetricDimensionProperty -> Bool
Prelude.Eq, Int -> MetricDimensionProperty -> ShowS
[MetricDimensionProperty] -> ShowS
MetricDimensionProperty -> String
(Int -> MetricDimensionProperty -> ShowS)
-> (MetricDimensionProperty -> String)
-> ([MetricDimensionProperty] -> ShowS)
-> Show MetricDimensionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MetricDimensionProperty -> ShowS
showsPrec :: Int -> MetricDimensionProperty -> ShowS
$cshow :: MetricDimensionProperty -> String
show :: MetricDimensionProperty -> String
$cshowList :: [MetricDimensionProperty] -> ShowS
showList :: [MetricDimensionProperty] -> ShowS
Prelude.Show)
mkMetricDimensionProperty ::
Value Prelude.Text -> MetricDimensionProperty
mkMetricDimensionProperty :: Value Text -> MetricDimensionProperty
mkMetricDimensionProperty Value Text
dimensionName
= MetricDimensionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), dimensionName :: Value Text
dimensionName = Value Text
dimensionName,
operator :: Maybe (Value Text)
operator = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MetricDimensionProperty where
toResourceProperties :: MetricDimensionProperty -> ResourceProperties
toResourceProperties MetricDimensionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricDimensionProperty -> ()
dimensionName :: MetricDimensionProperty -> Value Text
operator :: MetricDimensionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensionName :: Value Text
operator :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoT::SecurityProfile.MetricDimension",
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
"DimensionName" 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
dimensionName]
([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
"Operator" (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)
operator]))}
instance JSON.ToJSON MetricDimensionProperty where
toJSON :: MetricDimensionProperty -> Value
toJSON MetricDimensionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricDimensionProperty -> ()
dimensionName :: MetricDimensionProperty -> Value Text
operator :: MetricDimensionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensionName :: Value Text
operator :: 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
"DimensionName" 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
dimensionName]
([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
"Operator" (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)
operator])))
instance Property "DimensionName" MetricDimensionProperty where
type PropertyType "DimensionName" MetricDimensionProperty = Value Prelude.Text
set :: PropertyType "DimensionName" MetricDimensionProperty
-> MetricDimensionProperty -> MetricDimensionProperty
set PropertyType "DimensionName" MetricDimensionProperty
newValue MetricDimensionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricDimensionProperty -> ()
dimensionName :: MetricDimensionProperty -> Value Text
operator :: MetricDimensionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensionName :: Value Text
operator :: Maybe (Value Text)
..}
= MetricDimensionProperty {dimensionName :: Value Text
dimensionName = PropertyType "DimensionName" MetricDimensionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
operator :: Maybe (Value Text)
haddock_workaround_ :: ()
operator :: Maybe (Value Text)
..}
instance Property "Operator" MetricDimensionProperty where
type PropertyType "Operator" MetricDimensionProperty = Value Prelude.Text
set :: PropertyType "Operator" MetricDimensionProperty
-> MetricDimensionProperty -> MetricDimensionProperty
set PropertyType "Operator" MetricDimensionProperty
newValue MetricDimensionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricDimensionProperty -> ()
dimensionName :: MetricDimensionProperty -> Value Text
operator :: MetricDimensionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensionName :: Value Text
operator :: Maybe (Value Text)
..}
= MetricDimensionProperty {operator :: Maybe (Value Text)
operator = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Operator" MetricDimensionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
dimensionName :: Value Text
haddock_workaround_ :: ()
dimensionName :: Value Text
..}