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