{-# 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.TagDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TagDescription = TagDescription'
{
TagDescription -> Text
resourceId :: Prelude.Text,
TagDescription -> Text
resourceType :: Prelude.Text,
TagDescription -> Text
key :: Prelude.Text,
TagDescription -> Bool
propagateAtLaunch :: Prelude.Bool,
TagDescription -> Text
value :: Prelude.Text
}
deriving (TagDescription -> TagDescription -> Bool
(TagDescription -> TagDescription -> Bool)
-> (TagDescription -> TagDescription -> Bool) -> Eq TagDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TagDescription -> TagDescription -> Bool
$c/= :: TagDescription -> TagDescription -> Bool
== :: TagDescription -> TagDescription -> Bool
$c== :: TagDescription -> TagDescription -> Bool
Prelude.Eq, ReadPrec [TagDescription]
ReadPrec TagDescription
Int -> ReadS TagDescription
ReadS [TagDescription]
(Int -> ReadS TagDescription)
-> ReadS [TagDescription]
-> ReadPrec TagDescription
-> ReadPrec [TagDescription]
-> Read TagDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TagDescription]
$creadListPrec :: ReadPrec [TagDescription]
readPrec :: ReadPrec TagDescription
$creadPrec :: ReadPrec TagDescription
readList :: ReadS [TagDescription]
$creadList :: ReadS [TagDescription]
readsPrec :: Int -> ReadS TagDescription
$creadsPrec :: Int -> ReadS TagDescription
Prelude.Read, Int -> TagDescription -> ShowS
[TagDescription] -> ShowS
TagDescription -> String
(Int -> TagDescription -> ShowS)
-> (TagDescription -> String)
-> ([TagDescription] -> ShowS)
-> Show TagDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TagDescription] -> ShowS
$cshowList :: [TagDescription] -> ShowS
show :: TagDescription -> String
$cshow :: TagDescription -> String
showsPrec :: Int -> TagDescription -> ShowS
$cshowsPrec :: Int -> TagDescription -> ShowS
Prelude.Show, (forall x. TagDescription -> Rep TagDescription x)
-> (forall x. Rep TagDescription x -> TagDescription)
-> Generic TagDescription
forall x. Rep TagDescription x -> TagDescription
forall x. TagDescription -> Rep TagDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TagDescription x -> TagDescription
$cfrom :: forall x. TagDescription -> Rep TagDescription x
Prelude.Generic)
newTagDescription ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Bool ->
Prelude.Text ->
TagDescription
newTagDescription :: Text -> Text -> Text -> Bool -> Text -> TagDescription
newTagDescription
Text
pResourceId_
Text
pResourceType_
Text
pKey_
Bool
pPropagateAtLaunch_
Text
pValue_ =
TagDescription' :: Text -> Text -> Text -> Bool -> Text -> TagDescription
TagDescription'
{ $sel:resourceId:TagDescription' :: Text
resourceId = Text
pResourceId_,
$sel:resourceType:TagDescription' :: Text
resourceType = Text
pResourceType_,
$sel:key:TagDescription' :: Text
key = Text
pKey_,
$sel:propagateAtLaunch:TagDescription' :: Bool
propagateAtLaunch = Bool
pPropagateAtLaunch_,
$sel:value:TagDescription' :: Text
value = Text
pValue_
}
tagDescription_resourceId :: Lens.Lens' TagDescription Prelude.Text
tagDescription_resourceId :: (Text -> f Text) -> TagDescription -> f TagDescription
tagDescription_resourceId = (TagDescription -> Text)
-> (TagDescription -> Text -> TagDescription)
-> Lens TagDescription TagDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagDescription' {Text
resourceId :: Text
$sel:resourceId:TagDescription' :: TagDescription -> Text
resourceId} -> Text
resourceId) (\s :: TagDescription
s@TagDescription' {} Text
a -> TagDescription
s {$sel:resourceId:TagDescription' :: Text
resourceId = Text
a} :: TagDescription)
tagDescription_resourceType :: Lens.Lens' TagDescription Prelude.Text
tagDescription_resourceType :: (Text -> f Text) -> TagDescription -> f TagDescription
tagDescription_resourceType = (TagDescription -> Text)
-> (TagDescription -> Text -> TagDescription)
-> Lens TagDescription TagDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagDescription' {Text
resourceType :: Text
$sel:resourceType:TagDescription' :: TagDescription -> Text
resourceType} -> Text
resourceType) (\s :: TagDescription
s@TagDescription' {} Text
a -> TagDescription
s {$sel:resourceType:TagDescription' :: Text
resourceType = Text
a} :: TagDescription)
tagDescription_key :: Lens.Lens' TagDescription Prelude.Text
tagDescription_key :: (Text -> f Text) -> TagDescription -> f TagDescription
tagDescription_key = (TagDescription -> Text)
-> (TagDescription -> Text -> TagDescription)
-> Lens TagDescription TagDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagDescription' {Text
key :: Text
$sel:key:TagDescription' :: TagDescription -> Text
key} -> Text
key) (\s :: TagDescription
s@TagDescription' {} Text
a -> TagDescription
s {$sel:key:TagDescription' :: Text
key = Text
a} :: TagDescription)
tagDescription_propagateAtLaunch :: Lens.Lens' TagDescription Prelude.Bool
tagDescription_propagateAtLaunch :: (Bool -> f Bool) -> TagDescription -> f TagDescription
tagDescription_propagateAtLaunch = (TagDescription -> Bool)
-> (TagDescription -> Bool -> TagDescription)
-> Lens TagDescription TagDescription Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagDescription' {Bool
propagateAtLaunch :: Bool
$sel:propagateAtLaunch:TagDescription' :: TagDescription -> Bool
propagateAtLaunch} -> Bool
propagateAtLaunch) (\s :: TagDescription
s@TagDescription' {} Bool
a -> TagDescription
s {$sel:propagateAtLaunch:TagDescription' :: Bool
propagateAtLaunch = Bool
a} :: TagDescription)
tagDescription_value :: Lens.Lens' TagDescription Prelude.Text
tagDescription_value :: (Text -> f Text) -> TagDescription -> f TagDescription
tagDescription_value = (TagDescription -> Text)
-> (TagDescription -> Text -> TagDescription)
-> Lens TagDescription TagDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagDescription' {Text
value :: Text
$sel:value:TagDescription' :: TagDescription -> Text
value} -> Text
value) (\s :: TagDescription
s@TagDescription' {} Text
a -> TagDescription
s {$sel:value:TagDescription' :: Text
value = Text
a} :: TagDescription)
instance Core.FromXML TagDescription where
parseXML :: [Node] -> Either String TagDescription
parseXML [Node]
x =
Text -> Text -> Text -> Bool -> Text -> TagDescription
TagDescription'
(Text -> Text -> Text -> Bool -> Text -> TagDescription)
-> Either String Text
-> Either String (Text -> Text -> Bool -> Text -> TagDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ResourceId")
Either String (Text -> Text -> Bool -> Text -> TagDescription)
-> Either String Text
-> Either String (Text -> Bool -> Text -> TagDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ResourceType")
Either String (Text -> Bool -> Text -> TagDescription)
-> Either String Text
-> Either String (Bool -> Text -> TagDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Key")
Either String (Bool -> Text -> TagDescription)
-> Either String Bool -> Either String (Text -> TagDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Bool
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"PropagateAtLaunch")
Either String (Text -> TagDescription)
-> Either String Text -> Either String TagDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Value")
instance Prelude.Hashable TagDescription
instance Prelude.NFData TagDescription