{-# 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.IoT.Types.ViolationEvent where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types.Behavior
import Amazonka.IoT.Types.MetricValue
import Amazonka.IoT.Types.VerificationState
import Amazonka.IoT.Types.ViolationEventAdditionalInfo
import Amazonka.IoT.Types.ViolationEventType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ViolationEvent = ViolationEvent'
{
ViolationEvent -> Maybe ViolationEventType
violationEventType :: Prelude.Maybe ViolationEventType,
ViolationEvent -> Maybe Text
verificationStateDescription :: Prelude.Maybe Prelude.Text,
ViolationEvent -> Maybe Text
violationId :: Prelude.Maybe Prelude.Text,
ViolationEvent -> Maybe Behavior
behavior :: Prelude.Maybe Behavior,
ViolationEvent -> Maybe MetricValue
metricValue :: Prelude.Maybe MetricValue,
ViolationEvent -> Maybe Text
securityProfileName :: Prelude.Maybe Prelude.Text,
ViolationEvent -> Maybe ViolationEventAdditionalInfo
violationEventAdditionalInfo :: Prelude.Maybe ViolationEventAdditionalInfo,
ViolationEvent -> Maybe POSIX
violationEventTime :: Prelude.Maybe Core.POSIX,
ViolationEvent -> Maybe Text
thingName :: Prelude.Maybe Prelude.Text,
ViolationEvent -> Maybe VerificationState
verificationState :: Prelude.Maybe VerificationState
}
deriving (ViolationEvent -> ViolationEvent -> Bool
(ViolationEvent -> ViolationEvent -> Bool)
-> (ViolationEvent -> ViolationEvent -> Bool) -> Eq ViolationEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ViolationEvent -> ViolationEvent -> Bool
$c/= :: ViolationEvent -> ViolationEvent -> Bool
== :: ViolationEvent -> ViolationEvent -> Bool
$c== :: ViolationEvent -> ViolationEvent -> Bool
Prelude.Eq, ReadPrec [ViolationEvent]
ReadPrec ViolationEvent
Int -> ReadS ViolationEvent
ReadS [ViolationEvent]
(Int -> ReadS ViolationEvent)
-> ReadS [ViolationEvent]
-> ReadPrec ViolationEvent
-> ReadPrec [ViolationEvent]
-> Read ViolationEvent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ViolationEvent]
$creadListPrec :: ReadPrec [ViolationEvent]
readPrec :: ReadPrec ViolationEvent
$creadPrec :: ReadPrec ViolationEvent
readList :: ReadS [ViolationEvent]
$creadList :: ReadS [ViolationEvent]
readsPrec :: Int -> ReadS ViolationEvent
$creadsPrec :: Int -> ReadS ViolationEvent
Prelude.Read, Int -> ViolationEvent -> ShowS
[ViolationEvent] -> ShowS
ViolationEvent -> String
(Int -> ViolationEvent -> ShowS)
-> (ViolationEvent -> String)
-> ([ViolationEvent] -> ShowS)
-> Show ViolationEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ViolationEvent] -> ShowS
$cshowList :: [ViolationEvent] -> ShowS
show :: ViolationEvent -> String
$cshow :: ViolationEvent -> String
showsPrec :: Int -> ViolationEvent -> ShowS
$cshowsPrec :: Int -> ViolationEvent -> ShowS
Prelude.Show, (forall x. ViolationEvent -> Rep ViolationEvent x)
-> (forall x. Rep ViolationEvent x -> ViolationEvent)
-> Generic ViolationEvent
forall x. Rep ViolationEvent x -> ViolationEvent
forall x. ViolationEvent -> Rep ViolationEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ViolationEvent x -> ViolationEvent
$cfrom :: forall x. ViolationEvent -> Rep ViolationEvent x
Prelude.Generic)
newViolationEvent ::
ViolationEvent
newViolationEvent :: ViolationEvent
newViolationEvent =
ViolationEvent' :: Maybe ViolationEventType
-> Maybe Text
-> Maybe Text
-> Maybe Behavior
-> Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent
ViolationEvent'
{ $sel:violationEventType:ViolationEvent' :: Maybe ViolationEventType
violationEventType =
Maybe ViolationEventType
forall a. Maybe a
Prelude.Nothing,
$sel:verificationStateDescription:ViolationEvent' :: Maybe Text
verificationStateDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:violationId:ViolationEvent' :: Maybe Text
violationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:behavior:ViolationEvent' :: Maybe Behavior
behavior = Maybe Behavior
forall a. Maybe a
Prelude.Nothing,
$sel:metricValue:ViolationEvent' :: Maybe MetricValue
metricValue = Maybe MetricValue
forall a. Maybe a
Prelude.Nothing,
$sel:securityProfileName:ViolationEvent' :: Maybe Text
securityProfileName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:violationEventAdditionalInfo:ViolationEvent' :: Maybe ViolationEventAdditionalInfo
violationEventAdditionalInfo = Maybe ViolationEventAdditionalInfo
forall a. Maybe a
Prelude.Nothing,
$sel:violationEventTime:ViolationEvent' :: Maybe POSIX
violationEventTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:thingName:ViolationEvent' :: Maybe Text
thingName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:verificationState:ViolationEvent' :: Maybe VerificationState
verificationState = Maybe VerificationState
forall a. Maybe a
Prelude.Nothing
}
violationEvent_violationEventType :: Lens.Lens' ViolationEvent (Prelude.Maybe ViolationEventType)
violationEvent_violationEventType :: (Maybe ViolationEventType -> f (Maybe ViolationEventType))
-> ViolationEvent -> f ViolationEvent
violationEvent_violationEventType = (ViolationEvent -> Maybe ViolationEventType)
-> (ViolationEvent -> Maybe ViolationEventType -> ViolationEvent)
-> Lens
ViolationEvent
ViolationEvent
(Maybe ViolationEventType)
(Maybe ViolationEventType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ViolationEvent' {Maybe ViolationEventType
violationEventType :: Maybe ViolationEventType
$sel:violationEventType:ViolationEvent' :: ViolationEvent -> Maybe ViolationEventType
violationEventType} -> Maybe ViolationEventType
violationEventType) (\s :: ViolationEvent
s@ViolationEvent' {} Maybe ViolationEventType
a -> ViolationEvent
s {$sel:violationEventType:ViolationEvent' :: Maybe ViolationEventType
violationEventType = Maybe ViolationEventType
a} :: ViolationEvent)
violationEvent_verificationStateDescription :: Lens.Lens' ViolationEvent (Prelude.Maybe Prelude.Text)
violationEvent_verificationStateDescription :: (Maybe Text -> f (Maybe Text))
-> ViolationEvent -> f ViolationEvent
violationEvent_verificationStateDescription = (ViolationEvent -> Maybe Text)
-> (ViolationEvent -> Maybe Text -> ViolationEvent)
-> Lens ViolationEvent ViolationEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ViolationEvent' {Maybe Text
verificationStateDescription :: Maybe Text
$sel:verificationStateDescription:ViolationEvent' :: ViolationEvent -> Maybe Text
verificationStateDescription} -> Maybe Text
verificationStateDescription) (\s :: ViolationEvent
s@ViolationEvent' {} Maybe Text
a -> ViolationEvent
s {$sel:verificationStateDescription:ViolationEvent' :: Maybe Text
verificationStateDescription = Maybe Text
a} :: ViolationEvent)
violationEvent_violationId :: Lens.Lens' ViolationEvent (Prelude.Maybe Prelude.Text)
violationEvent_violationId :: (Maybe Text -> f (Maybe Text))
-> ViolationEvent -> f ViolationEvent
violationEvent_violationId = (ViolationEvent -> Maybe Text)
-> (ViolationEvent -> Maybe Text -> ViolationEvent)
-> Lens ViolationEvent ViolationEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ViolationEvent' {Maybe Text
violationId :: Maybe Text
$sel:violationId:ViolationEvent' :: ViolationEvent -> Maybe Text
violationId} -> Maybe Text
violationId) (\s :: ViolationEvent
s@ViolationEvent' {} Maybe Text
a -> ViolationEvent
s {$sel:violationId:ViolationEvent' :: Maybe Text
violationId = Maybe Text
a} :: ViolationEvent)
violationEvent_behavior :: Lens.Lens' ViolationEvent (Prelude.Maybe Behavior)
violationEvent_behavior :: (Maybe Behavior -> f (Maybe Behavior))
-> ViolationEvent -> f ViolationEvent
violationEvent_behavior = (ViolationEvent -> Maybe Behavior)
-> (ViolationEvent -> Maybe Behavior -> ViolationEvent)
-> Lens
ViolationEvent ViolationEvent (Maybe Behavior) (Maybe Behavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ViolationEvent' {Maybe Behavior
behavior :: Maybe Behavior
$sel:behavior:ViolationEvent' :: ViolationEvent -> Maybe Behavior
behavior} -> Maybe Behavior
behavior) (\s :: ViolationEvent
s@ViolationEvent' {} Maybe Behavior
a -> ViolationEvent
s {$sel:behavior:ViolationEvent' :: Maybe Behavior
behavior = Maybe Behavior
a} :: ViolationEvent)
violationEvent_metricValue :: Lens.Lens' ViolationEvent (Prelude.Maybe MetricValue)
violationEvent_metricValue :: (Maybe MetricValue -> f (Maybe MetricValue))
-> ViolationEvent -> f ViolationEvent
violationEvent_metricValue = (ViolationEvent -> Maybe MetricValue)
-> (ViolationEvent -> Maybe MetricValue -> ViolationEvent)
-> Lens
ViolationEvent
ViolationEvent
(Maybe MetricValue)
(Maybe MetricValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ViolationEvent' {Maybe MetricValue
metricValue :: Maybe MetricValue
$sel:metricValue:ViolationEvent' :: ViolationEvent -> Maybe MetricValue
metricValue} -> Maybe MetricValue
metricValue) (\s :: ViolationEvent
s@ViolationEvent' {} Maybe MetricValue
a -> ViolationEvent
s {$sel:metricValue:ViolationEvent' :: Maybe MetricValue
metricValue = Maybe MetricValue
a} :: ViolationEvent)
violationEvent_securityProfileName :: Lens.Lens' ViolationEvent (Prelude.Maybe Prelude.Text)
violationEvent_securityProfileName :: (Maybe Text -> f (Maybe Text))
-> ViolationEvent -> f ViolationEvent
violationEvent_securityProfileName = (ViolationEvent -> Maybe Text)
-> (ViolationEvent -> Maybe Text -> ViolationEvent)
-> Lens ViolationEvent ViolationEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ViolationEvent' {Maybe Text
securityProfileName :: Maybe Text
$sel:securityProfileName:ViolationEvent' :: ViolationEvent -> Maybe Text
securityProfileName} -> Maybe Text
securityProfileName) (\s :: ViolationEvent
s@ViolationEvent' {} Maybe Text
a -> ViolationEvent
s {$sel:securityProfileName:ViolationEvent' :: Maybe Text
securityProfileName = Maybe Text
a} :: ViolationEvent)
violationEvent_violationEventAdditionalInfo :: Lens.Lens' ViolationEvent (Prelude.Maybe ViolationEventAdditionalInfo)
violationEvent_violationEventAdditionalInfo :: (Maybe ViolationEventAdditionalInfo
-> f (Maybe ViolationEventAdditionalInfo))
-> ViolationEvent -> f ViolationEvent
violationEvent_violationEventAdditionalInfo = (ViolationEvent -> Maybe ViolationEventAdditionalInfo)
-> (ViolationEvent
-> Maybe ViolationEventAdditionalInfo -> ViolationEvent)
-> Lens
ViolationEvent
ViolationEvent
(Maybe ViolationEventAdditionalInfo)
(Maybe ViolationEventAdditionalInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ViolationEvent' {Maybe ViolationEventAdditionalInfo
violationEventAdditionalInfo :: Maybe ViolationEventAdditionalInfo
$sel:violationEventAdditionalInfo:ViolationEvent' :: ViolationEvent -> Maybe ViolationEventAdditionalInfo
violationEventAdditionalInfo} -> Maybe ViolationEventAdditionalInfo
violationEventAdditionalInfo) (\s :: ViolationEvent
s@ViolationEvent' {} Maybe ViolationEventAdditionalInfo
a -> ViolationEvent
s {$sel:violationEventAdditionalInfo:ViolationEvent' :: Maybe ViolationEventAdditionalInfo
violationEventAdditionalInfo = Maybe ViolationEventAdditionalInfo
a} :: ViolationEvent)
violationEvent_violationEventTime :: Lens.Lens' ViolationEvent (Prelude.Maybe Prelude.UTCTime)
violationEvent_violationEventTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ViolationEvent -> f ViolationEvent
violationEvent_violationEventTime = (ViolationEvent -> Maybe POSIX)
-> (ViolationEvent -> Maybe POSIX -> ViolationEvent)
-> Lens ViolationEvent ViolationEvent (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ViolationEvent' {Maybe POSIX
violationEventTime :: Maybe POSIX
$sel:violationEventTime:ViolationEvent' :: ViolationEvent -> Maybe POSIX
violationEventTime} -> Maybe POSIX
violationEventTime) (\s :: ViolationEvent
s@ViolationEvent' {} Maybe POSIX
a -> ViolationEvent
s {$sel:violationEventTime:ViolationEvent' :: Maybe POSIX
violationEventTime = Maybe POSIX
a} :: ViolationEvent) ((Maybe POSIX -> f (Maybe POSIX))
-> ViolationEvent -> f ViolationEvent)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ViolationEvent
-> f ViolationEvent
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
violationEvent_thingName :: Lens.Lens' ViolationEvent (Prelude.Maybe Prelude.Text)
violationEvent_thingName :: (Maybe Text -> f (Maybe Text))
-> ViolationEvent -> f ViolationEvent
violationEvent_thingName = (ViolationEvent -> Maybe Text)
-> (ViolationEvent -> Maybe Text -> ViolationEvent)
-> Lens ViolationEvent ViolationEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ViolationEvent' {Maybe Text
thingName :: Maybe Text
$sel:thingName:ViolationEvent' :: ViolationEvent -> Maybe Text
thingName} -> Maybe Text
thingName) (\s :: ViolationEvent
s@ViolationEvent' {} Maybe Text
a -> ViolationEvent
s {$sel:thingName:ViolationEvent' :: Maybe Text
thingName = Maybe Text
a} :: ViolationEvent)
violationEvent_verificationState :: Lens.Lens' ViolationEvent (Prelude.Maybe VerificationState)
violationEvent_verificationState :: (Maybe VerificationState -> f (Maybe VerificationState))
-> ViolationEvent -> f ViolationEvent
violationEvent_verificationState = (ViolationEvent -> Maybe VerificationState)
-> (ViolationEvent -> Maybe VerificationState -> ViolationEvent)
-> Lens
ViolationEvent
ViolationEvent
(Maybe VerificationState)
(Maybe VerificationState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ViolationEvent' {Maybe VerificationState
verificationState :: Maybe VerificationState
$sel:verificationState:ViolationEvent' :: ViolationEvent -> Maybe VerificationState
verificationState} -> Maybe VerificationState
verificationState) (\s :: ViolationEvent
s@ViolationEvent' {} Maybe VerificationState
a -> ViolationEvent
s {$sel:verificationState:ViolationEvent' :: Maybe VerificationState
verificationState = Maybe VerificationState
a} :: ViolationEvent)
instance Core.FromJSON ViolationEvent where
parseJSON :: Value -> Parser ViolationEvent
parseJSON =
String
-> (Object -> Parser ViolationEvent)
-> Value
-> Parser ViolationEvent
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ViolationEvent"
( \Object
x ->
Maybe ViolationEventType
-> Maybe Text
-> Maybe Text
-> Maybe Behavior
-> Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent
ViolationEvent'
(Maybe ViolationEventType
-> Maybe Text
-> Maybe Text
-> Maybe Behavior
-> Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
-> Parser (Maybe ViolationEventType)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Behavior
-> Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ViolationEventType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"violationEventType")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Behavior
-> Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Behavior
-> Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
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
"verificationStateDescription")
Parser
(Maybe Text
-> Maybe Behavior
-> Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
-> Parser (Maybe Text)
-> Parser
(Maybe Behavior
-> Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
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
"violationId")
Parser
(Maybe Behavior
-> Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
-> Parser (Maybe Behavior)
-> Parser
(Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Behavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"behavior")
Parser
(Maybe MetricValue
-> Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
-> Parser (Maybe MetricValue)
-> Parser
(Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MetricValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"metricValue")
Parser
(Maybe Text
-> Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
-> Parser (Maybe Text)
-> Parser
(Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
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
"securityProfileName")
Parser
(Maybe ViolationEventAdditionalInfo
-> Maybe POSIX
-> Maybe Text
-> Maybe VerificationState
-> ViolationEvent)
-> Parser (Maybe ViolationEventAdditionalInfo)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe VerificationState -> ViolationEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ViolationEventAdditionalInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"violationEventAdditionalInfo")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe VerificationState -> ViolationEvent)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe VerificationState -> ViolationEvent)
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
"violationEventTime")
Parser (Maybe Text -> Maybe VerificationState -> ViolationEvent)
-> Parser (Maybe Text)
-> Parser (Maybe VerificationState -> ViolationEvent)
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
"thingName")
Parser (Maybe VerificationState -> ViolationEvent)
-> Parser (Maybe VerificationState) -> Parser ViolationEvent
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VerificationState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"verificationState")
)
instance Prelude.Hashable ViolationEvent
instance Prelude.NFData ViolationEvent