{-# 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.CloudTrail.Types.AdvancedFieldSelector where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AdvancedFieldSelector = AdvancedFieldSelector'
{
AdvancedFieldSelector -> Maybe (NonEmpty Text)
endsWith :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
AdvancedFieldSelector -> Maybe (NonEmpty Text)
notStartsWith :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
AdvancedFieldSelector -> Maybe (NonEmpty Text)
equals :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
AdvancedFieldSelector -> Maybe (NonEmpty Text)
notEquals :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
AdvancedFieldSelector -> Maybe (NonEmpty Text)
notEndsWith :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
AdvancedFieldSelector -> Maybe (NonEmpty Text)
startsWith :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
AdvancedFieldSelector -> Text
field :: Prelude.Text
}
deriving (AdvancedFieldSelector -> AdvancedFieldSelector -> Bool
(AdvancedFieldSelector -> AdvancedFieldSelector -> Bool)
-> (AdvancedFieldSelector -> AdvancedFieldSelector -> Bool)
-> Eq AdvancedFieldSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AdvancedFieldSelector -> AdvancedFieldSelector -> Bool
$c/= :: AdvancedFieldSelector -> AdvancedFieldSelector -> Bool
== :: AdvancedFieldSelector -> AdvancedFieldSelector -> Bool
$c== :: AdvancedFieldSelector -> AdvancedFieldSelector -> Bool
Prelude.Eq, ReadPrec [AdvancedFieldSelector]
ReadPrec AdvancedFieldSelector
Int -> ReadS AdvancedFieldSelector
ReadS [AdvancedFieldSelector]
(Int -> ReadS AdvancedFieldSelector)
-> ReadS [AdvancedFieldSelector]
-> ReadPrec AdvancedFieldSelector
-> ReadPrec [AdvancedFieldSelector]
-> Read AdvancedFieldSelector
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AdvancedFieldSelector]
$creadListPrec :: ReadPrec [AdvancedFieldSelector]
readPrec :: ReadPrec AdvancedFieldSelector
$creadPrec :: ReadPrec AdvancedFieldSelector
readList :: ReadS [AdvancedFieldSelector]
$creadList :: ReadS [AdvancedFieldSelector]
readsPrec :: Int -> ReadS AdvancedFieldSelector
$creadsPrec :: Int -> ReadS AdvancedFieldSelector
Prelude.Read, Int -> AdvancedFieldSelector -> ShowS
[AdvancedFieldSelector] -> ShowS
AdvancedFieldSelector -> String
(Int -> AdvancedFieldSelector -> ShowS)
-> (AdvancedFieldSelector -> String)
-> ([AdvancedFieldSelector] -> ShowS)
-> Show AdvancedFieldSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AdvancedFieldSelector] -> ShowS
$cshowList :: [AdvancedFieldSelector] -> ShowS
show :: AdvancedFieldSelector -> String
$cshow :: AdvancedFieldSelector -> String
showsPrec :: Int -> AdvancedFieldSelector -> ShowS
$cshowsPrec :: Int -> AdvancedFieldSelector -> ShowS
Prelude.Show, (forall x. AdvancedFieldSelector -> Rep AdvancedFieldSelector x)
-> (forall x. Rep AdvancedFieldSelector x -> AdvancedFieldSelector)
-> Generic AdvancedFieldSelector
forall x. Rep AdvancedFieldSelector x -> AdvancedFieldSelector
forall x. AdvancedFieldSelector -> Rep AdvancedFieldSelector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AdvancedFieldSelector x -> AdvancedFieldSelector
$cfrom :: forall x. AdvancedFieldSelector -> Rep AdvancedFieldSelector x
Prelude.Generic)
newAdvancedFieldSelector ::
Prelude.Text ->
AdvancedFieldSelector
newAdvancedFieldSelector :: Text -> AdvancedFieldSelector
newAdvancedFieldSelector Text
pField_ =
AdvancedFieldSelector' :: Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Text
-> AdvancedFieldSelector
AdvancedFieldSelector'
{ $sel:endsWith:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
endsWith = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:notStartsWith:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
notStartsWith = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:equals:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
equals = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:notEquals:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
notEquals = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:notEndsWith:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
notEndsWith = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:startsWith:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
startsWith = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:field:AdvancedFieldSelector' :: Text
field = Text
pField_
}
advancedFieldSelector_endsWith :: Lens.Lens' AdvancedFieldSelector (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
advancedFieldSelector_endsWith :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector
advancedFieldSelector_endsWith = (AdvancedFieldSelector -> Maybe (NonEmpty Text))
-> (AdvancedFieldSelector
-> Maybe (NonEmpty Text) -> AdvancedFieldSelector)
-> Lens
AdvancedFieldSelector
AdvancedFieldSelector
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedFieldSelector' {Maybe (NonEmpty Text)
endsWith :: Maybe (NonEmpty Text)
$sel:endsWith:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
endsWith} -> Maybe (NonEmpty Text)
endsWith) (\s :: AdvancedFieldSelector
s@AdvancedFieldSelector' {} Maybe (NonEmpty Text)
a -> AdvancedFieldSelector
s {$sel:endsWith:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
endsWith = Maybe (NonEmpty Text)
a} :: AdvancedFieldSelector) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector
-> f AdvancedFieldSelector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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 AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
advancedFieldSelector_notStartsWith :: Lens.Lens' AdvancedFieldSelector (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
advancedFieldSelector_notStartsWith :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector
advancedFieldSelector_notStartsWith = (AdvancedFieldSelector -> Maybe (NonEmpty Text))
-> (AdvancedFieldSelector
-> Maybe (NonEmpty Text) -> AdvancedFieldSelector)
-> Lens
AdvancedFieldSelector
AdvancedFieldSelector
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedFieldSelector' {Maybe (NonEmpty Text)
notStartsWith :: Maybe (NonEmpty Text)
$sel:notStartsWith:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
notStartsWith} -> Maybe (NonEmpty Text)
notStartsWith) (\s :: AdvancedFieldSelector
s@AdvancedFieldSelector' {} Maybe (NonEmpty Text)
a -> AdvancedFieldSelector
s {$sel:notStartsWith:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
notStartsWith = Maybe (NonEmpty Text)
a} :: AdvancedFieldSelector) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector
-> f AdvancedFieldSelector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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 AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
advancedFieldSelector_equals :: Lens.Lens' AdvancedFieldSelector (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
advancedFieldSelector_equals :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector
advancedFieldSelector_equals = (AdvancedFieldSelector -> Maybe (NonEmpty Text))
-> (AdvancedFieldSelector
-> Maybe (NonEmpty Text) -> AdvancedFieldSelector)
-> Lens
AdvancedFieldSelector
AdvancedFieldSelector
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedFieldSelector' {Maybe (NonEmpty Text)
equals :: Maybe (NonEmpty Text)
$sel:equals:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
equals} -> Maybe (NonEmpty Text)
equals) (\s :: AdvancedFieldSelector
s@AdvancedFieldSelector' {} Maybe (NonEmpty Text)
a -> AdvancedFieldSelector
s {$sel:equals:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
equals = Maybe (NonEmpty Text)
a} :: AdvancedFieldSelector) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector
-> f AdvancedFieldSelector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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 AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
advancedFieldSelector_notEquals :: Lens.Lens' AdvancedFieldSelector (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
advancedFieldSelector_notEquals :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector
advancedFieldSelector_notEquals = (AdvancedFieldSelector -> Maybe (NonEmpty Text))
-> (AdvancedFieldSelector
-> Maybe (NonEmpty Text) -> AdvancedFieldSelector)
-> Lens
AdvancedFieldSelector
AdvancedFieldSelector
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedFieldSelector' {Maybe (NonEmpty Text)
notEquals :: Maybe (NonEmpty Text)
$sel:notEquals:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
notEquals} -> Maybe (NonEmpty Text)
notEquals) (\s :: AdvancedFieldSelector
s@AdvancedFieldSelector' {} Maybe (NonEmpty Text)
a -> AdvancedFieldSelector
s {$sel:notEquals:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
notEquals = Maybe (NonEmpty Text)
a} :: AdvancedFieldSelector) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector
-> f AdvancedFieldSelector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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 AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
advancedFieldSelector_notEndsWith :: Lens.Lens' AdvancedFieldSelector (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
advancedFieldSelector_notEndsWith :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector
advancedFieldSelector_notEndsWith = (AdvancedFieldSelector -> Maybe (NonEmpty Text))
-> (AdvancedFieldSelector
-> Maybe (NonEmpty Text) -> AdvancedFieldSelector)
-> Lens
AdvancedFieldSelector
AdvancedFieldSelector
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedFieldSelector' {Maybe (NonEmpty Text)
notEndsWith :: Maybe (NonEmpty Text)
$sel:notEndsWith:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
notEndsWith} -> Maybe (NonEmpty Text)
notEndsWith) (\s :: AdvancedFieldSelector
s@AdvancedFieldSelector' {} Maybe (NonEmpty Text)
a -> AdvancedFieldSelector
s {$sel:notEndsWith:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
notEndsWith = Maybe (NonEmpty Text)
a} :: AdvancedFieldSelector) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector
-> f AdvancedFieldSelector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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 AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
advancedFieldSelector_startsWith :: Lens.Lens' AdvancedFieldSelector (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
advancedFieldSelector_startsWith :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector
advancedFieldSelector_startsWith = (AdvancedFieldSelector -> Maybe (NonEmpty Text))
-> (AdvancedFieldSelector
-> Maybe (NonEmpty Text) -> AdvancedFieldSelector)
-> Lens
AdvancedFieldSelector
AdvancedFieldSelector
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedFieldSelector' {Maybe (NonEmpty Text)
startsWith :: Maybe (NonEmpty Text)
$sel:startsWith:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
startsWith} -> Maybe (NonEmpty Text)
startsWith) (\s :: AdvancedFieldSelector
s@AdvancedFieldSelector' {} Maybe (NonEmpty Text)
a -> AdvancedFieldSelector
s {$sel:startsWith:AdvancedFieldSelector' :: Maybe (NonEmpty Text)
startsWith = Maybe (NonEmpty Text)
a} :: AdvancedFieldSelector) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector -> f AdvancedFieldSelector)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> AdvancedFieldSelector
-> f AdvancedFieldSelector
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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 AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
advancedFieldSelector_field :: Lens.Lens' AdvancedFieldSelector Prelude.Text
advancedFieldSelector_field :: (Text -> f Text)
-> AdvancedFieldSelector -> f AdvancedFieldSelector
advancedFieldSelector_field = (AdvancedFieldSelector -> Text)
-> (AdvancedFieldSelector -> Text -> AdvancedFieldSelector)
-> Lens AdvancedFieldSelector AdvancedFieldSelector Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AdvancedFieldSelector' {Text
field :: Text
$sel:field:AdvancedFieldSelector' :: AdvancedFieldSelector -> Text
field} -> Text
field) (\s :: AdvancedFieldSelector
s@AdvancedFieldSelector' {} Text
a -> AdvancedFieldSelector
s {$sel:field:AdvancedFieldSelector' :: Text
field = Text
a} :: AdvancedFieldSelector)
instance Core.FromJSON AdvancedFieldSelector where
parseJSON :: Value -> Parser AdvancedFieldSelector
parseJSON =
String
-> (Object -> Parser AdvancedFieldSelector)
-> Value
-> Parser AdvancedFieldSelector
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AdvancedFieldSelector"
( \Object
x ->
Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Text
-> AdvancedFieldSelector
AdvancedFieldSelector'
(Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Text
-> AdvancedFieldSelector)
-> Parser (Maybe (NonEmpty Text))
-> Parser
(Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Text
-> AdvancedFieldSelector)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndsWith")
Parser
(Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Text
-> AdvancedFieldSelector)
-> Parser (Maybe (NonEmpty Text))
-> Parser
(Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Text
-> AdvancedFieldSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotStartsWith")
Parser
(Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Text
-> AdvancedFieldSelector)
-> Parser (Maybe (NonEmpty Text))
-> Parser
(Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Text
-> AdvancedFieldSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Equals")
Parser
(Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Text
-> AdvancedFieldSelector)
-> Parser (Maybe (NonEmpty Text))
-> Parser
(Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text) -> Text -> AdvancedFieldSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotEquals")
Parser
(Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text) -> Text -> AdvancedFieldSelector)
-> Parser (Maybe (NonEmpty Text))
-> Parser (Maybe (NonEmpty Text) -> Text -> AdvancedFieldSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotEndsWith")
Parser (Maybe (NonEmpty Text) -> Text -> AdvancedFieldSelector)
-> Parser (Maybe (NonEmpty Text))
-> Parser (Text -> AdvancedFieldSelector)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartsWith")
Parser (Text -> AdvancedFieldSelector)
-> Parser Text -> Parser AdvancedFieldSelector
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Field")
)
instance Prelude.Hashable AdvancedFieldSelector
instance Prelude.NFData AdvancedFieldSelector
instance Core.ToJSON AdvancedFieldSelector where
toJSON :: AdvancedFieldSelector -> Value
toJSON AdvancedFieldSelector' {Maybe (NonEmpty Text)
Text
field :: Text
startsWith :: Maybe (NonEmpty Text)
notEndsWith :: Maybe (NonEmpty Text)
notEquals :: Maybe (NonEmpty Text)
equals :: Maybe (NonEmpty Text)
notStartsWith :: Maybe (NonEmpty Text)
endsWith :: Maybe (NonEmpty Text)
$sel:field:AdvancedFieldSelector' :: AdvancedFieldSelector -> Text
$sel:startsWith:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
$sel:notEndsWith:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
$sel:notEquals:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
$sel:equals:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
$sel:notStartsWith:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
$sel:endsWith:AdvancedFieldSelector' :: AdvancedFieldSelector -> Maybe (NonEmpty Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EndsWith" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
endsWith,
(Text
"NotStartsWith" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
notStartsWith,
(Text
"Equals" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
equals,
(Text
"NotEquals" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
notEquals,
(Text
"NotEndsWith" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
notEndsWith,
(Text
"StartsWith" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
startsWith,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Field" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
field)
]
)