{-# 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.ClassificationResult where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MacieV2.Types.ClassificationResultStatus
import Amazonka.MacieV2.Types.CustomDataIdentifiers
import Amazonka.MacieV2.Types.SensitiveDataItem
import qualified Amazonka.Prelude as Prelude
data ClassificationResult = ClassificationResult'
{
ClassificationResult -> Maybe [SensitiveDataItem]
sensitiveData :: Prelude.Maybe [SensitiveDataItem],
ClassificationResult -> Maybe ClassificationResultStatus
status :: Prelude.Maybe ClassificationResultStatus,
ClassificationResult -> Maybe Text
mimeType :: Prelude.Maybe Prelude.Text,
ClassificationResult -> Maybe Integer
sizeClassified :: Prelude.Maybe Prelude.Integer,
ClassificationResult -> Maybe Bool
additionalOccurrences :: Prelude.Maybe Prelude.Bool,
ClassificationResult -> Maybe CustomDataIdentifiers
customDataIdentifiers :: Prelude.Maybe CustomDataIdentifiers
}
deriving (ClassificationResult -> ClassificationResult -> Bool
(ClassificationResult -> ClassificationResult -> Bool)
-> (ClassificationResult -> ClassificationResult -> Bool)
-> Eq ClassificationResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClassificationResult -> ClassificationResult -> Bool
$c/= :: ClassificationResult -> ClassificationResult -> Bool
== :: ClassificationResult -> ClassificationResult -> Bool
$c== :: ClassificationResult -> ClassificationResult -> Bool
Prelude.Eq, ReadPrec [ClassificationResult]
ReadPrec ClassificationResult
Int -> ReadS ClassificationResult
ReadS [ClassificationResult]
(Int -> ReadS ClassificationResult)
-> ReadS [ClassificationResult]
-> ReadPrec ClassificationResult
-> ReadPrec [ClassificationResult]
-> Read ClassificationResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClassificationResult]
$creadListPrec :: ReadPrec [ClassificationResult]
readPrec :: ReadPrec ClassificationResult
$creadPrec :: ReadPrec ClassificationResult
readList :: ReadS [ClassificationResult]
$creadList :: ReadS [ClassificationResult]
readsPrec :: Int -> ReadS ClassificationResult
$creadsPrec :: Int -> ReadS ClassificationResult
Prelude.Read, Int -> ClassificationResult -> ShowS
[ClassificationResult] -> ShowS
ClassificationResult -> String
(Int -> ClassificationResult -> ShowS)
-> (ClassificationResult -> String)
-> ([ClassificationResult] -> ShowS)
-> Show ClassificationResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClassificationResult] -> ShowS
$cshowList :: [ClassificationResult] -> ShowS
show :: ClassificationResult -> String
$cshow :: ClassificationResult -> String
showsPrec :: Int -> ClassificationResult -> ShowS
$cshowsPrec :: Int -> ClassificationResult -> ShowS
Prelude.Show, (forall x. ClassificationResult -> Rep ClassificationResult x)
-> (forall x. Rep ClassificationResult x -> ClassificationResult)
-> Generic ClassificationResult
forall x. Rep ClassificationResult x -> ClassificationResult
forall x. ClassificationResult -> Rep ClassificationResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClassificationResult x -> ClassificationResult
$cfrom :: forall x. ClassificationResult -> Rep ClassificationResult x
Prelude.Generic)
newClassificationResult ::
ClassificationResult
newClassificationResult :: ClassificationResult
newClassificationResult =
ClassificationResult' :: Maybe [SensitiveDataItem]
-> Maybe ClassificationResultStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Bool
-> Maybe CustomDataIdentifiers
-> ClassificationResult
ClassificationResult'
{ $sel:sensitiveData:ClassificationResult' :: Maybe [SensitiveDataItem]
sensitiveData =
Maybe [SensitiveDataItem]
forall a. Maybe a
Prelude.Nothing,
$sel:status:ClassificationResult' :: Maybe ClassificationResultStatus
status = Maybe ClassificationResultStatus
forall a. Maybe a
Prelude.Nothing,
$sel:mimeType:ClassificationResult' :: Maybe Text
mimeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sizeClassified:ClassificationResult' :: Maybe Integer
sizeClassified = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:additionalOccurrences:ClassificationResult' :: Maybe Bool
additionalOccurrences = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:customDataIdentifiers:ClassificationResult' :: Maybe CustomDataIdentifiers
customDataIdentifiers = Maybe CustomDataIdentifiers
forall a. Maybe a
Prelude.Nothing
}
classificationResult_sensitiveData :: Lens.Lens' ClassificationResult (Prelude.Maybe [SensitiveDataItem])
classificationResult_sensitiveData :: (Maybe [SensitiveDataItem] -> f (Maybe [SensitiveDataItem]))
-> ClassificationResult -> f ClassificationResult
classificationResult_sensitiveData = (ClassificationResult -> Maybe [SensitiveDataItem])
-> (ClassificationResult
-> Maybe [SensitiveDataItem] -> ClassificationResult)
-> Lens
ClassificationResult
ClassificationResult
(Maybe [SensitiveDataItem])
(Maybe [SensitiveDataItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClassificationResult' {Maybe [SensitiveDataItem]
sensitiveData :: Maybe [SensitiveDataItem]
$sel:sensitiveData:ClassificationResult' :: ClassificationResult -> Maybe [SensitiveDataItem]
sensitiveData} -> Maybe [SensitiveDataItem]
sensitiveData) (\s :: ClassificationResult
s@ClassificationResult' {} Maybe [SensitiveDataItem]
a -> ClassificationResult
s {$sel:sensitiveData:ClassificationResult' :: Maybe [SensitiveDataItem]
sensitiveData = Maybe [SensitiveDataItem]
a} :: ClassificationResult) ((Maybe [SensitiveDataItem] -> f (Maybe [SensitiveDataItem]))
-> ClassificationResult -> f ClassificationResult)
-> ((Maybe [SensitiveDataItem] -> f (Maybe [SensitiveDataItem]))
-> Maybe [SensitiveDataItem] -> f (Maybe [SensitiveDataItem]))
-> (Maybe [SensitiveDataItem] -> f (Maybe [SensitiveDataItem]))
-> ClassificationResult
-> f ClassificationResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SensitiveDataItem]
[SensitiveDataItem]
[SensitiveDataItem]
[SensitiveDataItem]
-> Iso
(Maybe [SensitiveDataItem])
(Maybe [SensitiveDataItem])
(Maybe [SensitiveDataItem])
(Maybe [SensitiveDataItem])
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
[SensitiveDataItem]
[SensitiveDataItem]
[SensitiveDataItem]
[SensitiveDataItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
classificationResult_status :: Lens.Lens' ClassificationResult (Prelude.Maybe ClassificationResultStatus)
classificationResult_status :: (Maybe ClassificationResultStatus
-> f (Maybe ClassificationResultStatus))
-> ClassificationResult -> f ClassificationResult
classificationResult_status = (ClassificationResult -> Maybe ClassificationResultStatus)
-> (ClassificationResult
-> Maybe ClassificationResultStatus -> ClassificationResult)
-> Lens
ClassificationResult
ClassificationResult
(Maybe ClassificationResultStatus)
(Maybe ClassificationResultStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClassificationResult' {Maybe ClassificationResultStatus
status :: Maybe ClassificationResultStatus
$sel:status:ClassificationResult' :: ClassificationResult -> Maybe ClassificationResultStatus
status} -> Maybe ClassificationResultStatus
status) (\s :: ClassificationResult
s@ClassificationResult' {} Maybe ClassificationResultStatus
a -> ClassificationResult
s {$sel:status:ClassificationResult' :: Maybe ClassificationResultStatus
status = Maybe ClassificationResultStatus
a} :: ClassificationResult)
classificationResult_mimeType :: Lens.Lens' ClassificationResult (Prelude.Maybe Prelude.Text)
classificationResult_mimeType :: (Maybe Text -> f (Maybe Text))
-> ClassificationResult -> f ClassificationResult
classificationResult_mimeType = (ClassificationResult -> Maybe Text)
-> (ClassificationResult -> Maybe Text -> ClassificationResult)
-> Lens
ClassificationResult ClassificationResult (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClassificationResult' {Maybe Text
mimeType :: Maybe Text
$sel:mimeType:ClassificationResult' :: ClassificationResult -> Maybe Text
mimeType} -> Maybe Text
mimeType) (\s :: ClassificationResult
s@ClassificationResult' {} Maybe Text
a -> ClassificationResult
s {$sel:mimeType:ClassificationResult' :: Maybe Text
mimeType = Maybe Text
a} :: ClassificationResult)
classificationResult_sizeClassified :: Lens.Lens' ClassificationResult (Prelude.Maybe Prelude.Integer)
classificationResult_sizeClassified :: (Maybe Integer -> f (Maybe Integer))
-> ClassificationResult -> f ClassificationResult
classificationResult_sizeClassified = (ClassificationResult -> Maybe Integer)
-> (ClassificationResult -> Maybe Integer -> ClassificationResult)
-> Lens
ClassificationResult
ClassificationResult
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClassificationResult' {Maybe Integer
sizeClassified :: Maybe Integer
$sel:sizeClassified:ClassificationResult' :: ClassificationResult -> Maybe Integer
sizeClassified} -> Maybe Integer
sizeClassified) (\s :: ClassificationResult
s@ClassificationResult' {} Maybe Integer
a -> ClassificationResult
s {$sel:sizeClassified:ClassificationResult' :: Maybe Integer
sizeClassified = Maybe Integer
a} :: ClassificationResult)
classificationResult_additionalOccurrences :: Lens.Lens' ClassificationResult (Prelude.Maybe Prelude.Bool)
classificationResult_additionalOccurrences :: (Maybe Bool -> f (Maybe Bool))
-> ClassificationResult -> f ClassificationResult
classificationResult_additionalOccurrences = (ClassificationResult -> Maybe Bool)
-> (ClassificationResult -> Maybe Bool -> ClassificationResult)
-> Lens
ClassificationResult ClassificationResult (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClassificationResult' {Maybe Bool
additionalOccurrences :: Maybe Bool
$sel:additionalOccurrences:ClassificationResult' :: ClassificationResult -> Maybe Bool
additionalOccurrences} -> Maybe Bool
additionalOccurrences) (\s :: ClassificationResult
s@ClassificationResult' {} Maybe Bool
a -> ClassificationResult
s {$sel:additionalOccurrences:ClassificationResult' :: Maybe Bool
additionalOccurrences = Maybe Bool
a} :: ClassificationResult)
classificationResult_customDataIdentifiers :: Lens.Lens' ClassificationResult (Prelude.Maybe CustomDataIdentifiers)
classificationResult_customDataIdentifiers :: (Maybe CustomDataIdentifiers -> f (Maybe CustomDataIdentifiers))
-> ClassificationResult -> f ClassificationResult
classificationResult_customDataIdentifiers = (ClassificationResult -> Maybe CustomDataIdentifiers)
-> (ClassificationResult
-> Maybe CustomDataIdentifiers -> ClassificationResult)
-> Lens
ClassificationResult
ClassificationResult
(Maybe CustomDataIdentifiers)
(Maybe CustomDataIdentifiers)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClassificationResult' {Maybe CustomDataIdentifiers
customDataIdentifiers :: Maybe CustomDataIdentifiers
$sel:customDataIdentifiers:ClassificationResult' :: ClassificationResult -> Maybe CustomDataIdentifiers
customDataIdentifiers} -> Maybe CustomDataIdentifiers
customDataIdentifiers) (\s :: ClassificationResult
s@ClassificationResult' {} Maybe CustomDataIdentifiers
a -> ClassificationResult
s {$sel:customDataIdentifiers:ClassificationResult' :: Maybe CustomDataIdentifiers
customDataIdentifiers = Maybe CustomDataIdentifiers
a} :: ClassificationResult)
instance Core.FromJSON ClassificationResult where
parseJSON :: Value -> Parser ClassificationResult
parseJSON =
String
-> (Object -> Parser ClassificationResult)
-> Value
-> Parser ClassificationResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ClassificationResult"
( \Object
x ->
Maybe [SensitiveDataItem]
-> Maybe ClassificationResultStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Bool
-> Maybe CustomDataIdentifiers
-> ClassificationResult
ClassificationResult'
(Maybe [SensitiveDataItem]
-> Maybe ClassificationResultStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Bool
-> Maybe CustomDataIdentifiers
-> ClassificationResult)
-> Parser (Maybe [SensitiveDataItem])
-> Parser
(Maybe ClassificationResultStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Bool
-> Maybe CustomDataIdentifiers
-> ClassificationResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [SensitiveDataItem]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sensitiveData" Parser (Maybe (Maybe [SensitiveDataItem]))
-> Maybe [SensitiveDataItem] -> Parser (Maybe [SensitiveDataItem])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [SensitiveDataItem]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe ClassificationResultStatus
-> Maybe Text
-> Maybe Integer
-> Maybe Bool
-> Maybe CustomDataIdentifiers
-> ClassificationResult)
-> Parser (Maybe ClassificationResultStatus)
-> Parser
(Maybe Text
-> Maybe Integer
-> Maybe Bool
-> Maybe CustomDataIdentifiers
-> ClassificationResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ClassificationResultStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe Integer
-> Maybe Bool
-> Maybe CustomDataIdentifiers
-> ClassificationResult)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer
-> Maybe Bool
-> Maybe CustomDataIdentifiers
-> ClassificationResult)
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
"mimeType")
Parser
(Maybe Integer
-> Maybe Bool
-> Maybe CustomDataIdentifiers
-> ClassificationResult)
-> Parser (Maybe Integer)
-> Parser
(Maybe Bool -> Maybe CustomDataIdentifiers -> ClassificationResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sizeClassified")
Parser
(Maybe Bool -> Maybe CustomDataIdentifiers -> ClassificationResult)
-> Parser (Maybe Bool)
-> Parser (Maybe CustomDataIdentifiers -> ClassificationResult)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"additionalOccurrences")
Parser (Maybe CustomDataIdentifiers -> ClassificationResult)
-> Parser (Maybe CustomDataIdentifiers)
-> Parser ClassificationResult
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CustomDataIdentifiers)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"customDataIdentifiers")
)
instance Prelude.Hashable ClassificationResult
instance Prelude.NFData ClassificationResult