{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data WorkflowExecutionFilter = WorkflowExecutionFilter'
{
WorkflowExecutionFilter -> Text
workflowId :: Prelude.Text
}
deriving (WorkflowExecutionFilter -> WorkflowExecutionFilter -> Bool
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]
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
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. 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' {$sel:workflowId:WorkflowExecutionFilter' :: Text
workflowId = Text
pWorkflowId_}
workflowExecutionFilter_workflowId :: Lens.Lens' WorkflowExecutionFilter Prelude.Text
workflowExecutionFilter_workflowId :: Lens' WorkflowExecutionFilter Text
workflowExecutionFilter_workflowId = 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 where
hashWithSalt :: Int -> WorkflowExecutionFilter -> Int
hashWithSalt Int
_salt WorkflowExecutionFilter' {Text
workflowId :: Text
$sel:workflowId:WorkflowExecutionFilter' :: WorkflowExecutionFilter -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
workflowId
instance Prelude.NFData WorkflowExecutionFilter where
rnf :: WorkflowExecutionFilter -> ()
rnf WorkflowExecutionFilter' {Text
workflowId :: Text
$sel:workflowId:WorkflowExecutionFilter' :: WorkflowExecutionFilter -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
workflowId
instance Data.ToJSON WorkflowExecutionFilter where
toJSON :: WorkflowExecutionFilter -> Value
toJSON WorkflowExecutionFilter' {Text
workflowId :: Text
$sel:workflowId:WorkflowExecutionFilter' :: WorkflowExecutionFilter -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"workflowId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
workflowId)]
)