{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudFormation.Types.StackResource
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CloudFormation.Types.StackResource where

import Amazonka.CloudFormation.Types.ModuleInfo
import Amazonka.CloudFormation.Types.ResourceStatus
import Amazonka.CloudFormation.Types.StackResourceDriftInformation
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The StackResource data type.
--
-- /See:/ 'newStackResource' smart constructor.
data StackResource = StackResource'
  { -- | The name or unique identifier that corresponds to a physical instance ID
    -- of a resource supported by CloudFormation.
    StackResource -> Maybe Text
physicalResourceId :: Prelude.Maybe Prelude.Text,
    -- | Success\/failure message associated with the resource.
    StackResource -> Maybe Text
resourceStatusReason :: Prelude.Maybe Prelude.Text,
    -- | Information about whether the resource\'s actual configuration differs,
    -- or has /drifted/, from its expected configuration, as defined in the
    -- stack template and any values specified as template parameters. For more
    -- information, see
    -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html Detecting Unregulated Configuration Changes to Stacks and Resources>.
    StackResource -> Maybe StackResourceDriftInformation
driftInformation :: Prelude.Maybe StackResourceDriftInformation,
    -- | Contains information about the module from which the resource was
    -- created, if the resource was created from a module included in the stack
    -- template.
    StackResource -> Maybe ModuleInfo
moduleInfo :: Prelude.Maybe ModuleInfo,
    -- | Unique identifier of the stack.
    StackResource -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | User defined description associated with the resource.
    StackResource -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name associated with the stack.
    StackResource -> Maybe Text
stackName :: Prelude.Maybe Prelude.Text,
    -- | The logical name of the resource specified in the template.
    StackResource -> Text
logicalResourceId :: Prelude.Text,
    -- | Type of resource. (For more information, go to
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html Amazon Web Services Resource Types Reference>
    -- in the CloudFormation User Guide.)
    StackResource -> Text
resourceType :: Prelude.Text,
    -- | Time the status was updated.
    StackResource -> ISO8601
timestamp :: Core.ISO8601,
    -- | Current status of the resource.
    StackResource -> ResourceStatus
resourceStatus :: ResourceStatus
  }
  deriving (StackResource -> StackResource -> Bool
(StackResource -> StackResource -> Bool)
-> (StackResource -> StackResource -> Bool) -> Eq StackResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackResource -> StackResource -> Bool
$c/= :: StackResource -> StackResource -> Bool
== :: StackResource -> StackResource -> Bool
$c== :: StackResource -> StackResource -> Bool
Prelude.Eq, ReadPrec [StackResource]
ReadPrec StackResource
Int -> ReadS StackResource
ReadS [StackResource]
(Int -> ReadS StackResource)
-> ReadS [StackResource]
-> ReadPrec StackResource
-> ReadPrec [StackResource]
-> Read StackResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StackResource]
$creadListPrec :: ReadPrec [StackResource]
readPrec :: ReadPrec StackResource
$creadPrec :: ReadPrec StackResource
readList :: ReadS [StackResource]
$creadList :: ReadS [StackResource]
readsPrec :: Int -> ReadS StackResource
$creadsPrec :: Int -> ReadS StackResource
Prelude.Read, Int -> StackResource -> ShowS
[StackResource] -> ShowS
StackResource -> String
(Int -> StackResource -> ShowS)
-> (StackResource -> String)
-> ([StackResource] -> ShowS)
-> Show StackResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackResource] -> ShowS
$cshowList :: [StackResource] -> ShowS
show :: StackResource -> String
$cshow :: StackResource -> String
showsPrec :: Int -> StackResource -> ShowS
$cshowsPrec :: Int -> StackResource -> ShowS
Prelude.Show, (forall x. StackResource -> Rep StackResource x)
-> (forall x. Rep StackResource x -> StackResource)
-> Generic StackResource
forall x. Rep StackResource x -> StackResource
forall x. StackResource -> Rep StackResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StackResource x -> StackResource
$cfrom :: forall x. StackResource -> Rep StackResource x
Prelude.Generic)

-- |
-- Create a value of 'StackResource' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'physicalResourceId', 'stackResource_physicalResourceId' - The name or unique identifier that corresponds to a physical instance ID
-- of a resource supported by CloudFormation.
--
-- 'resourceStatusReason', 'stackResource_resourceStatusReason' - Success\/failure message associated with the resource.
--
-- 'driftInformation', 'stackResource_driftInformation' - Information about whether the resource\'s actual configuration differs,
-- or has /drifted/, from its expected configuration, as defined in the
-- stack template and any values specified as template parameters. For more
-- information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html Detecting Unregulated Configuration Changes to Stacks and Resources>.
--
-- 'moduleInfo', 'stackResource_moduleInfo' - Contains information about the module from which the resource was
-- created, if the resource was created from a module included in the stack
-- template.
--
-- 'stackId', 'stackResource_stackId' - Unique identifier of the stack.
--
-- 'description', 'stackResource_description' - User defined description associated with the resource.
--
-- 'stackName', 'stackResource_stackName' - The name associated with the stack.
--
-- 'logicalResourceId', 'stackResource_logicalResourceId' - The logical name of the resource specified in the template.
--
-- 'resourceType', 'stackResource_resourceType' - Type of resource. (For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html Amazon Web Services Resource Types Reference>
-- in the CloudFormation User Guide.)
--
-- 'timestamp', 'stackResource_timestamp' - Time the status was updated.
--
-- 'resourceStatus', 'stackResource_resourceStatus' - Current status of the resource.
newStackResource ::
  -- | 'logicalResourceId'
  Prelude.Text ->
  -- | 'resourceType'
  Prelude.Text ->
  -- | 'timestamp'
  Prelude.UTCTime ->
  -- | 'resourceStatus'
  ResourceStatus ->
  StackResource
newStackResource :: Text -> Text -> UTCTime -> ResourceStatus -> StackResource
newStackResource
  Text
pLogicalResourceId_
  Text
pResourceType_
  UTCTime
pTimestamp_
  ResourceStatus
pResourceStatus_ =
    StackResource' :: Maybe Text
-> Maybe Text
-> Maybe StackResourceDriftInformation
-> Maybe ModuleInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResource
StackResource'
      { $sel:physicalResourceId:StackResource' :: Maybe Text
physicalResourceId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:resourceStatusReason:StackResource' :: Maybe Text
resourceStatusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:driftInformation:StackResource' :: Maybe StackResourceDriftInformation
driftInformation = Maybe StackResourceDriftInformation
forall a. Maybe a
Prelude.Nothing,
        $sel:moduleInfo:StackResource' :: Maybe ModuleInfo
moduleInfo = Maybe ModuleInfo
forall a. Maybe a
Prelude.Nothing,
        $sel:stackId:StackResource' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:description:StackResource' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:stackName:StackResource' :: Maybe Text
stackName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:logicalResourceId:StackResource' :: Text
logicalResourceId = Text
pLogicalResourceId_,
        $sel:resourceType:StackResource' :: Text
resourceType = Text
pResourceType_,
        $sel:timestamp:StackResource' :: ISO8601
timestamp = Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged ISO8601 (Identity ISO8601))
-> UTCTime -> ISO8601
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pTimestamp_,
        $sel:resourceStatus:StackResource' :: ResourceStatus
resourceStatus = ResourceStatus
pResourceStatus_
      }

-- | The name or unique identifier that corresponds to a physical instance ID
-- of a resource supported by CloudFormation.
stackResource_physicalResourceId :: Lens.Lens' StackResource (Prelude.Maybe Prelude.Text)
stackResource_physicalResourceId :: (Maybe Text -> f (Maybe Text)) -> StackResource -> f StackResource
stackResource_physicalResourceId = (StackResource -> Maybe Text)
-> (StackResource -> Maybe Text -> StackResource)
-> Lens StackResource StackResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {Maybe Text
physicalResourceId :: Maybe Text
$sel:physicalResourceId:StackResource' :: StackResource -> Maybe Text
physicalResourceId} -> Maybe Text
physicalResourceId) (\s :: StackResource
s@StackResource' {} Maybe Text
a -> StackResource
s {$sel:physicalResourceId:StackResource' :: Maybe Text
physicalResourceId = Maybe Text
a} :: StackResource)

-- | Success\/failure message associated with the resource.
stackResource_resourceStatusReason :: Lens.Lens' StackResource (Prelude.Maybe Prelude.Text)
stackResource_resourceStatusReason :: (Maybe Text -> f (Maybe Text)) -> StackResource -> f StackResource
stackResource_resourceStatusReason = (StackResource -> Maybe Text)
-> (StackResource -> Maybe Text -> StackResource)
-> Lens StackResource StackResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {Maybe Text
resourceStatusReason :: Maybe Text
$sel:resourceStatusReason:StackResource' :: StackResource -> Maybe Text
resourceStatusReason} -> Maybe Text
resourceStatusReason) (\s :: StackResource
s@StackResource' {} Maybe Text
a -> StackResource
s {$sel:resourceStatusReason:StackResource' :: Maybe Text
resourceStatusReason = Maybe Text
a} :: StackResource)

-- | Information about whether the resource\'s actual configuration differs,
-- or has /drifted/, from its expected configuration, as defined in the
-- stack template and any values specified as template parameters. For more
-- information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html Detecting Unregulated Configuration Changes to Stacks and Resources>.
stackResource_driftInformation :: Lens.Lens' StackResource (Prelude.Maybe StackResourceDriftInformation)
stackResource_driftInformation :: (Maybe StackResourceDriftInformation
 -> f (Maybe StackResourceDriftInformation))
-> StackResource -> f StackResource
stackResource_driftInformation = (StackResource -> Maybe StackResourceDriftInformation)
-> (StackResource
    -> Maybe StackResourceDriftInformation -> StackResource)
-> Lens
     StackResource
     StackResource
     (Maybe StackResourceDriftInformation)
     (Maybe StackResourceDriftInformation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {Maybe StackResourceDriftInformation
driftInformation :: Maybe StackResourceDriftInformation
$sel:driftInformation:StackResource' :: StackResource -> Maybe StackResourceDriftInformation
driftInformation} -> Maybe StackResourceDriftInformation
driftInformation) (\s :: StackResource
s@StackResource' {} Maybe StackResourceDriftInformation
a -> StackResource
s {$sel:driftInformation:StackResource' :: Maybe StackResourceDriftInformation
driftInformation = Maybe StackResourceDriftInformation
a} :: StackResource)

-- | Contains information about the module from which the resource was
-- created, if the resource was created from a module included in the stack
-- template.
stackResource_moduleInfo :: Lens.Lens' StackResource (Prelude.Maybe ModuleInfo)
stackResource_moduleInfo :: (Maybe ModuleInfo -> f (Maybe ModuleInfo))
-> StackResource -> f StackResource
stackResource_moduleInfo = (StackResource -> Maybe ModuleInfo)
-> (StackResource -> Maybe ModuleInfo -> StackResource)
-> Lens
     StackResource StackResource (Maybe ModuleInfo) (Maybe ModuleInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {Maybe ModuleInfo
moduleInfo :: Maybe ModuleInfo
$sel:moduleInfo:StackResource' :: StackResource -> Maybe ModuleInfo
moduleInfo} -> Maybe ModuleInfo
moduleInfo) (\s :: StackResource
s@StackResource' {} Maybe ModuleInfo
a -> StackResource
s {$sel:moduleInfo:StackResource' :: Maybe ModuleInfo
moduleInfo = Maybe ModuleInfo
a} :: StackResource)

-- | Unique identifier of the stack.
stackResource_stackId :: Lens.Lens' StackResource (Prelude.Maybe Prelude.Text)
stackResource_stackId :: (Maybe Text -> f (Maybe Text)) -> StackResource -> f StackResource
stackResource_stackId = (StackResource -> Maybe Text)
-> (StackResource -> Maybe Text -> StackResource)
-> Lens StackResource StackResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {Maybe Text
stackId :: Maybe Text
$sel:stackId:StackResource' :: StackResource -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: StackResource
s@StackResource' {} Maybe Text
a -> StackResource
s {$sel:stackId:StackResource' :: Maybe Text
stackId = Maybe Text
a} :: StackResource)

-- | User defined description associated with the resource.
stackResource_description :: Lens.Lens' StackResource (Prelude.Maybe Prelude.Text)
stackResource_description :: (Maybe Text -> f (Maybe Text)) -> StackResource -> f StackResource
stackResource_description = (StackResource -> Maybe Text)
-> (StackResource -> Maybe Text -> StackResource)
-> Lens StackResource StackResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {Maybe Text
description :: Maybe Text
$sel:description:StackResource' :: StackResource -> Maybe Text
description} -> Maybe Text
description) (\s :: StackResource
s@StackResource' {} Maybe Text
a -> StackResource
s {$sel:description:StackResource' :: Maybe Text
description = Maybe Text
a} :: StackResource)

-- | The name associated with the stack.
stackResource_stackName :: Lens.Lens' StackResource (Prelude.Maybe Prelude.Text)
stackResource_stackName :: (Maybe Text -> f (Maybe Text)) -> StackResource -> f StackResource
stackResource_stackName = (StackResource -> Maybe Text)
-> (StackResource -> Maybe Text -> StackResource)
-> Lens StackResource StackResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {Maybe Text
stackName :: Maybe Text
$sel:stackName:StackResource' :: StackResource -> Maybe Text
stackName} -> Maybe Text
stackName) (\s :: StackResource
s@StackResource' {} Maybe Text
a -> StackResource
s {$sel:stackName:StackResource' :: Maybe Text
stackName = Maybe Text
a} :: StackResource)

-- | The logical name of the resource specified in the template.
stackResource_logicalResourceId :: Lens.Lens' StackResource Prelude.Text
stackResource_logicalResourceId :: (Text -> f Text) -> StackResource -> f StackResource
stackResource_logicalResourceId = (StackResource -> Text)
-> (StackResource -> Text -> StackResource)
-> Lens StackResource StackResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {Text
logicalResourceId :: Text
$sel:logicalResourceId:StackResource' :: StackResource -> Text
logicalResourceId} -> Text
logicalResourceId) (\s :: StackResource
s@StackResource' {} Text
a -> StackResource
s {$sel:logicalResourceId:StackResource' :: Text
logicalResourceId = Text
a} :: StackResource)

-- | Type of resource. (For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html Amazon Web Services Resource Types Reference>
-- in the CloudFormation User Guide.)
stackResource_resourceType :: Lens.Lens' StackResource Prelude.Text
stackResource_resourceType :: (Text -> f Text) -> StackResource -> f StackResource
stackResource_resourceType = (StackResource -> Text)
-> (StackResource -> Text -> StackResource)
-> Lens StackResource StackResource Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {Text
resourceType :: Text
$sel:resourceType:StackResource' :: StackResource -> Text
resourceType} -> Text
resourceType) (\s :: StackResource
s@StackResource' {} Text
a -> StackResource
s {$sel:resourceType:StackResource' :: Text
resourceType = Text
a} :: StackResource)

-- | Time the status was updated.
stackResource_timestamp :: Lens.Lens' StackResource Prelude.UTCTime
stackResource_timestamp :: (UTCTime -> f UTCTime) -> StackResource -> f StackResource
stackResource_timestamp = (StackResource -> ISO8601)
-> (StackResource -> ISO8601 -> StackResource)
-> Lens StackResource StackResource ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {ISO8601
timestamp :: ISO8601
$sel:timestamp:StackResource' :: StackResource -> ISO8601
timestamp} -> ISO8601
timestamp) (\s :: StackResource
s@StackResource' {} ISO8601
a -> StackResource
s {$sel:timestamp:StackResource' :: ISO8601
timestamp = ISO8601
a} :: StackResource) ((ISO8601 -> f ISO8601) -> StackResource -> f StackResource)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> StackResource
-> f StackResource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Current status of the resource.
stackResource_resourceStatus :: Lens.Lens' StackResource ResourceStatus
stackResource_resourceStatus :: (ResourceStatus -> f ResourceStatus)
-> StackResource -> f StackResource
stackResource_resourceStatus = (StackResource -> ResourceStatus)
-> (StackResource -> ResourceStatus -> StackResource)
-> Lens StackResource StackResource ResourceStatus ResourceStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResource' {ResourceStatus
resourceStatus :: ResourceStatus
$sel:resourceStatus:StackResource' :: StackResource -> ResourceStatus
resourceStatus} -> ResourceStatus
resourceStatus) (\s :: StackResource
s@StackResource' {} ResourceStatus
a -> StackResource
s {$sel:resourceStatus:StackResource' :: ResourceStatus
resourceStatus = ResourceStatus
a} :: StackResource)

instance Core.FromXML StackResource where
  parseXML :: [Node] -> Either String StackResource
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe StackResourceDriftInformation
-> Maybe ModuleInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResource
StackResource'
      (Maybe Text
 -> Maybe Text
 -> Maybe StackResourceDriftInformation
 -> Maybe ModuleInfo
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> ISO8601
 -> ResourceStatus
 -> StackResource)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe StackResourceDriftInformation
      -> Maybe ModuleInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PhysicalResourceId")
      Either
  String
  (Maybe Text
   -> Maybe StackResourceDriftInformation
   -> Maybe ModuleInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> ISO8601
   -> ResourceStatus
   -> StackResource)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe StackResourceDriftInformation
      -> Maybe ModuleInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ResourceStatusReason")
      Either
  String
  (Maybe StackResourceDriftInformation
   -> Maybe ModuleInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> ISO8601
   -> ResourceStatus
   -> StackResource)
-> Either String (Maybe StackResourceDriftInformation)
-> Either
     String
     (Maybe ModuleInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node]
-> Text -> Either String (Maybe StackResourceDriftInformation)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DriftInformation")
      Either
  String
  (Maybe ModuleInfo
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> ISO8601
   -> ResourceStatus
   -> StackResource)
-> Either String (Maybe ModuleInfo)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ModuleInfo)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ModuleInfo")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> ISO8601
   -> ResourceStatus
   -> StackResource)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StackId")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> ISO8601
   -> ResourceStatus
   -> StackResource)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Text -> Text -> ISO8601 -> ResourceStatus -> StackResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Description")
      Either
  String
  (Maybe Text
   -> Text -> Text -> ISO8601 -> ResourceStatus -> StackResource)
-> Either String (Maybe Text)
-> Either
     String (Text -> Text -> ISO8601 -> ResourceStatus -> StackResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StackName")
      Either
  String (Text -> Text -> ISO8601 -> ResourceStatus -> StackResource)
-> Either String Text
-> Either
     String (Text -> ISO8601 -> ResourceStatus -> StackResource)
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
"LogicalResourceId")
      Either String (Text -> ISO8601 -> ResourceStatus -> StackResource)
-> Either String Text
-> Either String (ISO8601 -> ResourceStatus -> StackResource)
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 (ISO8601 -> ResourceStatus -> StackResource)
-> Either String ISO8601
-> Either String (ResourceStatus -> StackResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ISO8601
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Timestamp")
      Either String (ResourceStatus -> StackResource)
-> Either String ResourceStatus -> Either String StackResource
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ResourceStatus
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ResourceStatus")

instance Prelude.Hashable StackResource

instance Prelude.NFData StackResource