{-# 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.PropertyDifference where
import Amazonka.CloudFormation.Types.DifferenceType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PropertyDifference = PropertyDifference'
{
PropertyDifference -> Text
propertyPath :: Prelude.Text,
PropertyDifference -> Text
expectedValue :: Prelude.Text,
PropertyDifference -> Text
actualValue :: Prelude.Text,
PropertyDifference -> DifferenceType
differenceType :: DifferenceType
}
deriving (PropertyDifference -> PropertyDifference -> Bool
(PropertyDifference -> PropertyDifference -> Bool)
-> (PropertyDifference -> PropertyDifference -> Bool)
-> Eq PropertyDifference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PropertyDifference -> PropertyDifference -> Bool
$c/= :: PropertyDifference -> PropertyDifference -> Bool
== :: PropertyDifference -> PropertyDifference -> Bool
$c== :: PropertyDifference -> PropertyDifference -> Bool
Prelude.Eq, ReadPrec [PropertyDifference]
ReadPrec PropertyDifference
Int -> ReadS PropertyDifference
ReadS [PropertyDifference]
(Int -> ReadS PropertyDifference)
-> ReadS [PropertyDifference]
-> ReadPrec PropertyDifference
-> ReadPrec [PropertyDifference]
-> Read PropertyDifference
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PropertyDifference]
$creadListPrec :: ReadPrec [PropertyDifference]
readPrec :: ReadPrec PropertyDifference
$creadPrec :: ReadPrec PropertyDifference
readList :: ReadS [PropertyDifference]
$creadList :: ReadS [PropertyDifference]
readsPrec :: Int -> ReadS PropertyDifference
$creadsPrec :: Int -> ReadS PropertyDifference
Prelude.Read, Int -> PropertyDifference -> ShowS
[PropertyDifference] -> ShowS
PropertyDifference -> String
(Int -> PropertyDifference -> ShowS)
-> (PropertyDifference -> String)
-> ([PropertyDifference] -> ShowS)
-> Show PropertyDifference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PropertyDifference] -> ShowS
$cshowList :: [PropertyDifference] -> ShowS
show :: PropertyDifference -> String
$cshow :: PropertyDifference -> String
showsPrec :: Int -> PropertyDifference -> ShowS
$cshowsPrec :: Int -> PropertyDifference -> ShowS
Prelude.Show, (forall x. PropertyDifference -> Rep PropertyDifference x)
-> (forall x. Rep PropertyDifference x -> PropertyDifference)
-> Generic PropertyDifference
forall x. Rep PropertyDifference x -> PropertyDifference
forall x. PropertyDifference -> Rep PropertyDifference x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PropertyDifference x -> PropertyDifference
$cfrom :: forall x. PropertyDifference -> Rep PropertyDifference x
Prelude.Generic)
newPropertyDifference ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DifferenceType ->
PropertyDifference
newPropertyDifference :: Text -> Text -> Text -> DifferenceType -> PropertyDifference
newPropertyDifference
Text
pPropertyPath_
Text
pExpectedValue_
Text
pActualValue_
DifferenceType
pDifferenceType_ =
PropertyDifference' :: Text -> Text -> Text -> DifferenceType -> PropertyDifference
PropertyDifference'
{ $sel:propertyPath:PropertyDifference' :: Text
propertyPath = Text
pPropertyPath_,
$sel:expectedValue:PropertyDifference' :: Text
expectedValue = Text
pExpectedValue_,
$sel:actualValue:PropertyDifference' :: Text
actualValue = Text
pActualValue_,
$sel:differenceType:PropertyDifference' :: DifferenceType
differenceType = DifferenceType
pDifferenceType_
}
propertyDifference_propertyPath :: Lens.Lens' PropertyDifference Prelude.Text
propertyDifference_propertyPath :: (Text -> f Text) -> PropertyDifference -> f PropertyDifference
propertyDifference_propertyPath = (PropertyDifference -> Text)
-> (PropertyDifference -> Text -> PropertyDifference)
-> Lens PropertyDifference PropertyDifference Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PropertyDifference' {Text
propertyPath :: Text
$sel:propertyPath:PropertyDifference' :: PropertyDifference -> Text
propertyPath} -> Text
propertyPath) (\s :: PropertyDifference
s@PropertyDifference' {} Text
a -> PropertyDifference
s {$sel:propertyPath:PropertyDifference' :: Text
propertyPath = Text
a} :: PropertyDifference)
propertyDifference_expectedValue :: Lens.Lens' PropertyDifference Prelude.Text
propertyDifference_expectedValue :: (Text -> f Text) -> PropertyDifference -> f PropertyDifference
propertyDifference_expectedValue = (PropertyDifference -> Text)
-> (PropertyDifference -> Text -> PropertyDifference)
-> Lens PropertyDifference PropertyDifference Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PropertyDifference' {Text
expectedValue :: Text
$sel:expectedValue:PropertyDifference' :: PropertyDifference -> Text
expectedValue} -> Text
expectedValue) (\s :: PropertyDifference
s@PropertyDifference' {} Text
a -> PropertyDifference
s {$sel:expectedValue:PropertyDifference' :: Text
expectedValue = Text
a} :: PropertyDifference)
propertyDifference_actualValue :: Lens.Lens' PropertyDifference Prelude.Text
propertyDifference_actualValue :: (Text -> f Text) -> PropertyDifference -> f PropertyDifference
propertyDifference_actualValue = (PropertyDifference -> Text)
-> (PropertyDifference -> Text -> PropertyDifference)
-> Lens PropertyDifference PropertyDifference Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PropertyDifference' {Text
actualValue :: Text
$sel:actualValue:PropertyDifference' :: PropertyDifference -> Text
actualValue} -> Text
actualValue) (\s :: PropertyDifference
s@PropertyDifference' {} Text
a -> PropertyDifference
s {$sel:actualValue:PropertyDifference' :: Text
actualValue = Text
a} :: PropertyDifference)
propertyDifference_differenceType :: Lens.Lens' PropertyDifference DifferenceType
propertyDifference_differenceType :: (DifferenceType -> f DifferenceType)
-> PropertyDifference -> f PropertyDifference
propertyDifference_differenceType = (PropertyDifference -> DifferenceType)
-> (PropertyDifference -> DifferenceType -> PropertyDifference)
-> Lens
PropertyDifference PropertyDifference DifferenceType DifferenceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PropertyDifference' {DifferenceType
differenceType :: DifferenceType
$sel:differenceType:PropertyDifference' :: PropertyDifference -> DifferenceType
differenceType} -> DifferenceType
differenceType) (\s :: PropertyDifference
s@PropertyDifference' {} DifferenceType
a -> PropertyDifference
s {$sel:differenceType:PropertyDifference' :: DifferenceType
differenceType = DifferenceType
a} :: PropertyDifference)
instance Core.FromXML PropertyDifference where
parseXML :: [Node] -> Either String PropertyDifference
parseXML [Node]
x =
Text -> Text -> Text -> DifferenceType -> PropertyDifference
PropertyDifference'
(Text -> Text -> Text -> DifferenceType -> PropertyDifference)
-> Either String Text
-> Either
String (Text -> Text -> DifferenceType -> PropertyDifference)
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
"PropertyPath")
Either
String (Text -> Text -> DifferenceType -> PropertyDifference)
-> Either String Text
-> Either String (Text -> DifferenceType -> PropertyDifference)
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
"ExpectedValue")
Either String (Text -> DifferenceType -> PropertyDifference)
-> Either String Text
-> Either String (DifferenceType -> PropertyDifference)
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
"ActualValue")
Either String (DifferenceType -> PropertyDifference)
-> Either String DifferenceType -> Either String PropertyDifference
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String DifferenceType
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"DifferenceType")
instance Prelude.Hashable PropertyDifference
instance Prelude.NFData PropertyDifference