{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoTEvents.Types.DetectorModelConfiguration
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoTEvents.Types.DetectorModelConfiguration where

import qualified Amazonka.Core as Core
import Amazonka.IoTEvents.Types.DetectorModelVersionStatus
import Amazonka.IoTEvents.Types.EvaluationMethod
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about how the detector model is configured.
--
-- /See:/ 'newDetectorModelConfiguration' smart constructor.
data DetectorModelConfiguration = DetectorModelConfiguration'
  { -- | The time the detector model was created.
    DetectorModelConfiguration -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The status of the detector model.
    DetectorModelConfiguration -> Maybe DetectorModelVersionStatus
status :: Prelude.Maybe DetectorModelVersionStatus,
    -- | The name of the detector model.
    DetectorModelConfiguration -> Maybe Text
detectorModelName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the detector model.
    DetectorModelConfiguration -> Maybe Text
detectorModelArn :: Prelude.Maybe Prelude.Text,
    -- | A brief description of the detector model.
    DetectorModelConfiguration -> Maybe Text
detectorModelDescription :: Prelude.Maybe Prelude.Text,
    -- | The value used to identify a detector instance. When a device or system
    -- sends input, a new detector instance with a unique key value is created.
    -- AWS IoT Events can continue to route input to its corresponding detector
    -- instance based on this identifying information.
    --
    -- This parameter uses a JSON-path expression to select the attribute-value
    -- pair in the message payload that is used for identification. To route
    -- the message to the correct detector instance, the device must send a
    -- message payload that contains the same attribute-value.
    DetectorModelConfiguration -> Maybe Text
key :: Prelude.Maybe Prelude.Text,
    -- | The version of the detector model.
    DetectorModelConfiguration -> Maybe Text
detectorModelVersion :: Prelude.Maybe Prelude.Text,
    -- | The time the detector model was last updated.
    DetectorModelConfiguration -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Core.POSIX,
    -- | Information about the order in which events are evaluated and how
    -- actions are executed.
    DetectorModelConfiguration -> Maybe EvaluationMethod
evaluationMethod :: Prelude.Maybe EvaluationMethod,
    -- | The ARN of the role that grants permission to AWS IoT Events to perform
    -- its operations.
    DetectorModelConfiguration -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text
  }
  deriving (DetectorModelConfiguration -> DetectorModelConfiguration -> Bool
(DetectorModelConfiguration -> DetectorModelConfiguration -> Bool)
-> (DetectorModelConfiguration
    -> DetectorModelConfiguration -> Bool)
-> Eq DetectorModelConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectorModelConfiguration -> DetectorModelConfiguration -> Bool
$c/= :: DetectorModelConfiguration -> DetectorModelConfiguration -> Bool
== :: DetectorModelConfiguration -> DetectorModelConfiguration -> Bool
$c== :: DetectorModelConfiguration -> DetectorModelConfiguration -> Bool
Prelude.Eq, ReadPrec [DetectorModelConfiguration]
ReadPrec DetectorModelConfiguration
Int -> ReadS DetectorModelConfiguration
ReadS [DetectorModelConfiguration]
(Int -> ReadS DetectorModelConfiguration)
-> ReadS [DetectorModelConfiguration]
-> ReadPrec DetectorModelConfiguration
-> ReadPrec [DetectorModelConfiguration]
-> Read DetectorModelConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectorModelConfiguration]
$creadListPrec :: ReadPrec [DetectorModelConfiguration]
readPrec :: ReadPrec DetectorModelConfiguration
$creadPrec :: ReadPrec DetectorModelConfiguration
readList :: ReadS [DetectorModelConfiguration]
$creadList :: ReadS [DetectorModelConfiguration]
readsPrec :: Int -> ReadS DetectorModelConfiguration
$creadsPrec :: Int -> ReadS DetectorModelConfiguration
Prelude.Read, Int -> DetectorModelConfiguration -> ShowS
[DetectorModelConfiguration] -> ShowS
DetectorModelConfiguration -> String
(Int -> DetectorModelConfiguration -> ShowS)
-> (DetectorModelConfiguration -> String)
-> ([DetectorModelConfiguration] -> ShowS)
-> Show DetectorModelConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectorModelConfiguration] -> ShowS
$cshowList :: [DetectorModelConfiguration] -> ShowS
show :: DetectorModelConfiguration -> String
$cshow :: DetectorModelConfiguration -> String
showsPrec :: Int -> DetectorModelConfiguration -> ShowS
$cshowsPrec :: Int -> DetectorModelConfiguration -> ShowS
Prelude.Show, (forall x.
 DetectorModelConfiguration -> Rep DetectorModelConfiguration x)
-> (forall x.
    Rep DetectorModelConfiguration x -> DetectorModelConfiguration)
-> Generic DetectorModelConfiguration
forall x.
Rep DetectorModelConfiguration x -> DetectorModelConfiguration
forall x.
DetectorModelConfiguration -> Rep DetectorModelConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetectorModelConfiguration x -> DetectorModelConfiguration
$cfrom :: forall x.
DetectorModelConfiguration -> Rep DetectorModelConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'DetectorModelConfiguration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'creationTime', 'detectorModelConfiguration_creationTime' - The time the detector model was created.
--
-- 'status', 'detectorModelConfiguration_status' - The status of the detector model.
--
-- 'detectorModelName', 'detectorModelConfiguration_detectorModelName' - The name of the detector model.
--
-- 'detectorModelArn', 'detectorModelConfiguration_detectorModelArn' - The ARN of the detector model.
--
-- 'detectorModelDescription', 'detectorModelConfiguration_detectorModelDescription' - A brief description of the detector model.
--
-- 'key', 'detectorModelConfiguration_key' - The value used to identify a detector instance. When a device or system
-- sends input, a new detector instance with a unique key value is created.
-- AWS IoT Events can continue to route input to its corresponding detector
-- instance based on this identifying information.
--
-- This parameter uses a JSON-path expression to select the attribute-value
-- pair in the message payload that is used for identification. To route
-- the message to the correct detector instance, the device must send a
-- message payload that contains the same attribute-value.
--
-- 'detectorModelVersion', 'detectorModelConfiguration_detectorModelVersion' - The version of the detector model.
--
-- 'lastUpdateTime', 'detectorModelConfiguration_lastUpdateTime' - The time the detector model was last updated.
--
-- 'evaluationMethod', 'detectorModelConfiguration_evaluationMethod' - Information about the order in which events are evaluated and how
-- actions are executed.
--
-- 'roleArn', 'detectorModelConfiguration_roleArn' - The ARN of the role that grants permission to AWS IoT Events to perform
-- its operations.
newDetectorModelConfiguration ::
  DetectorModelConfiguration
newDetectorModelConfiguration :: DetectorModelConfiguration
newDetectorModelConfiguration =
  DetectorModelConfiguration' :: Maybe POSIX
-> Maybe DetectorModelVersionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe EvaluationMethod
-> Maybe Text
-> DetectorModelConfiguration
DetectorModelConfiguration'
    { $sel:creationTime:DetectorModelConfiguration' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DetectorModelConfiguration' :: Maybe DetectorModelVersionStatus
status = Maybe DetectorModelVersionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorModelName:DetectorModelConfiguration' :: Maybe Text
detectorModelName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorModelArn:DetectorModelConfiguration' :: Maybe Text
detectorModelArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorModelDescription:DetectorModelConfiguration' :: Maybe Text
detectorModelDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:key:DetectorModelConfiguration' :: Maybe Text
key = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorModelVersion:DetectorModelConfiguration' :: Maybe Text
detectorModelVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdateTime:DetectorModelConfiguration' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationMethod:DetectorModelConfiguration' :: Maybe EvaluationMethod
evaluationMethod = Maybe EvaluationMethod
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:DetectorModelConfiguration' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The time the detector model was created.
detectorModelConfiguration_creationTime :: Lens.Lens' DetectorModelConfiguration (Prelude.Maybe Prelude.UTCTime)
detectorModelConfiguration_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DetectorModelConfiguration -> f DetectorModelConfiguration
detectorModelConfiguration_creationTime = (DetectorModelConfiguration -> Maybe POSIX)
-> (DetectorModelConfiguration
    -> Maybe POSIX -> DetectorModelConfiguration)
-> Lens
     DetectorModelConfiguration
     DetectorModelConfiguration
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelConfiguration' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DetectorModelConfiguration' :: DetectorModelConfiguration -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DetectorModelConfiguration
s@DetectorModelConfiguration' {} Maybe POSIX
a -> DetectorModelConfiguration
s {$sel:creationTime:DetectorModelConfiguration' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DetectorModelConfiguration) ((Maybe POSIX -> f (Maybe POSIX))
 -> DetectorModelConfiguration -> f DetectorModelConfiguration)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DetectorModelConfiguration
-> f DetectorModelConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The status of the detector model.
detectorModelConfiguration_status :: Lens.Lens' DetectorModelConfiguration (Prelude.Maybe DetectorModelVersionStatus)
detectorModelConfiguration_status :: (Maybe DetectorModelVersionStatus
 -> f (Maybe DetectorModelVersionStatus))
-> DetectorModelConfiguration -> f DetectorModelConfiguration
detectorModelConfiguration_status = (DetectorModelConfiguration -> Maybe DetectorModelVersionStatus)
-> (DetectorModelConfiguration
    -> Maybe DetectorModelVersionStatus -> DetectorModelConfiguration)
-> Lens
     DetectorModelConfiguration
     DetectorModelConfiguration
     (Maybe DetectorModelVersionStatus)
     (Maybe DetectorModelVersionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelConfiguration' {Maybe DetectorModelVersionStatus
status :: Maybe DetectorModelVersionStatus
$sel:status:DetectorModelConfiguration' :: DetectorModelConfiguration -> Maybe DetectorModelVersionStatus
status} -> Maybe DetectorModelVersionStatus
status) (\s :: DetectorModelConfiguration
s@DetectorModelConfiguration' {} Maybe DetectorModelVersionStatus
a -> DetectorModelConfiguration
s {$sel:status:DetectorModelConfiguration' :: Maybe DetectorModelVersionStatus
status = Maybe DetectorModelVersionStatus
a} :: DetectorModelConfiguration)

-- | The name of the detector model.
detectorModelConfiguration_detectorModelName :: Lens.Lens' DetectorModelConfiguration (Prelude.Maybe Prelude.Text)
detectorModelConfiguration_detectorModelName :: (Maybe Text -> f (Maybe Text))
-> DetectorModelConfiguration -> f DetectorModelConfiguration
detectorModelConfiguration_detectorModelName = (DetectorModelConfiguration -> Maybe Text)
-> (DetectorModelConfiguration
    -> Maybe Text -> DetectorModelConfiguration)
-> Lens
     DetectorModelConfiguration
     DetectorModelConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelConfiguration' {Maybe Text
detectorModelName :: Maybe Text
$sel:detectorModelName:DetectorModelConfiguration' :: DetectorModelConfiguration -> Maybe Text
detectorModelName} -> Maybe Text
detectorModelName) (\s :: DetectorModelConfiguration
s@DetectorModelConfiguration' {} Maybe Text
a -> DetectorModelConfiguration
s {$sel:detectorModelName:DetectorModelConfiguration' :: Maybe Text
detectorModelName = Maybe Text
a} :: DetectorModelConfiguration)

-- | The ARN of the detector model.
detectorModelConfiguration_detectorModelArn :: Lens.Lens' DetectorModelConfiguration (Prelude.Maybe Prelude.Text)
detectorModelConfiguration_detectorModelArn :: (Maybe Text -> f (Maybe Text))
-> DetectorModelConfiguration -> f DetectorModelConfiguration
detectorModelConfiguration_detectorModelArn = (DetectorModelConfiguration -> Maybe Text)
-> (DetectorModelConfiguration
    -> Maybe Text -> DetectorModelConfiguration)
-> Lens
     DetectorModelConfiguration
     DetectorModelConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelConfiguration' {Maybe Text
detectorModelArn :: Maybe Text
$sel:detectorModelArn:DetectorModelConfiguration' :: DetectorModelConfiguration -> Maybe Text
detectorModelArn} -> Maybe Text
detectorModelArn) (\s :: DetectorModelConfiguration
s@DetectorModelConfiguration' {} Maybe Text
a -> DetectorModelConfiguration
s {$sel:detectorModelArn:DetectorModelConfiguration' :: Maybe Text
detectorModelArn = Maybe Text
a} :: DetectorModelConfiguration)

-- | A brief description of the detector model.
detectorModelConfiguration_detectorModelDescription :: Lens.Lens' DetectorModelConfiguration (Prelude.Maybe Prelude.Text)
detectorModelConfiguration_detectorModelDescription :: (Maybe Text -> f (Maybe Text))
-> DetectorModelConfiguration -> f DetectorModelConfiguration
detectorModelConfiguration_detectorModelDescription = (DetectorModelConfiguration -> Maybe Text)
-> (DetectorModelConfiguration
    -> Maybe Text -> DetectorModelConfiguration)
-> Lens
     DetectorModelConfiguration
     DetectorModelConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelConfiguration' {Maybe Text
detectorModelDescription :: Maybe Text
$sel:detectorModelDescription:DetectorModelConfiguration' :: DetectorModelConfiguration -> Maybe Text
detectorModelDescription} -> Maybe Text
detectorModelDescription) (\s :: DetectorModelConfiguration
s@DetectorModelConfiguration' {} Maybe Text
a -> DetectorModelConfiguration
s {$sel:detectorModelDescription:DetectorModelConfiguration' :: Maybe Text
detectorModelDescription = Maybe Text
a} :: DetectorModelConfiguration)

-- | The value used to identify a detector instance. When a device or system
-- sends input, a new detector instance with a unique key value is created.
-- AWS IoT Events can continue to route input to its corresponding detector
-- instance based on this identifying information.
--
-- This parameter uses a JSON-path expression to select the attribute-value
-- pair in the message payload that is used for identification. To route
-- the message to the correct detector instance, the device must send a
-- message payload that contains the same attribute-value.
detectorModelConfiguration_key :: Lens.Lens' DetectorModelConfiguration (Prelude.Maybe Prelude.Text)
detectorModelConfiguration_key :: (Maybe Text -> f (Maybe Text))
-> DetectorModelConfiguration -> f DetectorModelConfiguration
detectorModelConfiguration_key = (DetectorModelConfiguration -> Maybe Text)
-> (DetectorModelConfiguration
    -> Maybe Text -> DetectorModelConfiguration)
-> Lens
     DetectorModelConfiguration
     DetectorModelConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelConfiguration' {Maybe Text
key :: Maybe Text
$sel:key:DetectorModelConfiguration' :: DetectorModelConfiguration -> Maybe Text
key} -> Maybe Text
key) (\s :: DetectorModelConfiguration
s@DetectorModelConfiguration' {} Maybe Text
a -> DetectorModelConfiguration
s {$sel:key:DetectorModelConfiguration' :: Maybe Text
key = Maybe Text
a} :: DetectorModelConfiguration)

-- | The version of the detector model.
detectorModelConfiguration_detectorModelVersion :: Lens.Lens' DetectorModelConfiguration (Prelude.Maybe Prelude.Text)
detectorModelConfiguration_detectorModelVersion :: (Maybe Text -> f (Maybe Text))
-> DetectorModelConfiguration -> f DetectorModelConfiguration
detectorModelConfiguration_detectorModelVersion = (DetectorModelConfiguration -> Maybe Text)
-> (DetectorModelConfiguration
    -> Maybe Text -> DetectorModelConfiguration)
-> Lens
     DetectorModelConfiguration
     DetectorModelConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelConfiguration' {Maybe Text
detectorModelVersion :: Maybe Text
$sel:detectorModelVersion:DetectorModelConfiguration' :: DetectorModelConfiguration -> Maybe Text
detectorModelVersion} -> Maybe Text
detectorModelVersion) (\s :: DetectorModelConfiguration
s@DetectorModelConfiguration' {} Maybe Text
a -> DetectorModelConfiguration
s {$sel:detectorModelVersion:DetectorModelConfiguration' :: Maybe Text
detectorModelVersion = Maybe Text
a} :: DetectorModelConfiguration)

-- | The time the detector model was last updated.
detectorModelConfiguration_lastUpdateTime :: Lens.Lens' DetectorModelConfiguration (Prelude.Maybe Prelude.UTCTime)
detectorModelConfiguration_lastUpdateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DetectorModelConfiguration -> f DetectorModelConfiguration
detectorModelConfiguration_lastUpdateTime = (DetectorModelConfiguration -> Maybe POSIX)
-> (DetectorModelConfiguration
    -> Maybe POSIX -> DetectorModelConfiguration)
-> Lens
     DetectorModelConfiguration
     DetectorModelConfiguration
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelConfiguration' {Maybe POSIX
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:DetectorModelConfiguration' :: DetectorModelConfiguration -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: DetectorModelConfiguration
s@DetectorModelConfiguration' {} Maybe POSIX
a -> DetectorModelConfiguration
s {$sel:lastUpdateTime:DetectorModelConfiguration' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
a} :: DetectorModelConfiguration) ((Maybe POSIX -> f (Maybe POSIX))
 -> DetectorModelConfiguration -> f DetectorModelConfiguration)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DetectorModelConfiguration
-> f DetectorModelConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Information about the order in which events are evaluated and how
-- actions are executed.
detectorModelConfiguration_evaluationMethod :: Lens.Lens' DetectorModelConfiguration (Prelude.Maybe EvaluationMethod)
detectorModelConfiguration_evaluationMethod :: (Maybe EvaluationMethod -> f (Maybe EvaluationMethod))
-> DetectorModelConfiguration -> f DetectorModelConfiguration
detectorModelConfiguration_evaluationMethod = (DetectorModelConfiguration -> Maybe EvaluationMethod)
-> (DetectorModelConfiguration
    -> Maybe EvaluationMethod -> DetectorModelConfiguration)
-> Lens
     DetectorModelConfiguration
     DetectorModelConfiguration
     (Maybe EvaluationMethod)
     (Maybe EvaluationMethod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelConfiguration' {Maybe EvaluationMethod
evaluationMethod :: Maybe EvaluationMethod
$sel:evaluationMethod:DetectorModelConfiguration' :: DetectorModelConfiguration -> Maybe EvaluationMethod
evaluationMethod} -> Maybe EvaluationMethod
evaluationMethod) (\s :: DetectorModelConfiguration
s@DetectorModelConfiguration' {} Maybe EvaluationMethod
a -> DetectorModelConfiguration
s {$sel:evaluationMethod:DetectorModelConfiguration' :: Maybe EvaluationMethod
evaluationMethod = Maybe EvaluationMethod
a} :: DetectorModelConfiguration)

-- | The ARN of the role that grants permission to AWS IoT Events to perform
-- its operations.
detectorModelConfiguration_roleArn :: Lens.Lens' DetectorModelConfiguration (Prelude.Maybe Prelude.Text)
detectorModelConfiguration_roleArn :: (Maybe Text -> f (Maybe Text))
-> DetectorModelConfiguration -> f DetectorModelConfiguration
detectorModelConfiguration_roleArn = (DetectorModelConfiguration -> Maybe Text)
-> (DetectorModelConfiguration
    -> Maybe Text -> DetectorModelConfiguration)
-> Lens
     DetectorModelConfiguration
     DetectorModelConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelConfiguration' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:DetectorModelConfiguration' :: DetectorModelConfiguration -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: DetectorModelConfiguration
s@DetectorModelConfiguration' {} Maybe Text
a -> DetectorModelConfiguration
s {$sel:roleArn:DetectorModelConfiguration' :: Maybe Text
roleArn = Maybe Text
a} :: DetectorModelConfiguration)

instance Core.FromJSON DetectorModelConfiguration where
  parseJSON :: Value -> Parser DetectorModelConfiguration
parseJSON =
    String
-> (Object -> Parser DetectorModelConfiguration)
-> Value
-> Parser DetectorModelConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DetectorModelConfiguration"
      ( \Object
x ->
          Maybe POSIX
-> Maybe DetectorModelVersionStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe EvaluationMethod
-> Maybe Text
-> DetectorModelConfiguration
DetectorModelConfiguration'
            (Maybe POSIX
 -> Maybe DetectorModelVersionStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe EvaluationMethod
 -> Maybe Text
 -> DetectorModelConfiguration)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe DetectorModelVersionStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe EvaluationMethod
      -> Maybe Text
      -> DetectorModelConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationTime")
            Parser
  (Maybe DetectorModelVersionStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe EvaluationMethod
   -> Maybe Text
   -> DetectorModelConfiguration)
-> Parser (Maybe DetectorModelVersionStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe EvaluationMethod
      -> Maybe Text
      -> DetectorModelConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DetectorModelVersionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe EvaluationMethod
   -> Maybe Text
   -> DetectorModelConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe EvaluationMethod
      -> Maybe Text
      -> DetectorModelConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"detectorModelName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe EvaluationMethod
   -> Maybe Text
   -> DetectorModelConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe EvaluationMethod
      -> Maybe Text
      -> DetectorModelConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"detectorModelArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe EvaluationMethod
   -> Maybe Text
   -> DetectorModelConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe EvaluationMethod
      -> Maybe Text
      -> DetectorModelConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"detectorModelDescription")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe EvaluationMethod
   -> Maybe Text
   -> DetectorModelConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe EvaluationMethod
      -> Maybe Text
      -> DetectorModelConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"key")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe EvaluationMethod
   -> Maybe Text
   -> DetectorModelConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe EvaluationMethod
      -> Maybe Text
      -> DetectorModelConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"detectorModelVersion")
            Parser
  (Maybe POSIX
   -> Maybe EvaluationMethod
   -> Maybe Text
   -> DetectorModelConfiguration)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe EvaluationMethod
      -> Maybe Text -> DetectorModelConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdateTime")
            Parser
  (Maybe EvaluationMethod
   -> Maybe Text -> DetectorModelConfiguration)
-> Parser (Maybe EvaluationMethod)
-> Parser (Maybe Text -> DetectorModelConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EvaluationMethod)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"evaluationMethod")
            Parser (Maybe Text -> DetectorModelConfiguration)
-> Parser (Maybe Text) -> Parser DetectorModelConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"roleArn")
      )

instance Prelude.Hashable DetectorModelConfiguration

instance Prelude.NFData DetectorModelConfiguration