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