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