{-# 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.AutoScaling.Types.Tag where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Tag = Tag'
{
Tag -> Text
key :: Prelude.Text,
Tag -> Text
resourceId :: Prelude.Text,
Tag -> Text
resourceType :: Prelude.Text,
Tag -> Bool
propagateAtLaunch :: Prelude.Bool,
Tag -> Text
value :: Prelude.Text
}
deriving (Tag -> Tag -> Bool
(Tag -> Tag -> Bool) -> (Tag -> Tag -> Bool) -> Eq Tag
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Tag -> Tag -> Bool
$c/= :: Tag -> Tag -> Bool
== :: Tag -> Tag -> Bool
$c== :: Tag -> Tag -> Bool
Prelude.Eq, ReadPrec [Tag]
ReadPrec Tag
Int -> ReadS Tag
ReadS [Tag]
(Int -> ReadS Tag)
-> ReadS [Tag] -> ReadPrec Tag -> ReadPrec [Tag] -> Read Tag
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Tag]
$creadListPrec :: ReadPrec [Tag]
readPrec :: ReadPrec Tag
$creadPrec :: ReadPrec Tag
readList :: ReadS [Tag]
$creadList :: ReadS [Tag]
readsPrec :: Int -> ReadS Tag
$creadsPrec :: Int -> ReadS Tag
Prelude.Read, Int -> Tag -> ShowS
[Tag] -> ShowS
Tag -> String
(Int -> Tag -> ShowS)
-> (Tag -> String) -> ([Tag] -> ShowS) -> Show Tag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Tag] -> ShowS
$cshowList :: [Tag] -> ShowS
show :: Tag -> String
$cshow :: Tag -> String
showsPrec :: Int -> Tag -> ShowS
$cshowsPrec :: Int -> Tag -> ShowS
Prelude.Show, (forall x. Tag -> Rep Tag x)
-> (forall x. Rep Tag x -> Tag) -> Generic Tag
forall x. Rep Tag x -> Tag
forall x. Tag -> Rep Tag x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Tag x -> Tag
$cfrom :: forall x. Tag -> Rep Tag x
Prelude.Generic)
newTag ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Bool ->
Prelude.Text ->
Tag
newTag :: Text -> Text -> Text -> Bool -> Text -> Tag
newTag
Text
pKey_
Text
pResourceId_
Text
pResourceType_
Bool
pPropagateAtLaunch_
Text
pValue_ =
Tag' :: Text -> Text -> Text -> Bool -> Text -> Tag
Tag'
{ $sel:key:Tag' :: Text
key = Text
pKey_,
$sel:resourceId:Tag' :: Text
resourceId = Text
pResourceId_,
$sel:resourceType:Tag' :: Text
resourceType = Text
pResourceType_,
$sel:propagateAtLaunch:Tag' :: Bool
propagateAtLaunch = Bool
pPropagateAtLaunch_,
$sel:value:Tag' :: Text
value = Text
pValue_
}
tag_key :: Lens.Lens' Tag Prelude.Text
tag_key :: (Text -> f Text) -> Tag -> f Tag
tag_key = (Tag -> Text) -> (Tag -> Text -> Tag) -> Lens Tag Tag Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Tag' {Text
key :: Text
$sel:key:Tag' :: Tag -> Text
key} -> Text
key) (\s :: Tag
s@Tag' {} Text
a -> Tag
s {$sel:key:Tag' :: Text
key = Text
a} :: Tag)
tag_resourceId :: Lens.Lens' Tag Prelude.Text
tag_resourceId :: (Text -> f Text) -> Tag -> f Tag
tag_resourceId = (Tag -> Text) -> (Tag -> Text -> Tag) -> Lens Tag Tag Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Tag' {Text
resourceId :: Text
$sel:resourceId:Tag' :: Tag -> Text
resourceId} -> Text
resourceId) (\s :: Tag
s@Tag' {} Text
a -> Tag
s {$sel:resourceId:Tag' :: Text
resourceId = Text
a} :: Tag)
tag_resourceType :: Lens.Lens' Tag Prelude.Text
tag_resourceType :: (Text -> f Text) -> Tag -> f Tag
tag_resourceType = (Tag -> Text) -> (Tag -> Text -> Tag) -> Lens Tag Tag Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Tag' {Text
resourceType :: Text
$sel:resourceType:Tag' :: Tag -> Text
resourceType} -> Text
resourceType) (\s :: Tag
s@Tag' {} Text
a -> Tag
s {$sel:resourceType:Tag' :: Text
resourceType = Text
a} :: Tag)
tag_propagateAtLaunch :: Lens.Lens' Tag Prelude.Bool
tag_propagateAtLaunch :: (Bool -> f Bool) -> Tag -> f Tag
tag_propagateAtLaunch = (Tag -> Bool) -> (Tag -> Bool -> Tag) -> Lens Tag Tag Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Tag' {Bool
propagateAtLaunch :: Bool
$sel:propagateAtLaunch:Tag' :: Tag -> Bool
propagateAtLaunch} -> Bool
propagateAtLaunch) (\s :: Tag
s@Tag' {} Bool
a -> Tag
s {$sel:propagateAtLaunch:Tag' :: Bool
propagateAtLaunch = Bool
a} :: Tag)
tag_value :: Lens.Lens' Tag Prelude.Text
tag_value :: (Text -> f Text) -> Tag -> f Tag
tag_value = (Tag -> Text) -> (Tag -> Text -> Tag) -> Lens Tag Tag Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Tag' {Text
value :: Text
$sel:value:Tag' :: Tag -> Text
value} -> Text
value) (\s :: Tag
s@Tag' {} Text
a -> Tag
s {$sel:value:Tag' :: Text
value = Text
a} :: Tag)
instance Prelude.Hashable Tag
instance Prelude.NFData Tag
instance Core.ToQuery Tag where
toQuery :: Tag -> QueryString
toQuery Tag' {Bool
Text
value :: Text
propagateAtLaunch :: Bool
resourceType :: Text
resourceId :: Text
key :: Text
$sel:value:Tag' :: Tag -> Text
$sel:propagateAtLaunch:Tag' :: Tag -> Bool
$sel:resourceType:Tag' :: Tag -> Text
$sel:resourceId:Tag' :: Tag -> Text
$sel:key:Tag' :: Tag -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Key" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
key,
ByteString
"ResourceId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
resourceId,
ByteString
"ResourceType" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
resourceType,
ByteString
"PropagateAtLaunch" ByteString -> Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Bool
propagateAtLaunch,
ByteString
"Value" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
value
]