{-# 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.SearchResourcesBucketCriteria 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.SearchResourcesCriteriaBlock
import qualified Amazonka.Prelude as Prelude
data SearchResourcesBucketCriteria = SearchResourcesBucketCriteria'
{
SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
excludes :: Prelude.Maybe SearchResourcesCriteriaBlock,
SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
includes :: Prelude.Maybe SearchResourcesCriteriaBlock
}
deriving (SearchResourcesBucketCriteria
-> SearchResourcesBucketCriteria -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchResourcesBucketCriteria
-> SearchResourcesBucketCriteria -> Bool
$c/= :: SearchResourcesBucketCriteria
-> SearchResourcesBucketCriteria -> Bool
== :: SearchResourcesBucketCriteria
-> SearchResourcesBucketCriteria -> Bool
$c== :: SearchResourcesBucketCriteria
-> SearchResourcesBucketCriteria -> Bool
Prelude.Eq, ReadPrec [SearchResourcesBucketCriteria]
ReadPrec SearchResourcesBucketCriteria
Int -> ReadS SearchResourcesBucketCriteria
ReadS [SearchResourcesBucketCriteria]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchResourcesBucketCriteria]
$creadListPrec :: ReadPrec [SearchResourcesBucketCriteria]
readPrec :: ReadPrec SearchResourcesBucketCriteria
$creadPrec :: ReadPrec SearchResourcesBucketCriteria
readList :: ReadS [SearchResourcesBucketCriteria]
$creadList :: ReadS [SearchResourcesBucketCriteria]
readsPrec :: Int -> ReadS SearchResourcesBucketCriteria
$creadsPrec :: Int -> ReadS SearchResourcesBucketCriteria
Prelude.Read, Int -> SearchResourcesBucketCriteria -> ShowS
[SearchResourcesBucketCriteria] -> ShowS
SearchResourcesBucketCriteria -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchResourcesBucketCriteria] -> ShowS
$cshowList :: [SearchResourcesBucketCriteria] -> ShowS
show :: SearchResourcesBucketCriteria -> String
$cshow :: SearchResourcesBucketCriteria -> String
showsPrec :: Int -> SearchResourcesBucketCriteria -> ShowS
$cshowsPrec :: Int -> SearchResourcesBucketCriteria -> ShowS
Prelude.Show, forall x.
Rep SearchResourcesBucketCriteria x
-> SearchResourcesBucketCriteria
forall x.
SearchResourcesBucketCriteria
-> Rep SearchResourcesBucketCriteria x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SearchResourcesBucketCriteria x
-> SearchResourcesBucketCriteria
$cfrom :: forall x.
SearchResourcesBucketCriteria
-> Rep SearchResourcesBucketCriteria x
Prelude.Generic)
newSearchResourcesBucketCriteria ::
SearchResourcesBucketCriteria
newSearchResourcesBucketCriteria :: SearchResourcesBucketCriteria
newSearchResourcesBucketCriteria =
SearchResourcesBucketCriteria'
{ $sel:excludes:SearchResourcesBucketCriteria' :: Maybe SearchResourcesCriteriaBlock
excludes =
forall a. Maybe a
Prelude.Nothing,
$sel:includes:SearchResourcesBucketCriteria' :: Maybe SearchResourcesCriteriaBlock
includes = forall a. Maybe a
Prelude.Nothing
}
searchResourcesBucketCriteria_excludes :: Lens.Lens' SearchResourcesBucketCriteria (Prelude.Maybe SearchResourcesCriteriaBlock)
searchResourcesBucketCriteria_excludes :: Lens'
SearchResourcesBucketCriteria (Maybe SearchResourcesCriteriaBlock)
searchResourcesBucketCriteria_excludes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchResourcesBucketCriteria' {Maybe SearchResourcesCriteriaBlock
excludes :: Maybe SearchResourcesCriteriaBlock
$sel:excludes:SearchResourcesBucketCriteria' :: SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
excludes} -> Maybe SearchResourcesCriteriaBlock
excludes) (\s :: SearchResourcesBucketCriteria
s@SearchResourcesBucketCriteria' {} Maybe SearchResourcesCriteriaBlock
a -> SearchResourcesBucketCriteria
s {$sel:excludes:SearchResourcesBucketCriteria' :: Maybe SearchResourcesCriteriaBlock
excludes = Maybe SearchResourcesCriteriaBlock
a} :: SearchResourcesBucketCriteria)
searchResourcesBucketCriteria_includes :: Lens.Lens' SearchResourcesBucketCriteria (Prelude.Maybe SearchResourcesCriteriaBlock)
searchResourcesBucketCriteria_includes :: Lens'
SearchResourcesBucketCriteria (Maybe SearchResourcesCriteriaBlock)
searchResourcesBucketCriteria_includes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchResourcesBucketCriteria' {Maybe SearchResourcesCriteriaBlock
includes :: Maybe SearchResourcesCriteriaBlock
$sel:includes:SearchResourcesBucketCriteria' :: SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
includes} -> Maybe SearchResourcesCriteriaBlock
includes) (\s :: SearchResourcesBucketCriteria
s@SearchResourcesBucketCriteria' {} Maybe SearchResourcesCriteriaBlock
a -> SearchResourcesBucketCriteria
s {$sel:includes:SearchResourcesBucketCriteria' :: Maybe SearchResourcesCriteriaBlock
includes = Maybe SearchResourcesCriteriaBlock
a} :: SearchResourcesBucketCriteria)
instance
Prelude.Hashable
SearchResourcesBucketCriteria
where
hashWithSalt :: Int -> SearchResourcesBucketCriteria -> Int
hashWithSalt Int
_salt SearchResourcesBucketCriteria' {Maybe SearchResourcesCriteriaBlock
includes :: Maybe SearchResourcesCriteriaBlock
excludes :: Maybe SearchResourcesCriteriaBlock
$sel:includes:SearchResourcesBucketCriteria' :: SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
$sel:excludes:SearchResourcesBucketCriteria' :: SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SearchResourcesCriteriaBlock
excludes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SearchResourcesCriteriaBlock
includes
instance Prelude.NFData SearchResourcesBucketCriteria where
rnf :: SearchResourcesBucketCriteria -> ()
rnf SearchResourcesBucketCriteria' {Maybe SearchResourcesCriteriaBlock
includes :: Maybe SearchResourcesCriteriaBlock
excludes :: Maybe SearchResourcesCriteriaBlock
$sel:includes:SearchResourcesBucketCriteria' :: SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
$sel:excludes:SearchResourcesBucketCriteria' :: SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe SearchResourcesCriteriaBlock
excludes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SearchResourcesCriteriaBlock
includes
instance Data.ToJSON SearchResourcesBucketCriteria where
toJSON :: SearchResourcesBucketCriteria -> Value
toJSON SearchResourcesBucketCriteria' {Maybe SearchResourcesCriteriaBlock
includes :: Maybe SearchResourcesCriteriaBlock
excludes :: Maybe SearchResourcesCriteriaBlock
$sel:includes:SearchResourcesBucketCriteria' :: SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
$sel:excludes:SearchResourcesBucketCriteria' :: SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"excludes" 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 SearchResourcesCriteriaBlock
excludes,
(Key
"includes" 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 SearchResourcesCriteriaBlock
includes
]
)