{-# 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 #-}
module Amazonka.IoTEvents.Types.DetectorModelSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DetectorModelSummary = DetectorModelSummary'
{
DetectorModelSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
DetectorModelSummary -> Maybe Text
detectorModelName :: Prelude.Maybe Prelude.Text,
DetectorModelSummary -> Maybe Text
detectorModelDescription :: Prelude.Maybe Prelude.Text
}
deriving (DetectorModelSummary -> DetectorModelSummary -> Bool
(DetectorModelSummary -> DetectorModelSummary -> Bool)
-> (DetectorModelSummary -> DetectorModelSummary -> Bool)
-> Eq DetectorModelSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectorModelSummary -> DetectorModelSummary -> Bool
$c/= :: DetectorModelSummary -> DetectorModelSummary -> Bool
== :: DetectorModelSummary -> DetectorModelSummary -> Bool
$c== :: DetectorModelSummary -> DetectorModelSummary -> Bool
Prelude.Eq, ReadPrec [DetectorModelSummary]
ReadPrec DetectorModelSummary
Int -> ReadS DetectorModelSummary
ReadS [DetectorModelSummary]
(Int -> ReadS DetectorModelSummary)
-> ReadS [DetectorModelSummary]
-> ReadPrec DetectorModelSummary
-> ReadPrec [DetectorModelSummary]
-> Read DetectorModelSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectorModelSummary]
$creadListPrec :: ReadPrec [DetectorModelSummary]
readPrec :: ReadPrec DetectorModelSummary
$creadPrec :: ReadPrec DetectorModelSummary
readList :: ReadS [DetectorModelSummary]
$creadList :: ReadS [DetectorModelSummary]
readsPrec :: Int -> ReadS DetectorModelSummary
$creadsPrec :: Int -> ReadS DetectorModelSummary
Prelude.Read, Int -> DetectorModelSummary -> ShowS
[DetectorModelSummary] -> ShowS
DetectorModelSummary -> String
(Int -> DetectorModelSummary -> ShowS)
-> (DetectorModelSummary -> String)
-> ([DetectorModelSummary] -> ShowS)
-> Show DetectorModelSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectorModelSummary] -> ShowS
$cshowList :: [DetectorModelSummary] -> ShowS
show :: DetectorModelSummary -> String
$cshow :: DetectorModelSummary -> String
showsPrec :: Int -> DetectorModelSummary -> ShowS
$cshowsPrec :: Int -> DetectorModelSummary -> ShowS
Prelude.Show, (forall x. DetectorModelSummary -> Rep DetectorModelSummary x)
-> (forall x. Rep DetectorModelSummary x -> DetectorModelSummary)
-> Generic DetectorModelSummary
forall x. Rep DetectorModelSummary x -> DetectorModelSummary
forall x. DetectorModelSummary -> Rep DetectorModelSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DetectorModelSummary x -> DetectorModelSummary
$cfrom :: forall x. DetectorModelSummary -> Rep DetectorModelSummary x
Prelude.Generic)
newDetectorModelSummary ::
DetectorModelSummary
newDetectorModelSummary :: DetectorModelSummary
newDetectorModelSummary =
DetectorModelSummary' :: Maybe POSIX -> Maybe Text -> Maybe Text -> DetectorModelSummary
DetectorModelSummary'
{ $sel:creationTime:DetectorModelSummary' :: Maybe POSIX
creationTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:detectorModelName:DetectorModelSummary' :: Maybe Text
detectorModelName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:detectorModelDescription:DetectorModelSummary' :: Maybe Text
detectorModelDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
detectorModelSummary_creationTime :: Lens.Lens' DetectorModelSummary (Prelude.Maybe Prelude.UTCTime)
detectorModelSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DetectorModelSummary -> f DetectorModelSummary
detectorModelSummary_creationTime = (DetectorModelSummary -> Maybe POSIX)
-> (DetectorModelSummary -> Maybe POSIX -> DetectorModelSummary)
-> Lens
DetectorModelSummary
DetectorModelSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DetectorModelSummary' :: DetectorModelSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DetectorModelSummary
s@DetectorModelSummary' {} Maybe POSIX
a -> DetectorModelSummary
s {$sel:creationTime:DetectorModelSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DetectorModelSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DetectorModelSummary -> f DetectorModelSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DetectorModelSummary
-> f DetectorModelSummary
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
detectorModelSummary_detectorModelName :: Lens.Lens' DetectorModelSummary (Prelude.Maybe Prelude.Text)
detectorModelSummary_detectorModelName :: (Maybe Text -> f (Maybe Text))
-> DetectorModelSummary -> f DetectorModelSummary
detectorModelSummary_detectorModelName = (DetectorModelSummary -> Maybe Text)
-> (DetectorModelSummary -> Maybe Text -> DetectorModelSummary)
-> Lens
DetectorModelSummary DetectorModelSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelSummary' {Maybe Text
detectorModelName :: Maybe Text
$sel:detectorModelName:DetectorModelSummary' :: DetectorModelSummary -> Maybe Text
detectorModelName} -> Maybe Text
detectorModelName) (\s :: DetectorModelSummary
s@DetectorModelSummary' {} Maybe Text
a -> DetectorModelSummary
s {$sel:detectorModelName:DetectorModelSummary' :: Maybe Text
detectorModelName = Maybe Text
a} :: DetectorModelSummary)
detectorModelSummary_detectorModelDescription :: Lens.Lens' DetectorModelSummary (Prelude.Maybe Prelude.Text)
detectorModelSummary_detectorModelDescription :: (Maybe Text -> f (Maybe Text))
-> DetectorModelSummary -> f DetectorModelSummary
detectorModelSummary_detectorModelDescription = (DetectorModelSummary -> Maybe Text)
-> (DetectorModelSummary -> Maybe Text -> DetectorModelSummary)
-> Lens
DetectorModelSummary DetectorModelSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectorModelSummary' {Maybe Text
detectorModelDescription :: Maybe Text
$sel:detectorModelDescription:DetectorModelSummary' :: DetectorModelSummary -> Maybe Text
detectorModelDescription} -> Maybe Text
detectorModelDescription) (\s :: DetectorModelSummary
s@DetectorModelSummary' {} Maybe Text
a -> DetectorModelSummary
s {$sel:detectorModelDescription:DetectorModelSummary' :: Maybe Text
detectorModelDescription = Maybe Text
a} :: DetectorModelSummary)
instance Core.FromJSON DetectorModelSummary where
parseJSON :: Value -> Parser DetectorModelSummary
parseJSON =
String
-> (Object -> Parser DetectorModelSummary)
-> Value
-> Parser DetectorModelSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DetectorModelSummary"
( \Object
x ->
Maybe POSIX -> Maybe Text -> Maybe Text -> DetectorModelSummary
DetectorModelSummary'
(Maybe POSIX -> Maybe Text -> Maybe Text -> DetectorModelSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Text -> DetectorModelSummary)
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 Text -> Maybe Text -> DetectorModelSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> DetectorModelSummary)
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 -> DetectorModelSummary)
-> Parser (Maybe Text) -> Parser DetectorModelSummary
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")
)
instance Prelude.Hashable DetectorModelSummary
instance Prelude.NFData DetectorModelSummary