{-# 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.StackResourceDetail
-- 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.StackResourceDetail 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

-- | Contains detailed information about the specified stack resource.
--
-- /See:/ 'newStackResourceDetail' smart constructor.
data StackResourceDetail = StackResourceDetail'
  { -- | The name or unique identifier that corresponds to a physical instance ID
    -- of a resource supported by CloudFormation.
    StackResourceDetail -> Maybe Text
physicalResourceId :: Prelude.Maybe Prelude.Text,
    -- | Success\/failure message associated with the resource.
    StackResourceDetail -> 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>.
    StackResourceDetail -> 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.
    StackResourceDetail -> Maybe ModuleInfo
moduleInfo :: Prelude.Maybe ModuleInfo,
    -- | The content of the @Metadata@ attribute declared for the resource. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html Metadata Attribute>
    -- in the CloudFormation User Guide.
    StackResourceDetail -> Maybe Text
metadata :: Prelude.Maybe Prelude.Text,
    -- | Unique identifier of the stack.
    StackResourceDetail -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | User defined description associated with the resource.
    StackResourceDetail -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name associated with the stack.
    StackResourceDetail -> Maybe Text
stackName :: Prelude.Maybe Prelude.Text,
    -- | The logical name of the resource specified in the template.
    StackResourceDetail -> 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.)
    StackResourceDetail -> Text
resourceType :: Prelude.Text,
    -- | Time the status was updated.
    StackResourceDetail -> ISO8601
lastUpdatedTimestamp :: Core.ISO8601,
    -- | Current status of the resource.
    StackResourceDetail -> ResourceStatus
resourceStatus :: ResourceStatus
  }
  deriving (StackResourceDetail -> StackResourceDetail -> Bool
(StackResourceDetail -> StackResourceDetail -> Bool)
-> (StackResourceDetail -> StackResourceDetail -> Bool)
-> Eq StackResourceDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackResourceDetail -> StackResourceDetail -> Bool
$c/= :: StackResourceDetail -> StackResourceDetail -> Bool
== :: StackResourceDetail -> StackResourceDetail -> Bool
$c== :: StackResourceDetail -> StackResourceDetail -> Bool
Prelude.Eq, ReadPrec [StackResourceDetail]
ReadPrec StackResourceDetail
Int -> ReadS StackResourceDetail
ReadS [StackResourceDetail]
(Int -> ReadS StackResourceDetail)
-> ReadS [StackResourceDetail]
-> ReadPrec StackResourceDetail
-> ReadPrec [StackResourceDetail]
-> Read StackResourceDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StackResourceDetail]
$creadListPrec :: ReadPrec [StackResourceDetail]
readPrec :: ReadPrec StackResourceDetail
$creadPrec :: ReadPrec StackResourceDetail
readList :: ReadS [StackResourceDetail]
$creadList :: ReadS [StackResourceDetail]
readsPrec :: Int -> ReadS StackResourceDetail
$creadsPrec :: Int -> ReadS StackResourceDetail
Prelude.Read, Int -> StackResourceDetail -> ShowS
[StackResourceDetail] -> ShowS
StackResourceDetail -> String
(Int -> StackResourceDetail -> ShowS)
-> (StackResourceDetail -> String)
-> ([StackResourceDetail] -> ShowS)
-> Show StackResourceDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackResourceDetail] -> ShowS
$cshowList :: [StackResourceDetail] -> ShowS
show :: StackResourceDetail -> String
$cshow :: StackResourceDetail -> String
showsPrec :: Int -> StackResourceDetail -> ShowS
$cshowsPrec :: Int -> StackResourceDetail -> ShowS
Prelude.Show, (forall x. StackResourceDetail -> Rep StackResourceDetail x)
-> (forall x. Rep StackResourceDetail x -> StackResourceDetail)
-> Generic StackResourceDetail
forall x. Rep StackResourceDetail x -> StackResourceDetail
forall x. StackResourceDetail -> Rep StackResourceDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StackResourceDetail x -> StackResourceDetail
$cfrom :: forall x. StackResourceDetail -> Rep StackResourceDetail x
Prelude.Generic)

-- |
-- Create a value of 'StackResourceDetail' 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', 'stackResourceDetail_physicalResourceId' - The name or unique identifier that corresponds to a physical instance ID
-- of a resource supported by CloudFormation.
--
-- 'resourceStatusReason', 'stackResourceDetail_resourceStatusReason' - Success\/failure message associated with the resource.
--
-- 'driftInformation', 'stackResourceDetail_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', 'stackResourceDetail_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.
--
-- 'metadata', 'stackResourceDetail_metadata' - The content of the @Metadata@ attribute declared for the resource. For
-- more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html Metadata Attribute>
-- in the CloudFormation User Guide.
--
-- 'stackId', 'stackResourceDetail_stackId' - Unique identifier of the stack.
--
-- 'description', 'stackResourceDetail_description' - User defined description associated with the resource.
--
-- 'stackName', 'stackResourceDetail_stackName' - The name associated with the stack.
--
-- 'logicalResourceId', 'stackResourceDetail_logicalResourceId' - The logical name of the resource specified in the template.
--
-- 'resourceType', 'stackResourceDetail_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.)
--
-- 'lastUpdatedTimestamp', 'stackResourceDetail_lastUpdatedTimestamp' - Time the status was updated.
--
-- 'resourceStatus', 'stackResourceDetail_resourceStatus' - Current status of the resource.
newStackResourceDetail ::
  -- | 'logicalResourceId'
  Prelude.Text ->
  -- | 'resourceType'
  Prelude.Text ->
  -- | 'lastUpdatedTimestamp'
  Prelude.UTCTime ->
  -- | 'resourceStatus'
  ResourceStatus ->
  StackResourceDetail
newStackResourceDetail :: Text -> Text -> UTCTime -> ResourceStatus -> StackResourceDetail
newStackResourceDetail
  Text
pLogicalResourceId_
  Text
pResourceType_
  UTCTime
pLastUpdatedTimestamp_
  ResourceStatus
pResourceStatus_ =
    StackResourceDetail' :: Maybe Text
-> Maybe Text
-> Maybe StackResourceDriftInformation
-> Maybe ModuleInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceDetail
StackResourceDetail'
      { $sel:physicalResourceId:StackResourceDetail' :: Maybe Text
physicalResourceId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:resourceStatusReason:StackResourceDetail' :: Maybe Text
resourceStatusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:driftInformation:StackResourceDetail' :: Maybe StackResourceDriftInformation
driftInformation = Maybe StackResourceDriftInformation
forall a. Maybe a
Prelude.Nothing,
        $sel:moduleInfo:StackResourceDetail' :: Maybe ModuleInfo
moduleInfo = Maybe ModuleInfo
forall a. Maybe a
Prelude.Nothing,
        $sel:metadata:StackResourceDetail' :: Maybe Text
metadata = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:stackId:StackResourceDetail' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:description:StackResourceDetail' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:stackName:StackResourceDetail' :: Maybe Text
stackName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:logicalResourceId:StackResourceDetail' :: Text
logicalResourceId = Text
pLogicalResourceId_,
        $sel:resourceType:StackResourceDetail' :: Text
resourceType = Text
pResourceType_,
        $sel:lastUpdatedTimestamp:StackResourceDetail' :: ISO8601
lastUpdatedTimestamp =
          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
pLastUpdatedTimestamp_,
        $sel:resourceStatus:StackResourceDetail' :: ResourceStatus
resourceStatus = ResourceStatus
pResourceStatus_
      }

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

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

-- | 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>.
stackResourceDetail_driftInformation :: Lens.Lens' StackResourceDetail (Prelude.Maybe StackResourceDriftInformation)
stackResourceDetail_driftInformation :: (Maybe StackResourceDriftInformation
 -> f (Maybe StackResourceDriftInformation))
-> StackResourceDetail -> f StackResourceDetail
stackResourceDetail_driftInformation = (StackResourceDetail -> Maybe StackResourceDriftInformation)
-> (StackResourceDetail
    -> Maybe StackResourceDriftInformation -> StackResourceDetail)
-> Lens
     StackResourceDetail
     StackResourceDetail
     (Maybe StackResourceDriftInformation)
     (Maybe StackResourceDriftInformation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceDetail' {Maybe StackResourceDriftInformation
driftInformation :: Maybe StackResourceDriftInformation
$sel:driftInformation:StackResourceDetail' :: StackResourceDetail -> Maybe StackResourceDriftInformation
driftInformation} -> Maybe StackResourceDriftInformation
driftInformation) (\s :: StackResourceDetail
s@StackResourceDetail' {} Maybe StackResourceDriftInformation
a -> StackResourceDetail
s {$sel:driftInformation:StackResourceDetail' :: Maybe StackResourceDriftInformation
driftInformation = Maybe StackResourceDriftInformation
a} :: StackResourceDetail)

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

-- | The content of the @Metadata@ attribute declared for the resource. For
-- more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html Metadata Attribute>
-- in the CloudFormation User Guide.
stackResourceDetail_metadata :: Lens.Lens' StackResourceDetail (Prelude.Maybe Prelude.Text)
stackResourceDetail_metadata :: (Maybe Text -> f (Maybe Text))
-> StackResourceDetail -> f StackResourceDetail
stackResourceDetail_metadata = (StackResourceDetail -> Maybe Text)
-> (StackResourceDetail -> Maybe Text -> StackResourceDetail)
-> Lens
     StackResourceDetail StackResourceDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceDetail' {Maybe Text
metadata :: Maybe Text
$sel:metadata:StackResourceDetail' :: StackResourceDetail -> Maybe Text
metadata} -> Maybe Text
metadata) (\s :: StackResourceDetail
s@StackResourceDetail' {} Maybe Text
a -> StackResourceDetail
s {$sel:metadata:StackResourceDetail' :: Maybe Text
metadata = Maybe Text
a} :: StackResourceDetail)

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

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

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

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

-- | 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.)
stackResourceDetail_resourceType :: Lens.Lens' StackResourceDetail Prelude.Text
stackResourceDetail_resourceType :: (Text -> f Text) -> StackResourceDetail -> f StackResourceDetail
stackResourceDetail_resourceType = (StackResourceDetail -> Text)
-> (StackResourceDetail -> Text -> StackResourceDetail)
-> Lens StackResourceDetail StackResourceDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceDetail' {Text
resourceType :: Text
$sel:resourceType:StackResourceDetail' :: StackResourceDetail -> Text
resourceType} -> Text
resourceType) (\s :: StackResourceDetail
s@StackResourceDetail' {} Text
a -> StackResourceDetail
s {$sel:resourceType:StackResourceDetail' :: Text
resourceType = Text
a} :: StackResourceDetail)

-- | Time the status was updated.
stackResourceDetail_lastUpdatedTimestamp :: Lens.Lens' StackResourceDetail Prelude.UTCTime
stackResourceDetail_lastUpdatedTimestamp :: (UTCTime -> f UTCTime)
-> StackResourceDetail -> f StackResourceDetail
stackResourceDetail_lastUpdatedTimestamp = (StackResourceDetail -> ISO8601)
-> (StackResourceDetail -> ISO8601 -> StackResourceDetail)
-> Lens StackResourceDetail StackResourceDetail ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceDetail' {ISO8601
lastUpdatedTimestamp :: ISO8601
$sel:lastUpdatedTimestamp:StackResourceDetail' :: StackResourceDetail -> ISO8601
lastUpdatedTimestamp} -> ISO8601
lastUpdatedTimestamp) (\s :: StackResourceDetail
s@StackResourceDetail' {} ISO8601
a -> StackResourceDetail
s {$sel:lastUpdatedTimestamp:StackResourceDetail' :: ISO8601
lastUpdatedTimestamp = ISO8601
a} :: StackResourceDetail) ((ISO8601 -> f ISO8601)
 -> StackResourceDetail -> f StackResourceDetail)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> StackResourceDetail
-> f StackResourceDetail
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.
stackResourceDetail_resourceStatus :: Lens.Lens' StackResourceDetail ResourceStatus
stackResourceDetail_resourceStatus :: (ResourceStatus -> f ResourceStatus)
-> StackResourceDetail -> f StackResourceDetail
stackResourceDetail_resourceStatus = (StackResourceDetail -> ResourceStatus)
-> (StackResourceDetail -> ResourceStatus -> StackResourceDetail)
-> Lens
     StackResourceDetail
     StackResourceDetail
     ResourceStatus
     ResourceStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackResourceDetail' {ResourceStatus
resourceStatus :: ResourceStatus
$sel:resourceStatus:StackResourceDetail' :: StackResourceDetail -> ResourceStatus
resourceStatus} -> ResourceStatus
resourceStatus) (\s :: StackResourceDetail
s@StackResourceDetail' {} ResourceStatus
a -> StackResourceDetail
s {$sel:resourceStatus:StackResourceDetail' :: ResourceStatus
resourceStatus = ResourceStatus
a} :: StackResourceDetail)

instance Core.FromXML StackResourceDetail where
  parseXML :: [Node] -> Either String StackResourceDetail
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe StackResourceDriftInformation
-> Maybe ModuleInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> ISO8601
-> ResourceStatus
-> StackResourceDetail
StackResourceDetail'
      (Maybe Text
 -> Maybe Text
 -> Maybe StackResourceDriftInformation
 -> Maybe ModuleInfo
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> ISO8601
 -> ResourceStatus
 -> StackResourceDetail)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe StackResourceDriftInformation
      -> Maybe ModuleInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResourceDetail)
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
   -> Maybe Text
   -> Text
   -> Text
   -> ISO8601
   -> ResourceStatus
   -> StackResourceDetail)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe StackResourceDriftInformation
      -> Maybe ModuleInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResourceDetail)
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
   -> Maybe Text
   -> Text
   -> Text
   -> ISO8601
   -> ResourceStatus
   -> StackResourceDetail)
-> Either String (Maybe StackResourceDriftInformation)
-> Either
     String
     (Maybe ModuleInfo
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResourceDetail)
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
   -> Maybe Text
   -> Text
   -> Text
   -> ISO8601
   -> ResourceStatus
   -> StackResourceDetail)
-> Either String (Maybe ModuleInfo)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResourceDetail)
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
   -> Maybe Text
   -> Text
   -> Text
   -> ISO8601
   -> ResourceStatus
   -> StackResourceDetail)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResourceDetail)
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
"Metadata")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> ISO8601
   -> ResourceStatus
   -> StackResourceDetail)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResourceDetail)
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
   -> StackResourceDetail)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Text
      -> Text
      -> ISO8601
      -> ResourceStatus
      -> StackResourceDetail)
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
   -> StackResourceDetail)
-> Either String (Maybe Text)
-> Either
     String
     (Text -> Text -> ISO8601 -> ResourceStatus -> StackResourceDetail)
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 -> StackResourceDetail)
-> Either String Text
-> Either
     String (Text -> ISO8601 -> ResourceStatus -> StackResourceDetail)
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 -> StackResourceDetail)
-> Either String Text
-> Either String (ISO8601 -> ResourceStatus -> StackResourceDetail)
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 -> StackResourceDetail)
-> Either String ISO8601
-> Either String (ResourceStatus -> StackResourceDetail)
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
"LastUpdatedTimestamp")
      Either String (ResourceStatus -> StackResourceDetail)
-> Either String ResourceStatus
-> Either String StackResourceDetail
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 StackResourceDetail

instance Prelude.NFData StackResourceDetail