{-# 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.Lens as Lens
import Amazonka.MacieV2.Types.SearchResourcesCriteriaBlock
import qualified Amazonka.Prelude as Prelude
data SearchResourcesBucketCriteria = SearchResourcesBucketCriteria'
{
SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
includes :: Prelude.Maybe SearchResourcesCriteriaBlock,
SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
excludes :: Prelude.Maybe SearchResourcesCriteriaBlock
}
deriving (SearchResourcesBucketCriteria
-> SearchResourcesBucketCriteria -> Bool
(SearchResourcesBucketCriteria
-> SearchResourcesBucketCriteria -> Bool)
-> (SearchResourcesBucketCriteria
-> SearchResourcesBucketCriteria -> Bool)
-> Eq SearchResourcesBucketCriteria
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]
(Int -> ReadS SearchResourcesBucketCriteria)
-> ReadS [SearchResourcesBucketCriteria]
-> ReadPrec SearchResourcesBucketCriteria
-> ReadPrec [SearchResourcesBucketCriteria]
-> Read 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
(Int -> SearchResourcesBucketCriteria -> ShowS)
-> (SearchResourcesBucketCriteria -> String)
-> ([SearchResourcesBucketCriteria] -> ShowS)
-> Show SearchResourcesBucketCriteria
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.
SearchResourcesBucketCriteria
-> Rep SearchResourcesBucketCriteria x)
-> (forall x.
Rep SearchResourcesBucketCriteria x
-> SearchResourcesBucketCriteria)
-> Generic SearchResourcesBucketCriteria
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' :: Maybe SearchResourcesCriteriaBlock
-> Maybe SearchResourcesCriteriaBlock
-> SearchResourcesBucketCriteria
SearchResourcesBucketCriteria'
{ $sel:includes:SearchResourcesBucketCriteria' :: Maybe SearchResourcesCriteriaBlock
includes =
Maybe SearchResourcesCriteriaBlock
forall a. Maybe a
Prelude.Nothing,
$sel:excludes:SearchResourcesBucketCriteria' :: Maybe SearchResourcesCriteriaBlock
excludes = Maybe SearchResourcesCriteriaBlock
forall a. Maybe a
Prelude.Nothing
}
searchResourcesBucketCriteria_includes :: Lens.Lens' SearchResourcesBucketCriteria (Prelude.Maybe SearchResourcesCriteriaBlock)
searchResourcesBucketCriteria_includes :: (Maybe SearchResourcesCriteriaBlock
-> f (Maybe SearchResourcesCriteriaBlock))
-> SearchResourcesBucketCriteria -> f SearchResourcesBucketCriteria
searchResourcesBucketCriteria_includes = (SearchResourcesBucketCriteria
-> Maybe SearchResourcesCriteriaBlock)
-> (SearchResourcesBucketCriteria
-> Maybe SearchResourcesCriteriaBlock
-> SearchResourcesBucketCriteria)
-> Lens
SearchResourcesBucketCriteria
SearchResourcesBucketCriteria
(Maybe SearchResourcesCriteriaBlock)
(Maybe SearchResourcesCriteriaBlock)
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)
searchResourcesBucketCriteria_excludes :: Lens.Lens' SearchResourcesBucketCriteria (Prelude.Maybe SearchResourcesCriteriaBlock)
searchResourcesBucketCriteria_excludes :: (Maybe SearchResourcesCriteriaBlock
-> f (Maybe SearchResourcesCriteriaBlock))
-> SearchResourcesBucketCriteria -> f SearchResourcesBucketCriteria
searchResourcesBucketCriteria_excludes = (SearchResourcesBucketCriteria
-> Maybe SearchResourcesCriteriaBlock)
-> (SearchResourcesBucketCriteria
-> Maybe SearchResourcesCriteriaBlock
-> SearchResourcesBucketCriteria)
-> Lens
SearchResourcesBucketCriteria
SearchResourcesBucketCriteria
(Maybe SearchResourcesCriteriaBlock)
(Maybe SearchResourcesCriteriaBlock)
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)
instance
Prelude.Hashable
SearchResourcesBucketCriteria
instance Prelude.NFData SearchResourcesBucketCriteria
instance Core.ToJSON SearchResourcesBucketCriteria where
toJSON :: SearchResourcesBucketCriteria -> Value
toJSON SearchResourcesBucketCriteria' {Maybe SearchResourcesCriteriaBlock
excludes :: Maybe SearchResourcesCriteriaBlock
includes :: Maybe SearchResourcesCriteriaBlock
$sel:excludes:SearchResourcesBucketCriteria' :: SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
$sel:includes:SearchResourcesBucketCriteria' :: SearchResourcesBucketCriteria -> Maybe SearchResourcesCriteriaBlock
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"includes" Text -> SearchResourcesCriteriaBlock -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SearchResourcesCriteriaBlock -> Pair)
-> Maybe SearchResourcesCriteriaBlock -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SearchResourcesCriteriaBlock
includes,
(Text
"excludes" Text -> SearchResourcesCriteriaBlock -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SearchResourcesCriteriaBlock -> Pair)
-> Maybe SearchResourcesCriteriaBlock -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SearchResourcesCriteriaBlock
excludes
]
)