{-# 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.SWF.Types.WorkflowExecutionFilter where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data WorkflowExecutionFilter = WorkflowExecutionFilter'
{
WorkflowExecutionFilter -> Text
workflowId :: Prelude.Text
}
deriving (WorkflowExecutionFilter -> WorkflowExecutionFilter -> Bool
(WorkflowExecutionFilter -> WorkflowExecutionFilter -> Bool)
-> (WorkflowExecutionFilter -> WorkflowExecutionFilter -> Bool)
-> Eq WorkflowExecutionFilter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowExecutionFilter -> WorkflowExecutionFilter -> Bool
$c/= :: WorkflowExecutionFilter -> WorkflowExecutionFilter -> Bool
== :: WorkflowExecutionFilter -> WorkflowExecutionFilter -> Bool
$c== :: WorkflowExecutionFilter -> WorkflowExecutionFilter -> Bool
Prelude.Eq, ReadPrec [WorkflowExecutionFilter]
ReadPrec WorkflowExecutionFilter
Int -> ReadS WorkflowExecutionFilter
ReadS [WorkflowExecutionFilter]
(Int -> ReadS WorkflowExecutionFilter)
-> ReadS [WorkflowExecutionFilter]
-> ReadPrec WorkflowExecutionFilter
-> ReadPrec [WorkflowExecutionFilter]
-> Read WorkflowExecutionFilter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowExecutionFilter]
$creadListPrec :: ReadPrec [WorkflowExecutionFilter]
readPrec :: ReadPrec WorkflowExecutionFilter
$creadPrec :: ReadPrec WorkflowExecutionFilter
readList :: ReadS [WorkflowExecutionFilter]
$creadList :: ReadS [WorkflowExecutionFilter]
readsPrec :: Int -> ReadS WorkflowExecutionFilter
$creadsPrec :: Int -> ReadS WorkflowExecutionFilter
Prelude.Read, Int -> WorkflowExecutionFilter -> ShowS
[WorkflowExecutionFilter] -> ShowS
WorkflowExecutionFilter -> String
(Int -> WorkflowExecutionFilter -> ShowS)
-> (WorkflowExecutionFilter -> String)
-> ([WorkflowExecutionFilter] -> ShowS)
-> Show WorkflowExecutionFilter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowExecutionFilter] -> ShowS
$cshowList :: [WorkflowExecutionFilter] -> ShowS
show :: WorkflowExecutionFilter -> String
$cshow :: WorkflowExecutionFilter -> String
showsPrec :: Int -> WorkflowExecutionFilter -> ShowS
$cshowsPrec :: Int -> WorkflowExecutionFilter -> ShowS
Prelude.Show, (forall x.
WorkflowExecutionFilter -> Rep WorkflowExecutionFilter x)
-> (forall x.
Rep WorkflowExecutionFilter x -> WorkflowExecutionFilter)
-> Generic WorkflowExecutionFilter
forall x. Rep WorkflowExecutionFilter x -> WorkflowExecutionFilter
forall x. WorkflowExecutionFilter -> Rep WorkflowExecutionFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorkflowExecutionFilter x -> WorkflowExecutionFilter
$cfrom :: forall x. WorkflowExecutionFilter -> Rep WorkflowExecutionFilter x
Prelude.Generic)
newWorkflowExecutionFilter ::
Prelude.Text ->
WorkflowExecutionFilter
newWorkflowExecutionFilter :: Text -> WorkflowExecutionFilter
newWorkflowExecutionFilter Text
pWorkflowId_ =
WorkflowExecutionFilter' :: Text -> WorkflowExecutionFilter
WorkflowExecutionFilter' {$sel:workflowId:WorkflowExecutionFilter' :: Text
workflowId = Text
pWorkflowId_}
workflowExecutionFilter_workflowId :: Lens.Lens' WorkflowExecutionFilter Prelude.Text
workflowExecutionFilter_workflowId :: (Text -> f Text)
-> WorkflowExecutionFilter -> f WorkflowExecutionFilter
workflowExecutionFilter_workflowId = (WorkflowExecutionFilter -> Text)
-> (WorkflowExecutionFilter -> Text -> WorkflowExecutionFilter)
-> Lens WorkflowExecutionFilter WorkflowExecutionFilter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionFilter' {Text
workflowId :: Text
$sel:workflowId:WorkflowExecutionFilter' :: WorkflowExecutionFilter -> Text
workflowId} -> Text
workflowId) (\s :: WorkflowExecutionFilter
s@WorkflowExecutionFilter' {} Text
a -> WorkflowExecutionFilter
s {$sel:workflowId:WorkflowExecutionFilter' :: Text
workflowId = Text
a} :: WorkflowExecutionFilter)
instance Prelude.Hashable WorkflowExecutionFilter
instance Prelude.NFData WorkflowExecutionFilter
instance Core.ToJSON WorkflowExecutionFilter where
toJSON :: WorkflowExecutionFilter -> Value
toJSON WorkflowExecutionFilter' {Text
workflowId :: Text
$sel:workflowId:WorkflowExecutionFilter' :: WorkflowExecutionFilter -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"workflowId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
workflowId)]
)