{-# 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.S3ClassificationScope
-- 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.S3ClassificationScope where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MacieV2.Types.S3ClassificationScopeExclusion
import qualified Amazonka.Prelude as Prelude

-- | Specifies the S3 buckets that are excluded from automated sensitive data
-- discovery for an Amazon Macie account.
--
-- /See:/ 'newS3ClassificationScope' smart constructor.
data S3ClassificationScope = S3ClassificationScope'
  { -- | The S3 buckets that are excluded.
    S3ClassificationScope -> S3ClassificationScopeExclusion
excludes :: S3ClassificationScopeExclusion
  }
  deriving (S3ClassificationScope -> S3ClassificationScope -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3ClassificationScope -> S3ClassificationScope -> Bool
$c/= :: S3ClassificationScope -> S3ClassificationScope -> Bool
== :: S3ClassificationScope -> S3ClassificationScope -> Bool
$c== :: S3ClassificationScope -> S3ClassificationScope -> Bool
Prelude.Eq, ReadPrec [S3ClassificationScope]
ReadPrec S3ClassificationScope
Int -> ReadS S3ClassificationScope
ReadS [S3ClassificationScope]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3ClassificationScope]
$creadListPrec :: ReadPrec [S3ClassificationScope]
readPrec :: ReadPrec S3ClassificationScope
$creadPrec :: ReadPrec S3ClassificationScope
readList :: ReadS [S3ClassificationScope]
$creadList :: ReadS [S3ClassificationScope]
readsPrec :: Int -> ReadS S3ClassificationScope
$creadsPrec :: Int -> ReadS S3ClassificationScope
Prelude.Read, Int -> S3ClassificationScope -> ShowS
[S3ClassificationScope] -> ShowS
S3ClassificationScope -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3ClassificationScope] -> ShowS
$cshowList :: [S3ClassificationScope] -> ShowS
show :: S3ClassificationScope -> String
$cshow :: S3ClassificationScope -> String
showsPrec :: Int -> S3ClassificationScope -> ShowS
$cshowsPrec :: Int -> S3ClassificationScope -> ShowS
Prelude.Show, forall x. Rep S3ClassificationScope x -> S3ClassificationScope
forall x. S3ClassificationScope -> Rep S3ClassificationScope x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3ClassificationScope x -> S3ClassificationScope
$cfrom :: forall x. S3ClassificationScope -> Rep S3ClassificationScope x
Prelude.Generic)

-- |
-- Create a value of 'S3ClassificationScope' 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:
--
-- 'excludes', 's3ClassificationScope_excludes' - The S3 buckets that are excluded.
newS3ClassificationScope ::
  -- | 'excludes'
  S3ClassificationScopeExclusion ->
  S3ClassificationScope
newS3ClassificationScope :: S3ClassificationScopeExclusion -> S3ClassificationScope
newS3ClassificationScope S3ClassificationScopeExclusion
pExcludes_ =
  S3ClassificationScope' {$sel:excludes:S3ClassificationScope' :: S3ClassificationScopeExclusion
excludes = S3ClassificationScopeExclusion
pExcludes_}

-- | The S3 buckets that are excluded.
s3ClassificationScope_excludes :: Lens.Lens' S3ClassificationScope S3ClassificationScopeExclusion
s3ClassificationScope_excludes :: Lens' S3ClassificationScope S3ClassificationScopeExclusion
s3ClassificationScope_excludes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ClassificationScope' {S3ClassificationScopeExclusion
excludes :: S3ClassificationScopeExclusion
$sel:excludes:S3ClassificationScope' :: S3ClassificationScope -> S3ClassificationScopeExclusion
excludes} -> S3ClassificationScopeExclusion
excludes) (\s :: S3ClassificationScope
s@S3ClassificationScope' {} S3ClassificationScopeExclusion
a -> S3ClassificationScope
s {$sel:excludes:S3ClassificationScope' :: S3ClassificationScopeExclusion
excludes = S3ClassificationScopeExclusion
a} :: S3ClassificationScope)

instance Data.FromJSON S3ClassificationScope where
  parseJSON :: Value -> Parser S3ClassificationScope
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"S3ClassificationScope"
      ( \Object
x ->
          S3ClassificationScopeExclusion -> S3ClassificationScope
S3ClassificationScope'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"excludes")
      )

instance Prelude.Hashable S3ClassificationScope where
  hashWithSalt :: Int -> S3ClassificationScope -> Int
hashWithSalt Int
_salt S3ClassificationScope' {S3ClassificationScopeExclusion
excludes :: S3ClassificationScopeExclusion
$sel:excludes:S3ClassificationScope' :: S3ClassificationScope -> S3ClassificationScopeExclusion
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` S3ClassificationScopeExclusion
excludes

instance Prelude.NFData S3ClassificationScope where
  rnf :: S3ClassificationScope -> ()
rnf S3ClassificationScope' {S3ClassificationScopeExclusion
excludes :: S3ClassificationScopeExclusion
$sel:excludes:S3ClassificationScope' :: S3ClassificationScope -> S3ClassificationScopeExclusion
..} = forall a. NFData a => a -> ()
Prelude.rnf S3ClassificationScopeExclusion
excludes