{-# 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.FraudDetector.Types.Detector where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Detector = Detector'
{
Detector -> Maybe Text
lastUpdatedTime :: Prelude.Maybe Prelude.Text,
Detector -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Detector -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
Detector -> Maybe Text
eventTypeName :: Prelude.Maybe Prelude.Text,
Detector -> Maybe Text
detectorId :: Prelude.Maybe Prelude.Text,
Detector -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (Detector -> Detector -> Bool
(Detector -> Detector -> Bool)
-> (Detector -> Detector -> Bool) -> Eq Detector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Detector -> Detector -> Bool
$c/= :: Detector -> Detector -> Bool
== :: Detector -> Detector -> Bool
$c== :: Detector -> Detector -> Bool
Prelude.Eq, ReadPrec [Detector]
ReadPrec Detector
Int -> ReadS Detector
ReadS [Detector]
(Int -> ReadS Detector)
-> ReadS [Detector]
-> ReadPrec Detector
-> ReadPrec [Detector]
-> Read Detector
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Detector]
$creadListPrec :: ReadPrec [Detector]
readPrec :: ReadPrec Detector
$creadPrec :: ReadPrec Detector
readList :: ReadS [Detector]
$creadList :: ReadS [Detector]
readsPrec :: Int -> ReadS Detector
$creadsPrec :: Int -> ReadS Detector
Prelude.Read, Int -> Detector -> ShowS
[Detector] -> ShowS
Detector -> String
(Int -> Detector -> ShowS)
-> (Detector -> String) -> ([Detector] -> ShowS) -> Show Detector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Detector] -> ShowS
$cshowList :: [Detector] -> ShowS
show :: Detector -> String
$cshow :: Detector -> String
showsPrec :: Int -> Detector -> ShowS
$cshowsPrec :: Int -> Detector -> ShowS
Prelude.Show, (forall x. Detector -> Rep Detector x)
-> (forall x. Rep Detector x -> Detector) -> Generic Detector
forall x. Rep Detector x -> Detector
forall x. Detector -> Rep Detector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Detector x -> Detector
$cfrom :: forall x. Detector -> Rep Detector x
Prelude.Generic)
newDetector ::
Detector
newDetector :: Detector
newDetector =
Detector' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Detector
Detector'
{ $sel:lastUpdatedTime:Detector' :: Maybe Text
lastUpdatedTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Detector' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:Detector' :: Maybe Text
createdTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventTypeName:Detector' :: Maybe Text
eventTypeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:detectorId:Detector' :: Maybe Text
detectorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Detector' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
detector_lastUpdatedTime :: Lens.Lens' Detector (Prelude.Maybe Prelude.Text)
detector_lastUpdatedTime :: (Maybe Text -> f (Maybe Text)) -> Detector -> f Detector
detector_lastUpdatedTime = (Detector -> Maybe Text)
-> (Detector -> Maybe Text -> Detector)
-> Lens Detector Detector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Detector' {Maybe Text
lastUpdatedTime :: Maybe Text
$sel:lastUpdatedTime:Detector' :: Detector -> Maybe Text
lastUpdatedTime} -> Maybe Text
lastUpdatedTime) (\s :: Detector
s@Detector' {} Maybe Text
a -> Detector
s {$sel:lastUpdatedTime:Detector' :: Maybe Text
lastUpdatedTime = Maybe Text
a} :: Detector)
detector_arn :: Lens.Lens' Detector (Prelude.Maybe Prelude.Text)
detector_arn :: (Maybe Text -> f (Maybe Text)) -> Detector -> f Detector
detector_arn = (Detector -> Maybe Text)
-> (Detector -> Maybe Text -> Detector)
-> Lens Detector Detector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Detector' {Maybe Text
arn :: Maybe Text
$sel:arn:Detector' :: Detector -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Detector
s@Detector' {} Maybe Text
a -> Detector
s {$sel:arn:Detector' :: Maybe Text
arn = Maybe Text
a} :: Detector)
detector_createdTime :: Lens.Lens' Detector (Prelude.Maybe Prelude.Text)
detector_createdTime :: (Maybe Text -> f (Maybe Text)) -> Detector -> f Detector
detector_createdTime = (Detector -> Maybe Text)
-> (Detector -> Maybe Text -> Detector)
-> Lens Detector Detector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Detector' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:Detector' :: Detector -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: Detector
s@Detector' {} Maybe Text
a -> Detector
s {$sel:createdTime:Detector' :: Maybe Text
createdTime = Maybe Text
a} :: Detector)
detector_eventTypeName :: Lens.Lens' Detector (Prelude.Maybe Prelude.Text)
detector_eventTypeName :: (Maybe Text -> f (Maybe Text)) -> Detector -> f Detector
detector_eventTypeName = (Detector -> Maybe Text)
-> (Detector -> Maybe Text -> Detector)
-> Lens Detector Detector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Detector' {Maybe Text
eventTypeName :: Maybe Text
$sel:eventTypeName:Detector' :: Detector -> Maybe Text
eventTypeName} -> Maybe Text
eventTypeName) (\s :: Detector
s@Detector' {} Maybe Text
a -> Detector
s {$sel:eventTypeName:Detector' :: Maybe Text
eventTypeName = Maybe Text
a} :: Detector)
detector_detectorId :: Lens.Lens' Detector (Prelude.Maybe Prelude.Text)
detector_detectorId :: (Maybe Text -> f (Maybe Text)) -> Detector -> f Detector
detector_detectorId = (Detector -> Maybe Text)
-> (Detector -> Maybe Text -> Detector)
-> Lens Detector Detector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Detector' {Maybe Text
detectorId :: Maybe Text
$sel:detectorId:Detector' :: Detector -> Maybe Text
detectorId} -> Maybe Text
detectorId) (\s :: Detector
s@Detector' {} Maybe Text
a -> Detector
s {$sel:detectorId:Detector' :: Maybe Text
detectorId = Maybe Text
a} :: Detector)
detector_description :: Lens.Lens' Detector (Prelude.Maybe Prelude.Text)
detector_description :: (Maybe Text -> f (Maybe Text)) -> Detector -> f Detector
detector_description = (Detector -> Maybe Text)
-> (Detector -> Maybe Text -> Detector)
-> Lens Detector Detector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Detector' {Maybe Text
description :: Maybe Text
$sel:description:Detector' :: Detector -> Maybe Text
description} -> Maybe Text
description) (\s :: Detector
s@Detector' {} Maybe Text
a -> Detector
s {$sel:description:Detector' :: Maybe Text
description = Maybe Text
a} :: Detector)
instance Core.FromJSON Detector where
parseJSON :: Value -> Parser Detector
parseJSON =
String -> (Object -> Parser Detector) -> Value -> Parser Detector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Detector"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Detector
Detector'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Detector)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Detector)
forall (f :: * -> *) a b. Functor 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
"lastUpdatedTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Detector)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Detector)
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
"arn")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Detector)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Detector)
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
"createdTime")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> Detector)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Detector)
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
"eventTypeName")
Parser (Maybe Text -> Maybe Text -> Detector)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Detector)
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
"detectorId")
Parser (Maybe Text -> Detector)
-> Parser (Maybe Text) -> Parser Detector
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
"description")
)
instance Prelude.Hashable Detector
instance Prelude.NFData Detector