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