{-# 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.CloudFormation.Types.PhysicalResourceIdContextKeyValuePair where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PhysicalResourceIdContextKeyValuePair = PhysicalResourceIdContextKeyValuePair'
{
PhysicalResourceIdContextKeyValuePair -> Text
key :: Prelude.Text,
PhysicalResourceIdContextKeyValuePair -> Text
value :: Prelude.Text
}
deriving (PhysicalResourceIdContextKeyValuePair
-> PhysicalResourceIdContextKeyValuePair -> Bool
(PhysicalResourceIdContextKeyValuePair
-> PhysicalResourceIdContextKeyValuePair -> Bool)
-> (PhysicalResourceIdContextKeyValuePair
-> PhysicalResourceIdContextKeyValuePair -> Bool)
-> Eq PhysicalResourceIdContextKeyValuePair
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalResourceIdContextKeyValuePair
-> PhysicalResourceIdContextKeyValuePair -> Bool
$c/= :: PhysicalResourceIdContextKeyValuePair
-> PhysicalResourceIdContextKeyValuePair -> Bool
== :: PhysicalResourceIdContextKeyValuePair
-> PhysicalResourceIdContextKeyValuePair -> Bool
$c== :: PhysicalResourceIdContextKeyValuePair
-> PhysicalResourceIdContextKeyValuePair -> Bool
Prelude.Eq, ReadPrec [PhysicalResourceIdContextKeyValuePair]
ReadPrec PhysicalResourceIdContextKeyValuePair
Int -> ReadS PhysicalResourceIdContextKeyValuePair
ReadS [PhysicalResourceIdContextKeyValuePair]
(Int -> ReadS PhysicalResourceIdContextKeyValuePair)
-> ReadS [PhysicalResourceIdContextKeyValuePair]
-> ReadPrec PhysicalResourceIdContextKeyValuePair
-> ReadPrec [PhysicalResourceIdContextKeyValuePair]
-> Read PhysicalResourceIdContextKeyValuePair
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PhysicalResourceIdContextKeyValuePair]
$creadListPrec :: ReadPrec [PhysicalResourceIdContextKeyValuePair]
readPrec :: ReadPrec PhysicalResourceIdContextKeyValuePair
$creadPrec :: ReadPrec PhysicalResourceIdContextKeyValuePair
readList :: ReadS [PhysicalResourceIdContextKeyValuePair]
$creadList :: ReadS [PhysicalResourceIdContextKeyValuePair]
readsPrec :: Int -> ReadS PhysicalResourceIdContextKeyValuePair
$creadsPrec :: Int -> ReadS PhysicalResourceIdContextKeyValuePair
Prelude.Read, Int -> PhysicalResourceIdContextKeyValuePair -> ShowS
[PhysicalResourceIdContextKeyValuePair] -> ShowS
PhysicalResourceIdContextKeyValuePair -> String
(Int -> PhysicalResourceIdContextKeyValuePair -> ShowS)
-> (PhysicalResourceIdContextKeyValuePair -> String)
-> ([PhysicalResourceIdContextKeyValuePair] -> ShowS)
-> Show PhysicalResourceIdContextKeyValuePair
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PhysicalResourceIdContextKeyValuePair] -> ShowS
$cshowList :: [PhysicalResourceIdContextKeyValuePair] -> ShowS
show :: PhysicalResourceIdContextKeyValuePair -> String
$cshow :: PhysicalResourceIdContextKeyValuePair -> String
showsPrec :: Int -> PhysicalResourceIdContextKeyValuePair -> ShowS
$cshowsPrec :: Int -> PhysicalResourceIdContextKeyValuePair -> ShowS
Prelude.Show, (forall x.
PhysicalResourceIdContextKeyValuePair
-> Rep PhysicalResourceIdContextKeyValuePair x)
-> (forall x.
Rep PhysicalResourceIdContextKeyValuePair x
-> PhysicalResourceIdContextKeyValuePair)
-> Generic PhysicalResourceIdContextKeyValuePair
forall x.
Rep PhysicalResourceIdContextKeyValuePair x
-> PhysicalResourceIdContextKeyValuePair
forall x.
PhysicalResourceIdContextKeyValuePair
-> Rep PhysicalResourceIdContextKeyValuePair x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PhysicalResourceIdContextKeyValuePair x
-> PhysicalResourceIdContextKeyValuePair
$cfrom :: forall x.
PhysicalResourceIdContextKeyValuePair
-> Rep PhysicalResourceIdContextKeyValuePair x
Prelude.Generic)
newPhysicalResourceIdContextKeyValuePair ::
Prelude.Text ->
Prelude.Text ->
PhysicalResourceIdContextKeyValuePair
newPhysicalResourceIdContextKeyValuePair :: Text -> Text -> PhysicalResourceIdContextKeyValuePair
newPhysicalResourceIdContextKeyValuePair
Text
pKey_
Text
pValue_ =
PhysicalResourceIdContextKeyValuePair' :: Text -> Text -> PhysicalResourceIdContextKeyValuePair
PhysicalResourceIdContextKeyValuePair'
{ $sel:key:PhysicalResourceIdContextKeyValuePair' :: Text
key = Text
pKey_,
$sel:value:PhysicalResourceIdContextKeyValuePair' :: Text
value = Text
pValue_
}
physicalResourceIdContextKeyValuePair_key :: Lens.Lens' PhysicalResourceIdContextKeyValuePair Prelude.Text
physicalResourceIdContextKeyValuePair_key :: (Text -> f Text)
-> PhysicalResourceIdContextKeyValuePair
-> f PhysicalResourceIdContextKeyValuePair
physicalResourceIdContextKeyValuePair_key = (PhysicalResourceIdContextKeyValuePair -> Text)
-> (PhysicalResourceIdContextKeyValuePair
-> Text -> PhysicalResourceIdContextKeyValuePair)
-> Lens
PhysicalResourceIdContextKeyValuePair
PhysicalResourceIdContextKeyValuePair
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhysicalResourceIdContextKeyValuePair' {Text
key :: Text
$sel:key:PhysicalResourceIdContextKeyValuePair' :: PhysicalResourceIdContextKeyValuePair -> Text
key} -> Text
key) (\s :: PhysicalResourceIdContextKeyValuePair
s@PhysicalResourceIdContextKeyValuePair' {} Text
a -> PhysicalResourceIdContextKeyValuePair
s {$sel:key:PhysicalResourceIdContextKeyValuePair' :: Text
key = Text
a} :: PhysicalResourceIdContextKeyValuePair)
physicalResourceIdContextKeyValuePair_value :: Lens.Lens' PhysicalResourceIdContextKeyValuePair Prelude.Text
physicalResourceIdContextKeyValuePair_value :: (Text -> f Text)
-> PhysicalResourceIdContextKeyValuePair
-> f PhysicalResourceIdContextKeyValuePair
physicalResourceIdContextKeyValuePair_value = (PhysicalResourceIdContextKeyValuePair -> Text)
-> (PhysicalResourceIdContextKeyValuePair
-> Text -> PhysicalResourceIdContextKeyValuePair)
-> Lens
PhysicalResourceIdContextKeyValuePair
PhysicalResourceIdContextKeyValuePair
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PhysicalResourceIdContextKeyValuePair' {Text
value :: Text
$sel:value:PhysicalResourceIdContextKeyValuePair' :: PhysicalResourceIdContextKeyValuePair -> Text
value} -> Text
value) (\s :: PhysicalResourceIdContextKeyValuePair
s@PhysicalResourceIdContextKeyValuePair' {} Text
a -> PhysicalResourceIdContextKeyValuePair
s {$sel:value:PhysicalResourceIdContextKeyValuePair' :: Text
value = Text
a} :: PhysicalResourceIdContextKeyValuePair)
instance
Core.FromXML
PhysicalResourceIdContextKeyValuePair
where
parseXML :: [Node] -> Either String PhysicalResourceIdContextKeyValuePair
parseXML [Node]
x =
Text -> Text -> PhysicalResourceIdContextKeyValuePair
PhysicalResourceIdContextKeyValuePair'
(Text -> Text -> PhysicalResourceIdContextKeyValuePair)
-> Either String Text
-> Either String (Text -> PhysicalResourceIdContextKeyValuePair)
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
"Key") Either String (Text -> PhysicalResourceIdContextKeyValuePair)
-> Either String Text
-> Either String PhysicalResourceIdContextKeyValuePair
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
PhysicalResourceIdContextKeyValuePair
instance
Prelude.NFData
PhysicalResourceIdContextKeyValuePair