{-# 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.QuickSight.Types.GroupSearchFilter 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
import Amazonka.QuickSight.Types.GroupFilterAttribute
import Amazonka.QuickSight.Types.GroupFilterOperator
data GroupSearchFilter = GroupSearchFilter'
{
GroupSearchFilter -> GroupFilterOperator
operator :: GroupFilterOperator,
GroupSearchFilter -> GroupFilterAttribute
name :: GroupFilterAttribute,
GroupSearchFilter -> Text
value :: Prelude.Text
}
deriving (GroupSearchFilter -> GroupSearchFilter -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GroupSearchFilter -> GroupSearchFilter -> Bool
$c/= :: GroupSearchFilter -> GroupSearchFilter -> Bool
== :: GroupSearchFilter -> GroupSearchFilter -> Bool
$c== :: GroupSearchFilter -> GroupSearchFilter -> Bool
Prelude.Eq, ReadPrec [GroupSearchFilter]
ReadPrec GroupSearchFilter
Int -> ReadS GroupSearchFilter
ReadS [GroupSearchFilter]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GroupSearchFilter]
$creadListPrec :: ReadPrec [GroupSearchFilter]
readPrec :: ReadPrec GroupSearchFilter
$creadPrec :: ReadPrec GroupSearchFilter
readList :: ReadS [GroupSearchFilter]
$creadList :: ReadS [GroupSearchFilter]
readsPrec :: Int -> ReadS GroupSearchFilter
$creadsPrec :: Int -> ReadS GroupSearchFilter
Prelude.Read, Int -> GroupSearchFilter -> ShowS
[GroupSearchFilter] -> ShowS
GroupSearchFilter -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GroupSearchFilter] -> ShowS
$cshowList :: [GroupSearchFilter] -> ShowS
show :: GroupSearchFilter -> String
$cshow :: GroupSearchFilter -> String
showsPrec :: Int -> GroupSearchFilter -> ShowS
$cshowsPrec :: Int -> GroupSearchFilter -> ShowS
Prelude.Show, forall x. Rep GroupSearchFilter x -> GroupSearchFilter
forall x. GroupSearchFilter -> Rep GroupSearchFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GroupSearchFilter x -> GroupSearchFilter
$cfrom :: forall x. GroupSearchFilter -> Rep GroupSearchFilter x
Prelude.Generic)
newGroupSearchFilter ::
GroupFilterOperator ->
GroupFilterAttribute ->
Prelude.Text ->
GroupSearchFilter
newGroupSearchFilter :: GroupFilterOperator
-> GroupFilterAttribute -> Text -> GroupSearchFilter
newGroupSearchFilter GroupFilterOperator
pOperator_ GroupFilterAttribute
pName_ Text
pValue_ =
GroupSearchFilter'
{ $sel:operator:GroupSearchFilter' :: GroupFilterOperator
operator = GroupFilterOperator
pOperator_,
$sel:name:GroupSearchFilter' :: GroupFilterAttribute
name = GroupFilterAttribute
pName_,
$sel:value:GroupSearchFilter' :: Text
value = Text
pValue_
}
groupSearchFilter_operator :: Lens.Lens' GroupSearchFilter GroupFilterOperator
groupSearchFilter_operator :: Lens' GroupSearchFilter GroupFilterOperator
groupSearchFilter_operator = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupSearchFilter' {GroupFilterOperator
operator :: GroupFilterOperator
$sel:operator:GroupSearchFilter' :: GroupSearchFilter -> GroupFilterOperator
operator} -> GroupFilterOperator
operator) (\s :: GroupSearchFilter
s@GroupSearchFilter' {} GroupFilterOperator
a -> GroupSearchFilter
s {$sel:operator:GroupSearchFilter' :: GroupFilterOperator
operator = GroupFilterOperator
a} :: GroupSearchFilter)
groupSearchFilter_name :: Lens.Lens' GroupSearchFilter GroupFilterAttribute
groupSearchFilter_name :: Lens' GroupSearchFilter GroupFilterAttribute
groupSearchFilter_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupSearchFilter' {GroupFilterAttribute
name :: GroupFilterAttribute
$sel:name:GroupSearchFilter' :: GroupSearchFilter -> GroupFilterAttribute
name} -> GroupFilterAttribute
name) (\s :: GroupSearchFilter
s@GroupSearchFilter' {} GroupFilterAttribute
a -> GroupSearchFilter
s {$sel:name:GroupSearchFilter' :: GroupFilterAttribute
name = GroupFilterAttribute
a} :: GroupSearchFilter)
groupSearchFilter_value :: Lens.Lens' GroupSearchFilter Prelude.Text
groupSearchFilter_value :: Lens' GroupSearchFilter Text
groupSearchFilter_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupSearchFilter' {Text
value :: Text
$sel:value:GroupSearchFilter' :: GroupSearchFilter -> Text
value} -> Text
value) (\s :: GroupSearchFilter
s@GroupSearchFilter' {} Text
a -> GroupSearchFilter
s {$sel:value:GroupSearchFilter' :: Text
value = Text
a} :: GroupSearchFilter)
instance Prelude.Hashable GroupSearchFilter where
hashWithSalt :: Int -> GroupSearchFilter -> Int
hashWithSalt Int
_salt GroupSearchFilter' {Text
GroupFilterAttribute
GroupFilterOperator
value :: Text
name :: GroupFilterAttribute
operator :: GroupFilterOperator
$sel:value:GroupSearchFilter' :: GroupSearchFilter -> Text
$sel:name:GroupSearchFilter' :: GroupSearchFilter -> GroupFilterAttribute
$sel:operator:GroupSearchFilter' :: GroupSearchFilter -> GroupFilterOperator
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` GroupFilterOperator
operator
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` GroupFilterAttribute
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
value
instance Prelude.NFData GroupSearchFilter where
rnf :: GroupSearchFilter -> ()
rnf GroupSearchFilter' {Text
GroupFilterAttribute
GroupFilterOperator
value :: Text
name :: GroupFilterAttribute
operator :: GroupFilterOperator
$sel:value:GroupSearchFilter' :: GroupSearchFilter -> Text
$sel:name:GroupSearchFilter' :: GroupSearchFilter -> GroupFilterAttribute
$sel:operator:GroupSearchFilter' :: GroupSearchFilter -> GroupFilterOperator
..} =
forall a. NFData a => a -> ()
Prelude.rnf GroupFilterOperator
operator
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf GroupFilterAttribute
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
value
instance Data.ToJSON GroupSearchFilter where
toJSON :: GroupSearchFilter -> Value
toJSON GroupSearchFilter' {Text
GroupFilterAttribute
GroupFilterOperator
value :: Text
name :: GroupFilterAttribute
operator :: GroupFilterOperator
$sel:value:GroupSearchFilter' :: GroupSearchFilter -> Text
$sel:name:GroupSearchFilter' :: GroupSearchFilter -> GroupFilterAttribute
$sel:operator:GroupSearchFilter' :: GroupSearchFilter -> GroupFilterOperator
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"Operator" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= GroupFilterOperator
operator),
forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= GroupFilterAttribute
name),
forall a. a -> Maybe a
Prelude.Just (Key
"Value" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
value)
]
)