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