module Stratosphere.IoT.SecurityProfile.StatisticalThresholdProperty (
        StatisticalThresholdProperty(..), mkStatisticalThresholdProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StatisticalThresholdProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-securityprofile-statisticalthreshold.html>
    StatisticalThresholdProperty {StatisticalThresholdProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-securityprofile-statisticalthreshold.html#cfn-iot-securityprofile-statisticalthreshold-statistic>
                                  StatisticalThresholdProperty -> Maybe (Value Text)
statistic :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (StatisticalThresholdProperty
-> StatisticalThresholdProperty -> Bool
(StatisticalThresholdProperty
 -> StatisticalThresholdProperty -> Bool)
-> (StatisticalThresholdProperty
    -> StatisticalThresholdProperty -> Bool)
-> Eq StatisticalThresholdProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StatisticalThresholdProperty
-> StatisticalThresholdProperty -> Bool
== :: StatisticalThresholdProperty
-> StatisticalThresholdProperty -> Bool
$c/= :: StatisticalThresholdProperty
-> StatisticalThresholdProperty -> Bool
/= :: StatisticalThresholdProperty
-> StatisticalThresholdProperty -> Bool
Prelude.Eq, Int -> StatisticalThresholdProperty -> ShowS
[StatisticalThresholdProperty] -> ShowS
StatisticalThresholdProperty -> String
(Int -> StatisticalThresholdProperty -> ShowS)
-> (StatisticalThresholdProperty -> String)
-> ([StatisticalThresholdProperty] -> ShowS)
-> Show StatisticalThresholdProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StatisticalThresholdProperty -> ShowS
showsPrec :: Int -> StatisticalThresholdProperty -> ShowS
$cshow :: StatisticalThresholdProperty -> String
show :: StatisticalThresholdProperty -> String
$cshowList :: [StatisticalThresholdProperty] -> ShowS
showList :: [StatisticalThresholdProperty] -> ShowS
Prelude.Show)
mkStatisticalThresholdProperty :: StatisticalThresholdProperty
mkStatisticalThresholdProperty :: StatisticalThresholdProperty
mkStatisticalThresholdProperty
  = StatisticalThresholdProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), statistic :: Maybe (Value Text)
statistic = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StatisticalThresholdProperty where
  toResourceProperties :: StatisticalThresholdProperty -> ResourceProperties
toResourceProperties StatisticalThresholdProperty {Maybe (Value Text)
()
haddock_workaround_ :: StatisticalThresholdProperty -> ()
statistic :: StatisticalThresholdProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
statistic :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::SecurityProfile.StatisticalThreshold",
         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
"Statistic" (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)
statistic])}
instance JSON.ToJSON StatisticalThresholdProperty where
  toJSON :: StatisticalThresholdProperty -> Value
toJSON StatisticalThresholdProperty {Maybe (Value Text)
()
haddock_workaround_ :: StatisticalThresholdProperty -> ()
statistic :: StatisticalThresholdProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
statistic :: 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
"Statistic" (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)
statistic]))
instance Property "Statistic" StatisticalThresholdProperty where
  type PropertyType "Statistic" StatisticalThresholdProperty = Value Prelude.Text
  set :: PropertyType "Statistic" StatisticalThresholdProperty
-> StatisticalThresholdProperty -> StatisticalThresholdProperty
set PropertyType "Statistic" StatisticalThresholdProperty
newValue StatisticalThresholdProperty {Maybe (Value Text)
()
haddock_workaround_ :: StatisticalThresholdProperty -> ()
statistic :: StatisticalThresholdProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
statistic :: Maybe (Value Text)
..}
    = StatisticalThresholdProperty
        {statistic :: Maybe (Value Text)
statistic = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Statistic" StatisticalThresholdProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}