{-# 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.GuardDuty.Types.Condition
-- 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.GuardDuty.Types.Condition 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

-- | Contains information about the condition.
--
-- /See:/ 'newCondition' smart constructor.
data Condition = Condition'
  { -- | Represents the /equal/ condition to be applied to a single field when
    -- querying for findings.
    Condition -> Maybe [Text]
eq :: Prelude.Maybe [Prelude.Text],
    -- | Represents an /equal/ ____ condition to be applied to a single field
    -- when querying for findings.
    Condition -> Maybe [Text]
equals :: Prelude.Maybe [Prelude.Text],
    -- | Represents a /greater than/ condition to be applied to a single field
    -- when querying for findings.
    Condition -> Maybe Integer
greaterThan :: Prelude.Maybe Prelude.Integer,
    -- | Represents a /greater than or equal/ condition to be applied to a single
    -- field when querying for findings.
    Condition -> Maybe Integer
greaterThanOrEqual :: Prelude.Maybe Prelude.Integer,
    -- | Represents a /greater than/ condition to be applied to a single field
    -- when querying for findings.
    Condition -> Maybe Int
gt :: Prelude.Maybe Prelude.Int,
    -- | Represents a /greater than or equal/ condition to be applied to a single
    -- field when querying for findings.
    Condition -> Maybe Int
gte :: Prelude.Maybe Prelude.Int,
    -- | Represents a /less than/ condition to be applied to a single field when
    -- querying for findings.
    Condition -> Maybe Integer
lessThan :: Prelude.Maybe Prelude.Integer,
    -- | Represents a /less than or equal/ condition to be applied to a single
    -- field when querying for findings.
    Condition -> Maybe Integer
lessThanOrEqual :: Prelude.Maybe Prelude.Integer,
    -- | Represents a /less than/ condition to be applied to a single field when
    -- querying for findings.
    Condition -> Maybe Int
lt :: Prelude.Maybe Prelude.Int,
    -- | Represents a /less than or equal/ condition to be applied to a single
    -- field when querying for findings.
    Condition -> Maybe Int
lte :: Prelude.Maybe Prelude.Int,
    -- | Represents the /not equal/ condition to be applied to a single field
    -- when querying for findings.
    Condition -> Maybe [Text]
neq :: Prelude.Maybe [Prelude.Text],
    -- | Represents a /not equal/ ____ condition to be applied to a single field
    -- when querying for findings.
    Condition -> Maybe [Text]
notEquals :: Prelude.Maybe [Prelude.Text]
  }
  deriving (Condition -> Condition -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Condition -> Condition -> Bool
$c/= :: Condition -> Condition -> Bool
== :: Condition -> Condition -> Bool
$c== :: Condition -> Condition -> Bool
Prelude.Eq, ReadPrec [Condition]
ReadPrec Condition
Int -> ReadS Condition
ReadS [Condition]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Condition]
$creadListPrec :: ReadPrec [Condition]
readPrec :: ReadPrec Condition
$creadPrec :: ReadPrec Condition
readList :: ReadS [Condition]
$creadList :: ReadS [Condition]
readsPrec :: Int -> ReadS Condition
$creadsPrec :: Int -> ReadS Condition
Prelude.Read, Int -> Condition -> ShowS
[Condition] -> ShowS
Condition -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Condition] -> ShowS
$cshowList :: [Condition] -> ShowS
show :: Condition -> String
$cshow :: Condition -> String
showsPrec :: Int -> Condition -> ShowS
$cshowsPrec :: Int -> Condition -> ShowS
Prelude.Show, forall x. Rep Condition x -> Condition
forall x. Condition -> Rep Condition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Condition x -> Condition
$cfrom :: forall x. Condition -> Rep Condition x
Prelude.Generic)

-- |
-- Create a value of 'Condition' 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:
--
-- 'eq', 'condition_eq' - Represents the /equal/ condition to be applied to a single field when
-- querying for findings.
--
-- 'equals', 'condition_equals' - Represents an /equal/ ____ condition to be applied to a single field
-- when querying for findings.
--
-- 'greaterThan', 'condition_greaterThan' - Represents a /greater than/ condition to be applied to a single field
-- when querying for findings.
--
-- 'greaterThanOrEqual', 'condition_greaterThanOrEqual' - Represents a /greater than or equal/ condition to be applied to a single
-- field when querying for findings.
--
-- 'gt', 'condition_gt' - Represents a /greater than/ condition to be applied to a single field
-- when querying for findings.
--
-- 'gte', 'condition_gte' - Represents a /greater than or equal/ condition to be applied to a single
-- field when querying for findings.
--
-- 'lessThan', 'condition_lessThan' - Represents a /less than/ condition to be applied to a single field when
-- querying for findings.
--
-- 'lessThanOrEqual', 'condition_lessThanOrEqual' - Represents a /less than or equal/ condition to be applied to a single
-- field when querying for findings.
--
-- 'lt', 'condition_lt' - Represents a /less than/ condition to be applied to a single field when
-- querying for findings.
--
-- 'lte', 'condition_lte' - Represents a /less than or equal/ condition to be applied to a single
-- field when querying for findings.
--
-- 'neq', 'condition_neq' - Represents the /not equal/ condition to be applied to a single field
-- when querying for findings.
--
-- 'notEquals', 'condition_notEquals' - Represents a /not equal/ ____ condition to be applied to a single field
-- when querying for findings.
newCondition ::
  Condition
newCondition :: Condition
newCondition =
  Condition'
    { $sel:eq:Condition' :: Maybe [Text]
eq = forall a. Maybe a
Prelude.Nothing,
      $sel:equals:Condition' :: Maybe [Text]
equals = forall a. Maybe a
Prelude.Nothing,
      $sel:greaterThan:Condition' :: Maybe Integer
greaterThan = forall a. Maybe a
Prelude.Nothing,
      $sel:greaterThanOrEqual:Condition' :: Maybe Integer
greaterThanOrEqual = forall a. Maybe a
Prelude.Nothing,
      $sel:gt:Condition' :: Maybe Int
gt = forall a. Maybe a
Prelude.Nothing,
      $sel:gte:Condition' :: Maybe Int
gte = forall a. Maybe a
Prelude.Nothing,
      $sel:lessThan:Condition' :: Maybe Integer
lessThan = forall a. Maybe a
Prelude.Nothing,
      $sel:lessThanOrEqual:Condition' :: Maybe Integer
lessThanOrEqual = forall a. Maybe a
Prelude.Nothing,
      $sel:lt:Condition' :: Maybe Int
lt = forall a. Maybe a
Prelude.Nothing,
      $sel:lte:Condition' :: Maybe Int
lte = forall a. Maybe a
Prelude.Nothing,
      $sel:neq:Condition' :: Maybe [Text]
neq = forall a. Maybe a
Prelude.Nothing,
      $sel:notEquals:Condition' :: Maybe [Text]
notEquals = forall a. Maybe a
Prelude.Nothing
    }

-- | Represents the /equal/ condition to be applied to a single field when
-- querying for findings.
condition_eq :: Lens.Lens' Condition (Prelude.Maybe [Prelude.Text])
condition_eq :: Lens' Condition (Maybe [Text])
condition_eq = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe [Text]
eq :: Maybe [Text]
$sel:eq:Condition' :: Condition -> Maybe [Text]
eq} -> Maybe [Text]
eq) (\s :: Condition
s@Condition' {} Maybe [Text]
a -> Condition
s {$sel:eq:Condition' :: Maybe [Text]
eq = Maybe [Text]
a} :: Condition) 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

-- | Represents an /equal/ ____ condition to be applied to a single field
-- when querying for findings.
condition_equals :: Lens.Lens' Condition (Prelude.Maybe [Prelude.Text])
condition_equals :: Lens' Condition (Maybe [Text])
condition_equals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe [Text]
equals :: Maybe [Text]
$sel:equals:Condition' :: Condition -> Maybe [Text]
equals} -> Maybe [Text]
equals) (\s :: Condition
s@Condition' {} Maybe [Text]
a -> Condition
s {$sel:equals:Condition' :: Maybe [Text]
equals = Maybe [Text]
a} :: Condition) 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

-- | Represents a /greater than/ condition to be applied to a single field
-- when querying for findings.
condition_greaterThan :: Lens.Lens' Condition (Prelude.Maybe Prelude.Integer)
condition_greaterThan :: Lens' Condition (Maybe Integer)
condition_greaterThan = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe Integer
greaterThan :: Maybe Integer
$sel:greaterThan:Condition' :: Condition -> Maybe Integer
greaterThan} -> Maybe Integer
greaterThan) (\s :: Condition
s@Condition' {} Maybe Integer
a -> Condition
s {$sel:greaterThan:Condition' :: Maybe Integer
greaterThan = Maybe Integer
a} :: Condition)

-- | Represents a /greater than or equal/ condition to be applied to a single
-- field when querying for findings.
condition_greaterThanOrEqual :: Lens.Lens' Condition (Prelude.Maybe Prelude.Integer)
condition_greaterThanOrEqual :: Lens' Condition (Maybe Integer)
condition_greaterThanOrEqual = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe Integer
greaterThanOrEqual :: Maybe Integer
$sel:greaterThanOrEqual:Condition' :: Condition -> Maybe Integer
greaterThanOrEqual} -> Maybe Integer
greaterThanOrEqual) (\s :: Condition
s@Condition' {} Maybe Integer
a -> Condition
s {$sel:greaterThanOrEqual:Condition' :: Maybe Integer
greaterThanOrEqual = Maybe Integer
a} :: Condition)

-- | Represents a /greater than/ condition to be applied to a single field
-- when querying for findings.
condition_gt :: Lens.Lens' Condition (Prelude.Maybe Prelude.Int)
condition_gt :: Lens' Condition (Maybe Int)
condition_gt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe Int
gt :: Maybe Int
$sel:gt:Condition' :: Condition -> Maybe Int
gt} -> Maybe Int
gt) (\s :: Condition
s@Condition' {} Maybe Int
a -> Condition
s {$sel:gt:Condition' :: Maybe Int
gt = Maybe Int
a} :: Condition)

-- | Represents a /greater than or equal/ condition to be applied to a single
-- field when querying for findings.
condition_gte :: Lens.Lens' Condition (Prelude.Maybe Prelude.Int)
condition_gte :: Lens' Condition (Maybe Int)
condition_gte = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe Int
gte :: Maybe Int
$sel:gte:Condition' :: Condition -> Maybe Int
gte} -> Maybe Int
gte) (\s :: Condition
s@Condition' {} Maybe Int
a -> Condition
s {$sel:gte:Condition' :: Maybe Int
gte = Maybe Int
a} :: Condition)

-- | Represents a /less than/ condition to be applied to a single field when
-- querying for findings.
condition_lessThan :: Lens.Lens' Condition (Prelude.Maybe Prelude.Integer)
condition_lessThan :: Lens' Condition (Maybe Integer)
condition_lessThan = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe Integer
lessThan :: Maybe Integer
$sel:lessThan:Condition' :: Condition -> Maybe Integer
lessThan} -> Maybe Integer
lessThan) (\s :: Condition
s@Condition' {} Maybe Integer
a -> Condition
s {$sel:lessThan:Condition' :: Maybe Integer
lessThan = Maybe Integer
a} :: Condition)

-- | Represents a /less than or equal/ condition to be applied to a single
-- field when querying for findings.
condition_lessThanOrEqual :: Lens.Lens' Condition (Prelude.Maybe Prelude.Integer)
condition_lessThanOrEqual :: Lens' Condition (Maybe Integer)
condition_lessThanOrEqual = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe Integer
lessThanOrEqual :: Maybe Integer
$sel:lessThanOrEqual:Condition' :: Condition -> Maybe Integer
lessThanOrEqual} -> Maybe Integer
lessThanOrEqual) (\s :: Condition
s@Condition' {} Maybe Integer
a -> Condition
s {$sel:lessThanOrEqual:Condition' :: Maybe Integer
lessThanOrEqual = Maybe Integer
a} :: Condition)

-- | Represents a /less than/ condition to be applied to a single field when
-- querying for findings.
condition_lt :: Lens.Lens' Condition (Prelude.Maybe Prelude.Int)
condition_lt :: Lens' Condition (Maybe Int)
condition_lt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe Int
lt :: Maybe Int
$sel:lt:Condition' :: Condition -> Maybe Int
lt} -> Maybe Int
lt) (\s :: Condition
s@Condition' {} Maybe Int
a -> Condition
s {$sel:lt:Condition' :: Maybe Int
lt = Maybe Int
a} :: Condition)

-- | Represents a /less than or equal/ condition to be applied to a single
-- field when querying for findings.
condition_lte :: Lens.Lens' Condition (Prelude.Maybe Prelude.Int)
condition_lte :: Lens' Condition (Maybe Int)
condition_lte = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe Int
lte :: Maybe Int
$sel:lte:Condition' :: Condition -> Maybe Int
lte} -> Maybe Int
lte) (\s :: Condition
s@Condition' {} Maybe Int
a -> Condition
s {$sel:lte:Condition' :: Maybe Int
lte = Maybe Int
a} :: Condition)

-- | Represents the /not equal/ condition to be applied to a single field
-- when querying for findings.
condition_neq :: Lens.Lens' Condition (Prelude.Maybe [Prelude.Text])
condition_neq :: Lens' Condition (Maybe [Text])
condition_neq = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe [Text]
neq :: Maybe [Text]
$sel:neq:Condition' :: Condition -> Maybe [Text]
neq} -> Maybe [Text]
neq) (\s :: Condition
s@Condition' {} Maybe [Text]
a -> Condition
s {$sel:neq:Condition' :: Maybe [Text]
neq = Maybe [Text]
a} :: Condition) 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

-- | Represents a /not equal/ ____ condition to be applied to a single field
-- when querying for findings.
condition_notEquals :: Lens.Lens' Condition (Prelude.Maybe [Prelude.Text])
condition_notEquals :: Lens' Condition (Maybe [Text])
condition_notEquals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Condition' {Maybe [Text]
notEquals :: Maybe [Text]
$sel:notEquals:Condition' :: Condition -> Maybe [Text]
notEquals} -> Maybe [Text]
notEquals) (\s :: Condition
s@Condition' {} Maybe [Text]
a -> Condition
s {$sel:notEquals:Condition' :: Maybe [Text]
notEquals = Maybe [Text]
a} :: Condition) 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 Condition where
  parseJSON :: Value -> Parser Condition
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Condition"
      ( \Object
x ->
          Maybe [Text]
-> Maybe [Text]
-> Maybe Integer
-> Maybe Integer
-> Maybe Int
-> Maybe Int
-> Maybe Integer
-> Maybe Integer
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> Maybe [Text]
-> Condition
Condition'
            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
"equals" 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
"greaterThan")
            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
"greaterThanOrEqual")
            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
"lessThan")
            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
"lessThanOrEqual")
            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)
            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
"notEquals" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable Condition where
  hashWithSalt :: Int -> Condition -> Int
hashWithSalt Int
_salt Condition' {Maybe Int
Maybe Integer
Maybe [Text]
notEquals :: Maybe [Text]
neq :: Maybe [Text]
lte :: Maybe Int
lt :: Maybe Int
lessThanOrEqual :: Maybe Integer
lessThan :: Maybe Integer
gte :: Maybe Int
gt :: Maybe Int
greaterThanOrEqual :: Maybe Integer
greaterThan :: Maybe Integer
equals :: Maybe [Text]
eq :: Maybe [Text]
$sel:notEquals:Condition' :: Condition -> Maybe [Text]
$sel:neq:Condition' :: Condition -> Maybe [Text]
$sel:lte:Condition' :: Condition -> Maybe Int
$sel:lt:Condition' :: Condition -> Maybe Int
$sel:lessThanOrEqual:Condition' :: Condition -> Maybe Integer
$sel:lessThan:Condition' :: Condition -> Maybe Integer
$sel:gte:Condition' :: Condition -> Maybe Int
$sel:gt:Condition' :: Condition -> Maybe Int
$sel:greaterThanOrEqual:Condition' :: Condition -> Maybe Integer
$sel:greaterThan:Condition' :: Condition -> Maybe Integer
$sel:equals:Condition' :: Condition -> Maybe [Text]
$sel:eq:Condition' :: Condition -> 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]
equals
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
greaterThan
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
greaterThanOrEqual
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
gt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
gte
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
lessThan
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
lessThanOrEqual
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
lt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
lte
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
neq
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
notEquals

instance Prelude.NFData Condition where
  rnf :: Condition -> ()
rnf Condition' {Maybe Int
Maybe Integer
Maybe [Text]
notEquals :: Maybe [Text]
neq :: Maybe [Text]
lte :: Maybe Int
lt :: Maybe Int
lessThanOrEqual :: Maybe Integer
lessThan :: Maybe Integer
gte :: Maybe Int
gt :: Maybe Int
greaterThanOrEqual :: Maybe Integer
greaterThan :: Maybe Integer
equals :: Maybe [Text]
eq :: Maybe [Text]
$sel:notEquals:Condition' :: Condition -> Maybe [Text]
$sel:neq:Condition' :: Condition -> Maybe [Text]
$sel:lte:Condition' :: Condition -> Maybe Int
$sel:lt:Condition' :: Condition -> Maybe Int
$sel:lessThanOrEqual:Condition' :: Condition -> Maybe Integer
$sel:lessThan:Condition' :: Condition -> Maybe Integer
$sel:gte:Condition' :: Condition -> Maybe Int
$sel:gt:Condition' :: Condition -> Maybe Int
$sel:greaterThanOrEqual:Condition' :: Condition -> Maybe Integer
$sel:greaterThan:Condition' :: Condition -> Maybe Integer
$sel:equals:Condition' :: Condition -> Maybe [Text]
$sel:eq:Condition' :: Condition -> 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]
equals
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
greaterThan
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
greaterThanOrEqual
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
gt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
gte
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
lessThan
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
lessThanOrEqual
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
lt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
lte
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
neq
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
notEquals

instance Data.ToJSON Condition where
  toJSON :: Condition -> Value
toJSON Condition' {Maybe Int
Maybe Integer
Maybe [Text]
notEquals :: Maybe [Text]
neq :: Maybe [Text]
lte :: Maybe Int
lt :: Maybe Int
lessThanOrEqual :: Maybe Integer
lessThan :: Maybe Integer
gte :: Maybe Int
gt :: Maybe Int
greaterThanOrEqual :: Maybe Integer
greaterThan :: Maybe Integer
equals :: Maybe [Text]
eq :: Maybe [Text]
$sel:notEquals:Condition' :: Condition -> Maybe [Text]
$sel:neq:Condition' :: Condition -> Maybe [Text]
$sel:lte:Condition' :: Condition -> Maybe Int
$sel:lt:Condition' :: Condition -> Maybe Int
$sel:lessThanOrEqual:Condition' :: Condition -> Maybe Integer
$sel:lessThan:Condition' :: Condition -> Maybe Integer
$sel:gte:Condition' :: Condition -> Maybe Int
$sel:gt:Condition' :: Condition -> Maybe Int
$sel:greaterThanOrEqual:Condition' :: Condition -> Maybe Integer
$sel:greaterThan:Condition' :: Condition -> Maybe Integer
$sel:equals:Condition' :: Condition -> Maybe [Text]
$sel:eq:Condition' :: Condition -> 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
"equals" 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]
equals,
            (Key
"greaterThan" 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
greaterThan,
            (Key
"greaterThanOrEqual" 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
greaterThanOrEqual,
            (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 Int
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 Int
gte,
            (Key
"lessThan" 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
lessThan,
            (Key
"lessThanOrEqual" 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
lessThanOrEqual,
            (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 Int
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 Int
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,
            (Key
"notEquals" 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]
notEquals
          ]
      )