{-# 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.CriterionAdditionalProperties 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
data CriterionAdditionalProperties = CriterionAdditionalProperties'
{
CriterionAdditionalProperties -> Maybe [Text]
eq :: Prelude.Maybe [Prelude.Text],
CriterionAdditionalProperties -> Maybe [Text]
eqExactMatch :: Prelude.Maybe [Prelude.Text],
CriterionAdditionalProperties -> Maybe Integer
gt :: Prelude.Maybe Prelude.Integer,
CriterionAdditionalProperties -> Maybe Integer
gte :: Prelude.Maybe Prelude.Integer,
CriterionAdditionalProperties -> Maybe Integer
lt :: Prelude.Maybe Prelude.Integer,
CriterionAdditionalProperties -> Maybe Integer
lte :: Prelude.Maybe Prelude.Integer,
CriterionAdditionalProperties -> Maybe [Text]
neq :: Prelude.Maybe [Prelude.Text]
}
deriving (CriterionAdditionalProperties
-> CriterionAdditionalProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CriterionAdditionalProperties
-> CriterionAdditionalProperties -> Bool
$c/= :: CriterionAdditionalProperties
-> CriterionAdditionalProperties -> Bool
== :: CriterionAdditionalProperties
-> CriterionAdditionalProperties -> Bool
$c== :: CriterionAdditionalProperties
-> CriterionAdditionalProperties -> Bool
Prelude.Eq, ReadPrec [CriterionAdditionalProperties]
ReadPrec CriterionAdditionalProperties
Int -> ReadS CriterionAdditionalProperties
ReadS [CriterionAdditionalProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CriterionAdditionalProperties]
$creadListPrec :: ReadPrec [CriterionAdditionalProperties]
readPrec :: ReadPrec CriterionAdditionalProperties
$creadPrec :: ReadPrec CriterionAdditionalProperties
readList :: ReadS [CriterionAdditionalProperties]
$creadList :: ReadS [CriterionAdditionalProperties]
readsPrec :: Int -> ReadS CriterionAdditionalProperties
$creadsPrec :: Int -> ReadS CriterionAdditionalProperties
Prelude.Read, Int -> CriterionAdditionalProperties -> ShowS
[CriterionAdditionalProperties] -> ShowS
CriterionAdditionalProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CriterionAdditionalProperties] -> ShowS
$cshowList :: [CriterionAdditionalProperties] -> ShowS
show :: CriterionAdditionalProperties -> String
$cshow :: CriterionAdditionalProperties -> String
showsPrec :: Int -> CriterionAdditionalProperties -> ShowS
$cshowsPrec :: Int -> CriterionAdditionalProperties -> ShowS
Prelude.Show, forall x.
Rep CriterionAdditionalProperties x
-> CriterionAdditionalProperties
forall x.
CriterionAdditionalProperties
-> Rep CriterionAdditionalProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CriterionAdditionalProperties x
-> CriterionAdditionalProperties
$cfrom :: forall x.
CriterionAdditionalProperties
-> Rep CriterionAdditionalProperties x
Prelude.Generic)
newCriterionAdditionalProperties ::
CriterionAdditionalProperties
newCriterionAdditionalProperties :: CriterionAdditionalProperties
newCriterionAdditionalProperties =
CriterionAdditionalProperties'
{ $sel:eq:CriterionAdditionalProperties' :: Maybe [Text]
eq =
forall a. Maybe a
Prelude.Nothing,
$sel:eqExactMatch:CriterionAdditionalProperties' :: Maybe [Text]
eqExactMatch = forall a. Maybe a
Prelude.Nothing,
$sel:gt:CriterionAdditionalProperties' :: Maybe Integer
gt = forall a. Maybe a
Prelude.Nothing,
$sel:gte:CriterionAdditionalProperties' :: Maybe Integer
gte = forall a. Maybe a
Prelude.Nothing,
$sel:lt:CriterionAdditionalProperties' :: Maybe Integer
lt = forall a. Maybe a
Prelude.Nothing,
$sel:lte:CriterionAdditionalProperties' :: Maybe Integer
lte = forall a. Maybe a
Prelude.Nothing,
$sel:neq:CriterionAdditionalProperties' :: Maybe [Text]
neq = forall a. Maybe a
Prelude.Nothing
}
criterionAdditionalProperties_eq :: Lens.Lens' CriterionAdditionalProperties (Prelude.Maybe [Prelude.Text])
criterionAdditionalProperties_eq :: Lens' CriterionAdditionalProperties (Maybe [Text])
criterionAdditionalProperties_eq = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CriterionAdditionalProperties' {Maybe [Text]
eq :: Maybe [Text]
$sel:eq:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
eq} -> Maybe [Text]
eq) (\s :: CriterionAdditionalProperties
s@CriterionAdditionalProperties' {} Maybe [Text]
a -> CriterionAdditionalProperties
s {$sel:eq:CriterionAdditionalProperties' :: Maybe [Text]
eq = Maybe [Text]
a} :: CriterionAdditionalProperties) 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
criterionAdditionalProperties_eqExactMatch :: Lens.Lens' CriterionAdditionalProperties (Prelude.Maybe [Prelude.Text])
criterionAdditionalProperties_eqExactMatch :: Lens' CriterionAdditionalProperties (Maybe [Text])
criterionAdditionalProperties_eqExactMatch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CriterionAdditionalProperties' {Maybe [Text]
eqExactMatch :: Maybe [Text]
$sel:eqExactMatch:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
eqExactMatch} -> Maybe [Text]
eqExactMatch) (\s :: CriterionAdditionalProperties
s@CriterionAdditionalProperties' {} Maybe [Text]
a -> CriterionAdditionalProperties
s {$sel:eqExactMatch:CriterionAdditionalProperties' :: Maybe [Text]
eqExactMatch = Maybe [Text]
a} :: CriterionAdditionalProperties) 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
criterionAdditionalProperties_gt :: Lens.Lens' CriterionAdditionalProperties (Prelude.Maybe Prelude.Integer)
criterionAdditionalProperties_gt :: Lens' CriterionAdditionalProperties (Maybe Integer)
criterionAdditionalProperties_gt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CriterionAdditionalProperties' {Maybe Integer
gt :: Maybe Integer
$sel:gt:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
gt} -> Maybe Integer
gt) (\s :: CriterionAdditionalProperties
s@CriterionAdditionalProperties' {} Maybe Integer
a -> CriterionAdditionalProperties
s {$sel:gt:CriterionAdditionalProperties' :: Maybe Integer
gt = Maybe Integer
a} :: CriterionAdditionalProperties)
criterionAdditionalProperties_gte :: Lens.Lens' CriterionAdditionalProperties (Prelude.Maybe Prelude.Integer)
criterionAdditionalProperties_gte :: Lens' CriterionAdditionalProperties (Maybe Integer)
criterionAdditionalProperties_gte = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CriterionAdditionalProperties' {Maybe Integer
gte :: Maybe Integer
$sel:gte:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
gte} -> Maybe Integer
gte) (\s :: CriterionAdditionalProperties
s@CriterionAdditionalProperties' {} Maybe Integer
a -> CriterionAdditionalProperties
s {$sel:gte:CriterionAdditionalProperties' :: Maybe Integer
gte = Maybe Integer
a} :: CriterionAdditionalProperties)
criterionAdditionalProperties_lt :: Lens.Lens' CriterionAdditionalProperties (Prelude.Maybe Prelude.Integer)
criterionAdditionalProperties_lt :: Lens' CriterionAdditionalProperties (Maybe Integer)
criterionAdditionalProperties_lt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CriterionAdditionalProperties' {Maybe Integer
lt :: Maybe Integer
$sel:lt:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
lt} -> Maybe Integer
lt) (\s :: CriterionAdditionalProperties
s@CriterionAdditionalProperties' {} Maybe Integer
a -> CriterionAdditionalProperties
s {$sel:lt:CriterionAdditionalProperties' :: Maybe Integer
lt = Maybe Integer
a} :: CriterionAdditionalProperties)
criterionAdditionalProperties_lte :: Lens.Lens' CriterionAdditionalProperties (Prelude.Maybe Prelude.Integer)
criterionAdditionalProperties_lte :: Lens' CriterionAdditionalProperties (Maybe Integer)
criterionAdditionalProperties_lte = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CriterionAdditionalProperties' {Maybe Integer
lte :: Maybe Integer
$sel:lte:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
lte} -> Maybe Integer
lte) (\s :: CriterionAdditionalProperties
s@CriterionAdditionalProperties' {} Maybe Integer
a -> CriterionAdditionalProperties
s {$sel:lte:CriterionAdditionalProperties' :: Maybe Integer
lte = Maybe Integer
a} :: CriterionAdditionalProperties)
criterionAdditionalProperties_neq :: Lens.Lens' CriterionAdditionalProperties (Prelude.Maybe [Prelude.Text])
criterionAdditionalProperties_neq :: Lens' CriterionAdditionalProperties (Maybe [Text])
criterionAdditionalProperties_neq = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CriterionAdditionalProperties' {Maybe [Text]
neq :: Maybe [Text]
$sel:neq:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
neq} -> Maybe [Text]
neq) (\s :: CriterionAdditionalProperties
s@CriterionAdditionalProperties' {} Maybe [Text]
a -> CriterionAdditionalProperties
s {$sel:neq:CriterionAdditionalProperties' :: Maybe [Text]
neq = Maybe [Text]
a} :: CriterionAdditionalProperties) 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 CriterionAdditionalProperties where
parseJSON :: Value -> Parser CriterionAdditionalProperties
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CriterionAdditionalProperties"
( \Object
x ->
Maybe [Text]
-> Maybe [Text]
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe [Text]
-> CriterionAdditionalProperties
CriterionAdditionalProperties'
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
"eq" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"eqExactMatch" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"gt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"gte")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"lt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"lte")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"neq" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
CriterionAdditionalProperties
where
hashWithSalt :: Int -> CriterionAdditionalProperties -> Int
hashWithSalt Int
_salt CriterionAdditionalProperties' {Maybe Integer
Maybe [Text]
neq :: Maybe [Text]
lte :: Maybe Integer
lt :: Maybe Integer
gte :: Maybe Integer
gt :: Maybe Integer
eqExactMatch :: Maybe [Text]
eq :: Maybe [Text]
$sel:neq:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
$sel:lte:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:lt:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:gte:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:gt:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:eqExactMatch:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
$sel:eq:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
eq
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
eqExactMatch
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
gt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
gte
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
lt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
lte
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
neq
instance Prelude.NFData CriterionAdditionalProperties where
rnf :: CriterionAdditionalProperties -> ()
rnf CriterionAdditionalProperties' {Maybe Integer
Maybe [Text]
neq :: Maybe [Text]
lte :: Maybe Integer
lt :: Maybe Integer
gte :: Maybe Integer
gt :: Maybe Integer
eqExactMatch :: Maybe [Text]
eq :: Maybe [Text]
$sel:neq:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
$sel:lte:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:lt:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:gte:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:gt:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:eqExactMatch:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
$sel:eq:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
eq
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
eqExactMatch
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
gt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
gte
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
lt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
lte
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
neq
instance Data.ToJSON CriterionAdditionalProperties where
toJSON :: CriterionAdditionalProperties -> Value
toJSON CriterionAdditionalProperties' {Maybe Integer
Maybe [Text]
neq :: Maybe [Text]
lte :: Maybe Integer
lt :: Maybe Integer
gte :: Maybe Integer
gt :: Maybe Integer
eqExactMatch :: Maybe [Text]
eq :: Maybe [Text]
$sel:neq:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
$sel:lte:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:lt:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:gte:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:gt:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe Integer
$sel:eqExactMatch:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
$sel:eq:CriterionAdditionalProperties' :: CriterionAdditionalProperties -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"eq" 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]
eq,
(Key
"eqExactMatch" 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]
eqExactMatch,
(Key
"gt" 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 Integer
gt,
(Key
"gte" 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 Integer
gte,
(Key
"lt" 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 Integer
lt,
(Key
"lte" 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 Integer
lte,
(Key
"neq" 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]
neq
]
)