{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $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 :: Lens' PropertyDifference Text
propertyDifference_propertyPath = 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 :: Lens' PropertyDifference Text
propertyDifference_expectedValue = 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 :: Lens' PropertyDifference Text
propertyDifference_actualValue = 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 :: Lens' PropertyDifference DifferenceType
propertyDifference_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 Data.FromXML PropertyDifference where
parseXML :: [Node] -> Either String PropertyDifference
parseXML [Node]
x =
Text -> Text -> Text -> DifferenceType -> PropertyDifference
PropertyDifference'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"PropertyPath")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"ExpectedValue")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"ActualValue")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"DifferenceType")
instance Prelude.Hashable PropertyDifference where
hashWithSalt :: Int -> PropertyDifference -> Int
hashWithSalt Int
_salt PropertyDifference' {Text
DifferenceType
differenceType :: DifferenceType
actualValue :: Text
expectedValue :: Text
propertyPath :: Text
$sel:differenceType:PropertyDifference' :: PropertyDifference -> DifferenceType
$sel:actualValue:PropertyDifference' :: PropertyDifference -> Text
$sel:expectedValue:PropertyDifference' :: PropertyDifference -> Text
$sel:propertyPath:PropertyDifference' :: PropertyDifference -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
propertyPath
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
expectedValue
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
actualValue
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DifferenceType
differenceType
instance Prelude.NFData PropertyDifference where
rnf :: PropertyDifference -> ()
rnf PropertyDifference' {Text
DifferenceType
differenceType :: DifferenceType
actualValue :: Text
expectedValue :: Text
propertyPath :: Text
$sel:differenceType:PropertyDifference' :: PropertyDifference -> DifferenceType
$sel:actualValue:PropertyDifference' :: PropertyDifference -> Text
$sel:expectedValue:PropertyDifference' :: PropertyDifference -> Text
$sel:propertyPath:PropertyDifference' :: PropertyDifference -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
propertyPath
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
expectedValue
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
actualValue
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DifferenceType
differenceType