{-# 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.SensitivityInspectionTemplateExcludes
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MacieV2.Types.SensitivityInspectionTemplateExcludes where

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

-- | Specifies managed data identifiers to exclude (not use) when performing
-- automated sensitive data discovery for an Amazon Macie account. For
-- information about the managed data identifiers that Amazon Macie
-- currently provides, see
-- <https://docs.aws.amazon.com/macie/latest/user/managed-data-identifiers.html Using managed data identifiers>
-- in the /Amazon Macie User Guide/.
--
-- /See:/ 'newSensitivityInspectionTemplateExcludes' smart constructor.
data SensitivityInspectionTemplateExcludes = SensitivityInspectionTemplateExcludes'
  { -- | An array of unique identifiers, one for each managed data identifier to
    -- exclude. To retrieve a list of valid values, use the
    -- ListManagedDataIdentifiers operation.
    SensitivityInspectionTemplateExcludes -> Maybe [Text]
managedDataIdentifierIds :: Prelude.Maybe [Prelude.Text]
  }
  deriving (SensitivityInspectionTemplateExcludes
-> SensitivityInspectionTemplateExcludes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SensitivityInspectionTemplateExcludes
-> SensitivityInspectionTemplateExcludes -> Bool
$c/= :: SensitivityInspectionTemplateExcludes
-> SensitivityInspectionTemplateExcludes -> Bool
== :: SensitivityInspectionTemplateExcludes
-> SensitivityInspectionTemplateExcludes -> Bool
$c== :: SensitivityInspectionTemplateExcludes
-> SensitivityInspectionTemplateExcludes -> Bool
Prelude.Eq, ReadPrec [SensitivityInspectionTemplateExcludes]
ReadPrec SensitivityInspectionTemplateExcludes
Int -> ReadS SensitivityInspectionTemplateExcludes
ReadS [SensitivityInspectionTemplateExcludes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SensitivityInspectionTemplateExcludes]
$creadListPrec :: ReadPrec [SensitivityInspectionTemplateExcludes]
readPrec :: ReadPrec SensitivityInspectionTemplateExcludes
$creadPrec :: ReadPrec SensitivityInspectionTemplateExcludes
readList :: ReadS [SensitivityInspectionTemplateExcludes]
$creadList :: ReadS [SensitivityInspectionTemplateExcludes]
readsPrec :: Int -> ReadS SensitivityInspectionTemplateExcludes
$creadsPrec :: Int -> ReadS SensitivityInspectionTemplateExcludes
Prelude.Read, Int -> SensitivityInspectionTemplateExcludes -> ShowS
[SensitivityInspectionTemplateExcludes] -> ShowS
SensitivityInspectionTemplateExcludes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SensitivityInspectionTemplateExcludes] -> ShowS
$cshowList :: [SensitivityInspectionTemplateExcludes] -> ShowS
show :: SensitivityInspectionTemplateExcludes -> String
$cshow :: SensitivityInspectionTemplateExcludes -> String
showsPrec :: Int -> SensitivityInspectionTemplateExcludes -> ShowS
$cshowsPrec :: Int -> SensitivityInspectionTemplateExcludes -> ShowS
Prelude.Show, forall x.
Rep SensitivityInspectionTemplateExcludes x
-> SensitivityInspectionTemplateExcludes
forall x.
SensitivityInspectionTemplateExcludes
-> Rep SensitivityInspectionTemplateExcludes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SensitivityInspectionTemplateExcludes x
-> SensitivityInspectionTemplateExcludes
$cfrom :: forall x.
SensitivityInspectionTemplateExcludes
-> Rep SensitivityInspectionTemplateExcludes x
Prelude.Generic)

-- |
-- Create a value of 'SensitivityInspectionTemplateExcludes' 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:
--
-- 'managedDataIdentifierIds', 'sensitivityInspectionTemplateExcludes_managedDataIdentifierIds' - An array of unique identifiers, one for each managed data identifier to
-- exclude. To retrieve a list of valid values, use the
-- ListManagedDataIdentifiers operation.
newSensitivityInspectionTemplateExcludes ::
  SensitivityInspectionTemplateExcludes
newSensitivityInspectionTemplateExcludes :: SensitivityInspectionTemplateExcludes
newSensitivityInspectionTemplateExcludes =
  SensitivityInspectionTemplateExcludes'
    { $sel:managedDataIdentifierIds:SensitivityInspectionTemplateExcludes' :: Maybe [Text]
managedDataIdentifierIds =
        forall a. Maybe a
Prelude.Nothing
    }

-- | An array of unique identifiers, one for each managed data identifier to
-- exclude. To retrieve a list of valid values, use the
-- ListManagedDataIdentifiers operation.
sensitivityInspectionTemplateExcludes_managedDataIdentifierIds :: Lens.Lens' SensitivityInspectionTemplateExcludes (Prelude.Maybe [Prelude.Text])
sensitivityInspectionTemplateExcludes_managedDataIdentifierIds :: Lens' SensitivityInspectionTemplateExcludes (Maybe [Text])
sensitivityInspectionTemplateExcludes_managedDataIdentifierIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SensitivityInspectionTemplateExcludes' {Maybe [Text]
managedDataIdentifierIds :: Maybe [Text]
$sel:managedDataIdentifierIds:SensitivityInspectionTemplateExcludes' :: SensitivityInspectionTemplateExcludes -> Maybe [Text]
managedDataIdentifierIds} -> Maybe [Text]
managedDataIdentifierIds) (\s :: SensitivityInspectionTemplateExcludes
s@SensitivityInspectionTemplateExcludes' {} Maybe [Text]
a -> SensitivityInspectionTemplateExcludes
s {$sel:managedDataIdentifierIds:SensitivityInspectionTemplateExcludes' :: Maybe [Text]
managedDataIdentifierIds = Maybe [Text]
a} :: SensitivityInspectionTemplateExcludes) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Data.FromJSON
    SensitivityInspectionTemplateExcludes
  where
  parseJSON :: Value -> Parser SensitivityInspectionTemplateExcludes
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"SensitivityInspectionTemplateExcludes"
      ( \Object
x ->
          Maybe [Text] -> SensitivityInspectionTemplateExcludes
SensitivityInspectionTemplateExcludes'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"managedDataIdentifierIds"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    SensitivityInspectionTemplateExcludes
  where
  hashWithSalt :: Int -> SensitivityInspectionTemplateExcludes -> Int
hashWithSalt
    Int
_salt
    SensitivityInspectionTemplateExcludes' {Maybe [Text]
managedDataIdentifierIds :: Maybe [Text]
$sel:managedDataIdentifierIds:SensitivityInspectionTemplateExcludes' :: SensitivityInspectionTemplateExcludes -> Maybe [Text]
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
managedDataIdentifierIds

instance
  Prelude.NFData
    SensitivityInspectionTemplateExcludes
  where
  rnf :: SensitivityInspectionTemplateExcludes -> ()
rnf SensitivityInspectionTemplateExcludes' {Maybe [Text]
managedDataIdentifierIds :: Maybe [Text]
$sel:managedDataIdentifierIds:SensitivityInspectionTemplateExcludes' :: SensitivityInspectionTemplateExcludes -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
managedDataIdentifierIds

instance
  Data.ToJSON
    SensitivityInspectionTemplateExcludes
  where
  toJSON :: SensitivityInspectionTemplateExcludes -> Value
toJSON SensitivityInspectionTemplateExcludes' {Maybe [Text]
managedDataIdentifierIds :: Maybe [Text]
$sel:managedDataIdentifierIds:SensitivityInspectionTemplateExcludes' :: SensitivityInspectionTemplateExcludes -> Maybe [Text]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"managedDataIdentifierIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
managedDataIdentifierIds
          ]
      )