module Stratosphere.LookoutMetrics.AnomalyDetector (
module Exports, AnomalyDetector(..), mkAnomalyDetector
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.LookoutMetrics.AnomalyDetector.AnomalyDetectorConfigProperty as Exports
import {-# SOURCE #-} Stratosphere.LookoutMetrics.AnomalyDetector.MetricSetProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AnomalyDetector
=
AnomalyDetector {AnomalyDetector -> ()
haddock_workaround_ :: (),
AnomalyDetector -> AnomalyDetectorConfigProperty
anomalyDetectorConfig :: AnomalyDetectorConfigProperty,
AnomalyDetector -> Maybe (Value Text)
anomalyDetectorDescription :: (Prelude.Maybe (Value Prelude.Text)),
AnomalyDetector -> Maybe (Value Text)
anomalyDetectorName :: (Prelude.Maybe (Value Prelude.Text)),
AnomalyDetector -> Maybe (Value Text)
kmsKeyArn :: (Prelude.Maybe (Value Prelude.Text)),
AnomalyDetector -> [MetricSetProperty]
metricSetList :: [MetricSetProperty]}
deriving stock (AnomalyDetector -> AnomalyDetector -> Bool
(AnomalyDetector -> AnomalyDetector -> Bool)
-> (AnomalyDetector -> AnomalyDetector -> Bool)
-> Eq AnomalyDetector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnomalyDetector -> AnomalyDetector -> Bool
== :: AnomalyDetector -> AnomalyDetector -> Bool
$c/= :: AnomalyDetector -> AnomalyDetector -> Bool
/= :: AnomalyDetector -> AnomalyDetector -> Bool
Prelude.Eq, Int -> AnomalyDetector -> ShowS
[AnomalyDetector] -> ShowS
AnomalyDetector -> String
(Int -> AnomalyDetector -> ShowS)
-> (AnomalyDetector -> String)
-> ([AnomalyDetector] -> ShowS)
-> Show AnomalyDetector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AnomalyDetector -> ShowS
showsPrec :: Int -> AnomalyDetector -> ShowS
$cshow :: AnomalyDetector -> String
show :: AnomalyDetector -> String
$cshowList :: [AnomalyDetector] -> ShowS
showList :: [AnomalyDetector] -> ShowS
Prelude.Show)
mkAnomalyDetector ::
AnomalyDetectorConfigProperty
-> [MetricSetProperty] -> AnomalyDetector
mkAnomalyDetector :: AnomalyDetectorConfigProperty
-> [MetricSetProperty] -> AnomalyDetector
mkAnomalyDetector AnomalyDetectorConfigProperty
anomalyDetectorConfig [MetricSetProperty]
metricSetList
= AnomalyDetector
{haddock_workaround_ :: ()
haddock_workaround_ = (),
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorConfig = AnomalyDetectorConfigProperty
anomalyDetectorConfig,
metricSetList :: [MetricSetProperty]
metricSetList = [MetricSetProperty]
metricSetList,
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorDescription = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
anomalyDetectorName :: Maybe (Value Text)
anomalyDetectorName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AnomalyDetector where
toResourceProperties :: AnomalyDetector -> ResourceProperties
toResourceProperties AnomalyDetector {[MetricSetProperty]
Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: AnomalyDetector -> ()
anomalyDetectorConfig :: AnomalyDetector -> AnomalyDetectorConfigProperty
anomalyDetectorDescription :: AnomalyDetector -> Maybe (Value Text)
anomalyDetectorName :: AnomalyDetector -> Maybe (Value Text)
kmsKeyArn :: AnomalyDetector -> Maybe (Value Text)
metricSetList :: AnomalyDetector -> [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::LookoutMetrics::AnomalyDetector",
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
"AnomalyDetectorConfig" Key -> AnomalyDetectorConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= AnomalyDetectorConfigProperty
anomalyDetectorConfig,
Key
"MetricSetList" Key -> [MetricSetProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [MetricSetProperty]
metricSetList]
([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
"AnomalyDetectorDescription"
(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)
anomalyDetectorDescription,
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
"AnomalyDetectorName" (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)
anomalyDetectorName,
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
"KmsKeyArn" (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)
kmsKeyArn]))}
instance JSON.ToJSON AnomalyDetector where
toJSON :: AnomalyDetector -> Value
toJSON AnomalyDetector {[MetricSetProperty]
Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: AnomalyDetector -> ()
anomalyDetectorConfig :: AnomalyDetector -> AnomalyDetectorConfigProperty
anomalyDetectorDescription :: AnomalyDetector -> Maybe (Value Text)
anomalyDetectorName :: AnomalyDetector -> Maybe (Value Text)
kmsKeyArn :: AnomalyDetector -> Maybe (Value Text)
metricSetList :: AnomalyDetector -> [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
= [(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
"AnomalyDetectorConfig" Key -> AnomalyDetectorConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= AnomalyDetectorConfigProperty
anomalyDetectorConfig,
Key
"MetricSetList" Key -> [MetricSetProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [MetricSetProperty]
metricSetList]
([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
"AnomalyDetectorDescription"
(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)
anomalyDetectorDescription,
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
"AnomalyDetectorName" (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)
anomalyDetectorName,
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
"KmsKeyArn" (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)
kmsKeyArn])))
instance Property "AnomalyDetectorConfig" AnomalyDetector where
type PropertyType "AnomalyDetectorConfig" AnomalyDetector = AnomalyDetectorConfigProperty
set :: PropertyType "AnomalyDetectorConfig" AnomalyDetector
-> AnomalyDetector -> AnomalyDetector
set PropertyType "AnomalyDetectorConfig" AnomalyDetector
newValue AnomalyDetector {[MetricSetProperty]
Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: AnomalyDetector -> ()
anomalyDetectorConfig :: AnomalyDetector -> AnomalyDetectorConfigProperty
anomalyDetectorDescription :: AnomalyDetector -> Maybe (Value Text)
anomalyDetectorName :: AnomalyDetector -> Maybe (Value Text)
kmsKeyArn :: AnomalyDetector -> Maybe (Value Text)
metricSetList :: AnomalyDetector -> [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
= AnomalyDetector {anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorConfig = PropertyType "AnomalyDetectorConfig" AnomalyDetector
AnomalyDetectorConfigProperty
newValue, [MetricSetProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
instance Property "AnomalyDetectorDescription" AnomalyDetector where
type PropertyType "AnomalyDetectorDescription" AnomalyDetector = Value Prelude.Text
set :: PropertyType "AnomalyDetectorDescription" AnomalyDetector
-> AnomalyDetector -> AnomalyDetector
set PropertyType "AnomalyDetectorDescription" AnomalyDetector
newValue AnomalyDetector {[MetricSetProperty]
Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: AnomalyDetector -> ()
anomalyDetectorConfig :: AnomalyDetector -> AnomalyDetectorConfigProperty
anomalyDetectorDescription :: AnomalyDetector -> Maybe (Value Text)
anomalyDetectorName :: AnomalyDetector -> Maybe (Value Text)
kmsKeyArn :: AnomalyDetector -> Maybe (Value Text)
metricSetList :: AnomalyDetector -> [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
= AnomalyDetector
{anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorDescription = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AnomalyDetectorDescription" AnomalyDetector
Value Text
newValue, [MetricSetProperty]
Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
instance Property "AnomalyDetectorName" AnomalyDetector where
type PropertyType "AnomalyDetectorName" AnomalyDetector = Value Prelude.Text
set :: PropertyType "AnomalyDetectorName" AnomalyDetector
-> AnomalyDetector -> AnomalyDetector
set PropertyType "AnomalyDetectorName" AnomalyDetector
newValue AnomalyDetector {[MetricSetProperty]
Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: AnomalyDetector -> ()
anomalyDetectorConfig :: AnomalyDetector -> AnomalyDetectorConfigProperty
anomalyDetectorDescription :: AnomalyDetector -> Maybe (Value Text)
anomalyDetectorName :: AnomalyDetector -> Maybe (Value Text)
kmsKeyArn :: AnomalyDetector -> Maybe (Value Text)
metricSetList :: AnomalyDetector -> [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
= AnomalyDetector {anomalyDetectorName :: Maybe (Value Text)
anomalyDetectorName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AnomalyDetectorName" AnomalyDetector
Value Text
newValue, [MetricSetProperty]
Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
instance Property "KmsKeyArn" AnomalyDetector where
type PropertyType "KmsKeyArn" AnomalyDetector = Value Prelude.Text
set :: PropertyType "KmsKeyArn" AnomalyDetector
-> AnomalyDetector -> AnomalyDetector
set PropertyType "KmsKeyArn" AnomalyDetector
newValue AnomalyDetector {[MetricSetProperty]
Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: AnomalyDetector -> ()
anomalyDetectorConfig :: AnomalyDetector -> AnomalyDetectorConfigProperty
anomalyDetectorDescription :: AnomalyDetector -> Maybe (Value Text)
anomalyDetectorName :: AnomalyDetector -> Maybe (Value Text)
kmsKeyArn :: AnomalyDetector -> Maybe (Value Text)
metricSetList :: AnomalyDetector -> [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
= AnomalyDetector {kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsKeyArn" AnomalyDetector
Value Text
newValue, [MetricSetProperty]
Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
instance Property "MetricSetList" AnomalyDetector where
type PropertyType "MetricSetList" AnomalyDetector = [MetricSetProperty]
set :: PropertyType "MetricSetList" AnomalyDetector
-> AnomalyDetector -> AnomalyDetector
set PropertyType "MetricSetList" AnomalyDetector
newValue AnomalyDetector {[MetricSetProperty]
Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: AnomalyDetector -> ()
anomalyDetectorConfig :: AnomalyDetector -> AnomalyDetectorConfigProperty
anomalyDetectorDescription :: AnomalyDetector -> Maybe (Value Text)
anomalyDetectorName :: AnomalyDetector -> Maybe (Value Text)
kmsKeyArn :: AnomalyDetector -> Maybe (Value Text)
metricSetList :: AnomalyDetector -> [MetricSetProperty]
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
metricSetList :: [MetricSetProperty]
..}
= AnomalyDetector {metricSetList :: [MetricSetProperty]
metricSetList = [MetricSetProperty]
PropertyType "MetricSetList" AnomalyDetector
newValue, Maybe (Value Text)
()
AnomalyDetectorConfigProperty
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
haddock_workaround_ :: ()
anomalyDetectorConfig :: AnomalyDetectorConfigProperty
anomalyDetectorDescription :: Maybe (Value Text)
anomalyDetectorName :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
..}