module Stratosphere.IoTSiteWise.ComputationModel.ComputationModelConfigurationProperty (
        module Exports, ComputationModelConfigurationProperty(..),
        mkComputationModelConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTSiteWise.ComputationModel.AnomalyDetectionComputationModelConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data ComputationModelConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-computationmodel-computationmodelconfiguration.html>
    ComputationModelConfigurationProperty {ComputationModelConfigurationProperty -> ()
haddock_workaround_ :: (),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-computationmodel-computationmodelconfiguration.html#cfn-iotsitewise-computationmodel-computationmodelconfiguration-anomalydetection>
                                           ComputationModelConfigurationProperty
-> Maybe AnomalyDetectionComputationModelConfigurationProperty
anomalyDetection :: (Prelude.Maybe AnomalyDetectionComputationModelConfigurationProperty)}
  deriving stock (ComputationModelConfigurationProperty
-> ComputationModelConfigurationProperty -> Bool
(ComputationModelConfigurationProperty
 -> ComputationModelConfigurationProperty -> Bool)
-> (ComputationModelConfigurationProperty
    -> ComputationModelConfigurationProperty -> Bool)
-> Eq ComputationModelConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ComputationModelConfigurationProperty
-> ComputationModelConfigurationProperty -> Bool
== :: ComputationModelConfigurationProperty
-> ComputationModelConfigurationProperty -> Bool
$c/= :: ComputationModelConfigurationProperty
-> ComputationModelConfigurationProperty -> Bool
/= :: ComputationModelConfigurationProperty
-> ComputationModelConfigurationProperty -> Bool
Prelude.Eq, Int -> ComputationModelConfigurationProperty -> ShowS
[ComputationModelConfigurationProperty] -> ShowS
ComputationModelConfigurationProperty -> String
(Int -> ComputationModelConfigurationProperty -> ShowS)
-> (ComputationModelConfigurationProperty -> String)
-> ([ComputationModelConfigurationProperty] -> ShowS)
-> Show ComputationModelConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ComputationModelConfigurationProperty -> ShowS
showsPrec :: Int -> ComputationModelConfigurationProperty -> ShowS
$cshow :: ComputationModelConfigurationProperty -> String
show :: ComputationModelConfigurationProperty -> String
$cshowList :: [ComputationModelConfigurationProperty] -> ShowS
showList :: [ComputationModelConfigurationProperty] -> ShowS
Prelude.Show)
mkComputationModelConfigurationProperty ::
  ComputationModelConfigurationProperty
mkComputationModelConfigurationProperty :: ComputationModelConfigurationProperty
mkComputationModelConfigurationProperty
  = ComputationModelConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), anomalyDetection :: Maybe AnomalyDetectionComputationModelConfigurationProperty
anomalyDetection = Maybe AnomalyDetectionComputationModelConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ComputationModelConfigurationProperty where
  toResourceProperties :: ComputationModelConfigurationProperty -> ResourceProperties
toResourceProperties ComputationModelConfigurationProperty {Maybe AnomalyDetectionComputationModelConfigurationProperty
()
haddock_workaround_ :: ComputationModelConfigurationProperty -> ()
anomalyDetection :: ComputationModelConfigurationProperty
-> Maybe AnomalyDetectionComputationModelConfigurationProperty
haddock_workaround_ :: ()
anomalyDetection :: Maybe AnomalyDetectionComputationModelConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTSiteWise::ComputationModel.ComputationModelConfiguration",
         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
-> AnomalyDetectionComputationModelConfigurationProperty
-> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AnomalyDetection" (AnomalyDetectionComputationModelConfigurationProperty
 -> (Key, Value))
-> Maybe AnomalyDetectionComputationModelConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AnomalyDetectionComputationModelConfigurationProperty
anomalyDetection])}
instance JSON.ToJSON ComputationModelConfigurationProperty where
  toJSON :: ComputationModelConfigurationProperty -> Value
toJSON ComputationModelConfigurationProperty {Maybe AnomalyDetectionComputationModelConfigurationProperty
()
haddock_workaround_ :: ComputationModelConfigurationProperty -> ()
anomalyDetection :: ComputationModelConfigurationProperty
-> Maybe AnomalyDetectionComputationModelConfigurationProperty
haddock_workaround_ :: ()
anomalyDetection :: Maybe AnomalyDetectionComputationModelConfigurationProperty
..}
    = [(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
-> AnomalyDetectionComputationModelConfigurationProperty
-> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AnomalyDetection" (AnomalyDetectionComputationModelConfigurationProperty
 -> (Key, Value))
-> Maybe AnomalyDetectionComputationModelConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AnomalyDetectionComputationModelConfigurationProperty
anomalyDetection]))
instance Property "AnomalyDetection" ComputationModelConfigurationProperty where
  type PropertyType "AnomalyDetection" ComputationModelConfigurationProperty = AnomalyDetectionComputationModelConfigurationProperty
  set :: PropertyType
  "AnomalyDetection" ComputationModelConfigurationProperty
-> ComputationModelConfigurationProperty
-> ComputationModelConfigurationProperty
set PropertyType
  "AnomalyDetection" ComputationModelConfigurationProperty
newValue ComputationModelConfigurationProperty {Maybe AnomalyDetectionComputationModelConfigurationProperty
()
haddock_workaround_ :: ComputationModelConfigurationProperty -> ()
anomalyDetection :: ComputationModelConfigurationProperty
-> Maybe AnomalyDetectionComputationModelConfigurationProperty
haddock_workaround_ :: ()
anomalyDetection :: Maybe AnomalyDetectionComputationModelConfigurationProperty
..}
    = ComputationModelConfigurationProperty
        {anomalyDetection :: Maybe AnomalyDetectionComputationModelConfigurationProperty
anomalyDetection = AnomalyDetectionComputationModelConfigurationProperty
-> Maybe AnomalyDetectionComputationModelConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "AnomalyDetection" ComputationModelConfigurationProperty
AnomalyDetectionComputationModelConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}