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