{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MacieV2.Types.BatchGetCustomDataIdentifierSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MacieV2.Types.BatchGetCustomDataIdentifierSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides information about a custom data identifier.
--
-- /See:/ 'newBatchGetCustomDataIdentifierSummary' smart constructor.
data BatchGetCustomDataIdentifierSummary = BatchGetCustomDataIdentifierSummary'
  { -- | The Amazon Resource Name (ARN) of the custom data identifier.
    BatchGetCustomDataIdentifierSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and time, in UTC and extended ISO 8601 format, when the custom
    -- data identifier was created.
    BatchGetCustomDataIdentifierSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The custom name of the custom data identifier.
    BatchGetCustomDataIdentifierSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the custom data identifier.
    BatchGetCustomDataIdentifierSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the custom data identifier was deleted. If you delete
    -- a custom data identifier, Amazon Macie doesn\'t delete it permanently.
    -- Instead, it soft deletes the identifier.
    BatchGetCustomDataIdentifierSummary -> Maybe Bool
deleted :: Prelude.Maybe Prelude.Bool,
    -- | The custom description of the custom data identifier.
    BatchGetCustomDataIdentifierSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (BatchGetCustomDataIdentifierSummary
-> BatchGetCustomDataIdentifierSummary -> Bool
(BatchGetCustomDataIdentifierSummary
 -> BatchGetCustomDataIdentifierSummary -> Bool)
-> (BatchGetCustomDataIdentifierSummary
    -> BatchGetCustomDataIdentifierSummary -> Bool)
-> Eq BatchGetCustomDataIdentifierSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetCustomDataIdentifierSummary
-> BatchGetCustomDataIdentifierSummary -> Bool
$c/= :: BatchGetCustomDataIdentifierSummary
-> BatchGetCustomDataIdentifierSummary -> Bool
== :: BatchGetCustomDataIdentifierSummary
-> BatchGetCustomDataIdentifierSummary -> Bool
$c== :: BatchGetCustomDataIdentifierSummary
-> BatchGetCustomDataIdentifierSummary -> Bool
Prelude.Eq, ReadPrec [BatchGetCustomDataIdentifierSummary]
ReadPrec BatchGetCustomDataIdentifierSummary
Int -> ReadS BatchGetCustomDataIdentifierSummary
ReadS [BatchGetCustomDataIdentifierSummary]
(Int -> ReadS BatchGetCustomDataIdentifierSummary)
-> ReadS [BatchGetCustomDataIdentifierSummary]
-> ReadPrec BatchGetCustomDataIdentifierSummary
-> ReadPrec [BatchGetCustomDataIdentifierSummary]
-> Read BatchGetCustomDataIdentifierSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetCustomDataIdentifierSummary]
$creadListPrec :: ReadPrec [BatchGetCustomDataIdentifierSummary]
readPrec :: ReadPrec BatchGetCustomDataIdentifierSummary
$creadPrec :: ReadPrec BatchGetCustomDataIdentifierSummary
readList :: ReadS [BatchGetCustomDataIdentifierSummary]
$creadList :: ReadS [BatchGetCustomDataIdentifierSummary]
readsPrec :: Int -> ReadS BatchGetCustomDataIdentifierSummary
$creadsPrec :: Int -> ReadS BatchGetCustomDataIdentifierSummary
Prelude.Read, Int -> BatchGetCustomDataIdentifierSummary -> ShowS
[BatchGetCustomDataIdentifierSummary] -> ShowS
BatchGetCustomDataIdentifierSummary -> String
(Int -> BatchGetCustomDataIdentifierSummary -> ShowS)
-> (BatchGetCustomDataIdentifierSummary -> String)
-> ([BatchGetCustomDataIdentifierSummary] -> ShowS)
-> Show BatchGetCustomDataIdentifierSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetCustomDataIdentifierSummary] -> ShowS
$cshowList :: [BatchGetCustomDataIdentifierSummary] -> ShowS
show :: BatchGetCustomDataIdentifierSummary -> String
$cshow :: BatchGetCustomDataIdentifierSummary -> String
showsPrec :: Int -> BatchGetCustomDataIdentifierSummary -> ShowS
$cshowsPrec :: Int -> BatchGetCustomDataIdentifierSummary -> ShowS
Prelude.Show, (forall x.
 BatchGetCustomDataIdentifierSummary
 -> Rep BatchGetCustomDataIdentifierSummary x)
-> (forall x.
    Rep BatchGetCustomDataIdentifierSummary x
    -> BatchGetCustomDataIdentifierSummary)
-> Generic BatchGetCustomDataIdentifierSummary
forall x.
Rep BatchGetCustomDataIdentifierSummary x
-> BatchGetCustomDataIdentifierSummary
forall x.
BatchGetCustomDataIdentifierSummary
-> Rep BatchGetCustomDataIdentifierSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetCustomDataIdentifierSummary x
-> BatchGetCustomDataIdentifierSummary
$cfrom :: forall x.
BatchGetCustomDataIdentifierSummary
-> Rep BatchGetCustomDataIdentifierSummary x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetCustomDataIdentifierSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'batchGetCustomDataIdentifierSummary_arn' - The Amazon Resource Name (ARN) of the custom data identifier.
--
-- 'createdAt', 'batchGetCustomDataIdentifierSummary_createdAt' - The date and time, in UTC and extended ISO 8601 format, when the custom
-- data identifier was created.
--
-- 'name', 'batchGetCustomDataIdentifierSummary_name' - The custom name of the custom data identifier.
--
-- 'id', 'batchGetCustomDataIdentifierSummary_id' - The unique identifier for the custom data identifier.
--
-- 'deleted', 'batchGetCustomDataIdentifierSummary_deleted' - Specifies whether the custom data identifier was deleted. If you delete
-- a custom data identifier, Amazon Macie doesn\'t delete it permanently.
-- Instead, it soft deletes the identifier.
--
-- 'description', 'batchGetCustomDataIdentifierSummary_description' - The custom description of the custom data identifier.
newBatchGetCustomDataIdentifierSummary ::
  BatchGetCustomDataIdentifierSummary
newBatchGetCustomDataIdentifierSummary :: BatchGetCustomDataIdentifierSummary
newBatchGetCustomDataIdentifierSummary =
  BatchGetCustomDataIdentifierSummary' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> BatchGetCustomDataIdentifierSummary
BatchGetCustomDataIdentifierSummary'
    { $sel:arn:BatchGetCustomDataIdentifierSummary' :: Maybe Text
arn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:BatchGetCustomDataIdentifierSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:name:BatchGetCustomDataIdentifierSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:BatchGetCustomDataIdentifierSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deleted:BatchGetCustomDataIdentifierSummary' :: Maybe Bool
deleted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:description:BatchGetCustomDataIdentifierSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the custom data identifier.
batchGetCustomDataIdentifierSummary_arn :: Lens.Lens' BatchGetCustomDataIdentifierSummary (Prelude.Maybe Prelude.Text)
batchGetCustomDataIdentifierSummary_arn :: (Maybe Text -> f (Maybe Text))
-> BatchGetCustomDataIdentifierSummary
-> f BatchGetCustomDataIdentifierSummary
batchGetCustomDataIdentifierSummary_arn = (BatchGetCustomDataIdentifierSummary -> Maybe Text)
-> (BatchGetCustomDataIdentifierSummary
    -> Maybe Text -> BatchGetCustomDataIdentifierSummary)
-> Lens
     BatchGetCustomDataIdentifierSummary
     BatchGetCustomDataIdentifierSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetCustomDataIdentifierSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:BatchGetCustomDataIdentifierSummary' :: BatchGetCustomDataIdentifierSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: BatchGetCustomDataIdentifierSummary
s@BatchGetCustomDataIdentifierSummary' {} Maybe Text
a -> BatchGetCustomDataIdentifierSummary
s {$sel:arn:BatchGetCustomDataIdentifierSummary' :: Maybe Text
arn = Maybe Text
a} :: BatchGetCustomDataIdentifierSummary)

-- | The date and time, in UTC and extended ISO 8601 format, when the custom
-- data identifier was created.
batchGetCustomDataIdentifierSummary_createdAt :: Lens.Lens' BatchGetCustomDataIdentifierSummary (Prelude.Maybe Prelude.UTCTime)
batchGetCustomDataIdentifierSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> BatchGetCustomDataIdentifierSummary
-> f BatchGetCustomDataIdentifierSummary
batchGetCustomDataIdentifierSummary_createdAt = (BatchGetCustomDataIdentifierSummary -> Maybe POSIX)
-> (BatchGetCustomDataIdentifierSummary
    -> Maybe POSIX -> BatchGetCustomDataIdentifierSummary)
-> Lens
     BatchGetCustomDataIdentifierSummary
     BatchGetCustomDataIdentifierSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetCustomDataIdentifierSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:BatchGetCustomDataIdentifierSummary' :: BatchGetCustomDataIdentifierSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: BatchGetCustomDataIdentifierSummary
s@BatchGetCustomDataIdentifierSummary' {} Maybe POSIX
a -> BatchGetCustomDataIdentifierSummary
s {$sel:createdAt:BatchGetCustomDataIdentifierSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: BatchGetCustomDataIdentifierSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> BatchGetCustomDataIdentifierSummary
 -> f BatchGetCustomDataIdentifierSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> BatchGetCustomDataIdentifierSummary
-> f BatchGetCustomDataIdentifierSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The custom name of the custom data identifier.
batchGetCustomDataIdentifierSummary_name :: Lens.Lens' BatchGetCustomDataIdentifierSummary (Prelude.Maybe Prelude.Text)
batchGetCustomDataIdentifierSummary_name :: (Maybe Text -> f (Maybe Text))
-> BatchGetCustomDataIdentifierSummary
-> f BatchGetCustomDataIdentifierSummary
batchGetCustomDataIdentifierSummary_name = (BatchGetCustomDataIdentifierSummary -> Maybe Text)
-> (BatchGetCustomDataIdentifierSummary
    -> Maybe Text -> BatchGetCustomDataIdentifierSummary)
-> Lens
     BatchGetCustomDataIdentifierSummary
     BatchGetCustomDataIdentifierSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetCustomDataIdentifierSummary' {Maybe Text
name :: Maybe Text
$sel:name:BatchGetCustomDataIdentifierSummary' :: BatchGetCustomDataIdentifierSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: BatchGetCustomDataIdentifierSummary
s@BatchGetCustomDataIdentifierSummary' {} Maybe Text
a -> BatchGetCustomDataIdentifierSummary
s {$sel:name:BatchGetCustomDataIdentifierSummary' :: Maybe Text
name = Maybe Text
a} :: BatchGetCustomDataIdentifierSummary)

-- | The unique identifier for the custom data identifier.
batchGetCustomDataIdentifierSummary_id :: Lens.Lens' BatchGetCustomDataIdentifierSummary (Prelude.Maybe Prelude.Text)
batchGetCustomDataIdentifierSummary_id :: (Maybe Text -> f (Maybe Text))
-> BatchGetCustomDataIdentifierSummary
-> f BatchGetCustomDataIdentifierSummary
batchGetCustomDataIdentifierSummary_id = (BatchGetCustomDataIdentifierSummary -> Maybe Text)
-> (BatchGetCustomDataIdentifierSummary
    -> Maybe Text -> BatchGetCustomDataIdentifierSummary)
-> Lens
     BatchGetCustomDataIdentifierSummary
     BatchGetCustomDataIdentifierSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetCustomDataIdentifierSummary' {Maybe Text
id :: Maybe Text
$sel:id:BatchGetCustomDataIdentifierSummary' :: BatchGetCustomDataIdentifierSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: BatchGetCustomDataIdentifierSummary
s@BatchGetCustomDataIdentifierSummary' {} Maybe Text
a -> BatchGetCustomDataIdentifierSummary
s {$sel:id:BatchGetCustomDataIdentifierSummary' :: Maybe Text
id = Maybe Text
a} :: BatchGetCustomDataIdentifierSummary)

-- | Specifies whether the custom data identifier was deleted. If you delete
-- a custom data identifier, Amazon Macie doesn\'t delete it permanently.
-- Instead, it soft deletes the identifier.
batchGetCustomDataIdentifierSummary_deleted :: Lens.Lens' BatchGetCustomDataIdentifierSummary (Prelude.Maybe Prelude.Bool)
batchGetCustomDataIdentifierSummary_deleted :: (Maybe Bool -> f (Maybe Bool))
-> BatchGetCustomDataIdentifierSummary
-> f BatchGetCustomDataIdentifierSummary
batchGetCustomDataIdentifierSummary_deleted = (BatchGetCustomDataIdentifierSummary -> Maybe Bool)
-> (BatchGetCustomDataIdentifierSummary
    -> Maybe Bool -> BatchGetCustomDataIdentifierSummary)
-> Lens
     BatchGetCustomDataIdentifierSummary
     BatchGetCustomDataIdentifierSummary
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetCustomDataIdentifierSummary' {Maybe Bool
deleted :: Maybe Bool
$sel:deleted:BatchGetCustomDataIdentifierSummary' :: BatchGetCustomDataIdentifierSummary -> Maybe Bool
deleted} -> Maybe Bool
deleted) (\s :: BatchGetCustomDataIdentifierSummary
s@BatchGetCustomDataIdentifierSummary' {} Maybe Bool
a -> BatchGetCustomDataIdentifierSummary
s {$sel:deleted:BatchGetCustomDataIdentifierSummary' :: Maybe Bool
deleted = Maybe Bool
a} :: BatchGetCustomDataIdentifierSummary)

-- | The custom description of the custom data identifier.
batchGetCustomDataIdentifierSummary_description :: Lens.Lens' BatchGetCustomDataIdentifierSummary (Prelude.Maybe Prelude.Text)
batchGetCustomDataIdentifierSummary_description :: (Maybe Text -> f (Maybe Text))
-> BatchGetCustomDataIdentifierSummary
-> f BatchGetCustomDataIdentifierSummary
batchGetCustomDataIdentifierSummary_description = (BatchGetCustomDataIdentifierSummary -> Maybe Text)
-> (BatchGetCustomDataIdentifierSummary
    -> Maybe Text -> BatchGetCustomDataIdentifierSummary)
-> Lens
     BatchGetCustomDataIdentifierSummary
     BatchGetCustomDataIdentifierSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetCustomDataIdentifierSummary' {Maybe Text
description :: Maybe Text
$sel:description:BatchGetCustomDataIdentifierSummary' :: BatchGetCustomDataIdentifierSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: BatchGetCustomDataIdentifierSummary
s@BatchGetCustomDataIdentifierSummary' {} Maybe Text
a -> BatchGetCustomDataIdentifierSummary
s {$sel:description:BatchGetCustomDataIdentifierSummary' :: Maybe Text
description = Maybe Text
a} :: BatchGetCustomDataIdentifierSummary)

instance
  Core.FromJSON
    BatchGetCustomDataIdentifierSummary
  where
  parseJSON :: Value -> Parser BatchGetCustomDataIdentifierSummary
parseJSON =
    String
-> (Object -> Parser BatchGetCustomDataIdentifierSummary)
-> Value
-> Parser BatchGetCustomDataIdentifierSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BatchGetCustomDataIdentifierSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> BatchGetCustomDataIdentifierSummary
BatchGetCustomDataIdentifierSummary'
            (Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> BatchGetCustomDataIdentifierSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> BatchGetCustomDataIdentifierSummary)
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
"arn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> BatchGetCustomDataIdentifierSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> BatchGetCustomDataIdentifierSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> BatchGetCustomDataIdentifierSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool -> Maybe Text -> BatchGetCustomDataIdentifierSummary)
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
"name")
            Parser
  (Maybe Text
   -> Maybe Bool -> Maybe Text -> BatchGetCustomDataIdentifierSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool -> Maybe Text -> BatchGetCustomDataIdentifierSummary)
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")
            Parser
  (Maybe Bool -> Maybe Text -> BatchGetCustomDataIdentifierSummary)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> BatchGetCustomDataIdentifierSummary)
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
"deleted")
            Parser (Maybe Text -> BatchGetCustomDataIdentifierSummary)
-> Parser (Maybe Text)
-> Parser BatchGetCustomDataIdentifierSummary
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
    BatchGetCustomDataIdentifierSummary

instance
  Prelude.NFData
    BatchGetCustomDataIdentifierSummary