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