{-# 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.CodeDeploy.Types.CloudFormationTarget
-- 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.CodeDeploy.Types.CloudFormationTarget where

import Amazonka.CodeDeploy.Types.LifecycleEvent
import Amazonka.CodeDeploy.Types.TargetStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about the target to be updated by an AWS CloudFormation
-- blue\/green deployment. This target type is used for all deployments
-- initiated by a CloudFormation stack update.
--
-- /See:/ 'newCloudFormationTarget' smart constructor.
data CloudFormationTarget = CloudFormationTarget'
  { -- | The unique ID of a deployment target that has a type
    -- of @CloudFormationTarget@.
    CloudFormationTarget -> Maybe Text
targetId :: Prelude.Maybe Prelude.Text,
    -- | The status of an AWS CloudFormation blue\/green deployment\'s target
    -- application.
    CloudFormationTarget -> Maybe TargetStatus
status :: Prelude.Maybe TargetStatus,
    -- | The unique ID of an AWS CloudFormation blue\/green deployment.
    CloudFormationTarget -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
    -- | The resource type for the AWS CloudFormation blue\/green deployment.
    CloudFormationTarget -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the target application was updated by an AWS
    -- CloudFormation blue\/green deployment.
    CloudFormationTarget -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The lifecycle events of the AWS CloudFormation blue\/green deployment to
    -- this target application.
    CloudFormationTarget -> Maybe [LifecycleEvent]
lifecycleEvents :: Prelude.Maybe [LifecycleEvent],
    -- | The percentage of production traffic that the target version of an AWS
    -- CloudFormation blue\/green deployment receives.
    CloudFormationTarget -> Maybe Double
targetVersionWeight :: Prelude.Maybe Prelude.Double
  }
  deriving (CloudFormationTarget -> CloudFormationTarget -> Bool
(CloudFormationTarget -> CloudFormationTarget -> Bool)
-> (CloudFormationTarget -> CloudFormationTarget -> Bool)
-> Eq CloudFormationTarget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudFormationTarget -> CloudFormationTarget -> Bool
$c/= :: CloudFormationTarget -> CloudFormationTarget -> Bool
== :: CloudFormationTarget -> CloudFormationTarget -> Bool
$c== :: CloudFormationTarget -> CloudFormationTarget -> Bool
Prelude.Eq, ReadPrec [CloudFormationTarget]
ReadPrec CloudFormationTarget
Int -> ReadS CloudFormationTarget
ReadS [CloudFormationTarget]
(Int -> ReadS CloudFormationTarget)
-> ReadS [CloudFormationTarget]
-> ReadPrec CloudFormationTarget
-> ReadPrec [CloudFormationTarget]
-> Read CloudFormationTarget
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudFormationTarget]
$creadListPrec :: ReadPrec [CloudFormationTarget]
readPrec :: ReadPrec CloudFormationTarget
$creadPrec :: ReadPrec CloudFormationTarget
readList :: ReadS [CloudFormationTarget]
$creadList :: ReadS [CloudFormationTarget]
readsPrec :: Int -> ReadS CloudFormationTarget
$creadsPrec :: Int -> ReadS CloudFormationTarget
Prelude.Read, Int -> CloudFormationTarget -> ShowS
[CloudFormationTarget] -> ShowS
CloudFormationTarget -> String
(Int -> CloudFormationTarget -> ShowS)
-> (CloudFormationTarget -> String)
-> ([CloudFormationTarget] -> ShowS)
-> Show CloudFormationTarget
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudFormationTarget] -> ShowS
$cshowList :: [CloudFormationTarget] -> ShowS
show :: CloudFormationTarget -> String
$cshow :: CloudFormationTarget -> String
showsPrec :: Int -> CloudFormationTarget -> ShowS
$cshowsPrec :: Int -> CloudFormationTarget -> ShowS
Prelude.Show, (forall x. CloudFormationTarget -> Rep CloudFormationTarget x)
-> (forall x. Rep CloudFormationTarget x -> CloudFormationTarget)
-> Generic CloudFormationTarget
forall x. Rep CloudFormationTarget x -> CloudFormationTarget
forall x. CloudFormationTarget -> Rep CloudFormationTarget x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CloudFormationTarget x -> CloudFormationTarget
$cfrom :: forall x. CloudFormationTarget -> Rep CloudFormationTarget x
Prelude.Generic)

-- |
-- Create a value of 'CloudFormationTarget' 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:
--
-- 'targetId', 'cloudFormationTarget_targetId' - The unique ID of a deployment target that has a type
-- of @CloudFormationTarget@.
--
-- 'status', 'cloudFormationTarget_status' - The status of an AWS CloudFormation blue\/green deployment\'s target
-- application.
--
-- 'deploymentId', 'cloudFormationTarget_deploymentId' - The unique ID of an AWS CloudFormation blue\/green deployment.
--
-- 'resourceType', 'cloudFormationTarget_resourceType' - The resource type for the AWS CloudFormation blue\/green deployment.
--
-- 'lastUpdatedAt', 'cloudFormationTarget_lastUpdatedAt' - The date and time when the target application was updated by an AWS
-- CloudFormation blue\/green deployment.
--
-- 'lifecycleEvents', 'cloudFormationTarget_lifecycleEvents' - The lifecycle events of the AWS CloudFormation blue\/green deployment to
-- this target application.
--
-- 'targetVersionWeight', 'cloudFormationTarget_targetVersionWeight' - The percentage of production traffic that the target version of an AWS
-- CloudFormation blue\/green deployment receives.
newCloudFormationTarget ::
  CloudFormationTarget
newCloudFormationTarget :: CloudFormationTarget
newCloudFormationTarget =
  CloudFormationTarget' :: Maybe Text
-> Maybe TargetStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [LifecycleEvent]
-> Maybe Double
-> CloudFormationTarget
CloudFormationTarget'
    { $sel:targetId:CloudFormationTarget' :: Maybe Text
targetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:CloudFormationTarget' :: Maybe TargetStatus
status = Maybe TargetStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentId:CloudFormationTarget' :: Maybe Text
deploymentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:CloudFormationTarget' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:CloudFormationTarget' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lifecycleEvents:CloudFormationTarget' :: Maybe [LifecycleEvent]
lifecycleEvents = Maybe [LifecycleEvent]
forall a. Maybe a
Prelude.Nothing,
      $sel:targetVersionWeight:CloudFormationTarget' :: Maybe Double
targetVersionWeight = Maybe Double
forall a. Maybe a
Prelude.Nothing
    }

-- | The unique ID of a deployment target that has a type
-- of @CloudFormationTarget@.
cloudFormationTarget_targetId :: Lens.Lens' CloudFormationTarget (Prelude.Maybe Prelude.Text)
cloudFormationTarget_targetId :: (Maybe Text -> f (Maybe Text))
-> CloudFormationTarget -> f CloudFormationTarget
cloudFormationTarget_targetId = (CloudFormationTarget -> Maybe Text)
-> (CloudFormationTarget -> Maybe Text -> CloudFormationTarget)
-> Lens
     CloudFormationTarget CloudFormationTarget (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationTarget' {Maybe Text
targetId :: Maybe Text
$sel:targetId:CloudFormationTarget' :: CloudFormationTarget -> Maybe Text
targetId} -> Maybe Text
targetId) (\s :: CloudFormationTarget
s@CloudFormationTarget' {} Maybe Text
a -> CloudFormationTarget
s {$sel:targetId:CloudFormationTarget' :: Maybe Text
targetId = Maybe Text
a} :: CloudFormationTarget)

-- | The status of an AWS CloudFormation blue\/green deployment\'s target
-- application.
cloudFormationTarget_status :: Lens.Lens' CloudFormationTarget (Prelude.Maybe TargetStatus)
cloudFormationTarget_status :: (Maybe TargetStatus -> f (Maybe TargetStatus))
-> CloudFormationTarget -> f CloudFormationTarget
cloudFormationTarget_status = (CloudFormationTarget -> Maybe TargetStatus)
-> (CloudFormationTarget
    -> Maybe TargetStatus -> CloudFormationTarget)
-> Lens
     CloudFormationTarget
     CloudFormationTarget
     (Maybe TargetStatus)
     (Maybe TargetStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationTarget' {Maybe TargetStatus
status :: Maybe TargetStatus
$sel:status:CloudFormationTarget' :: CloudFormationTarget -> Maybe TargetStatus
status} -> Maybe TargetStatus
status) (\s :: CloudFormationTarget
s@CloudFormationTarget' {} Maybe TargetStatus
a -> CloudFormationTarget
s {$sel:status:CloudFormationTarget' :: Maybe TargetStatus
status = Maybe TargetStatus
a} :: CloudFormationTarget)

-- | The unique ID of an AWS CloudFormation blue\/green deployment.
cloudFormationTarget_deploymentId :: Lens.Lens' CloudFormationTarget (Prelude.Maybe Prelude.Text)
cloudFormationTarget_deploymentId :: (Maybe Text -> f (Maybe Text))
-> CloudFormationTarget -> f CloudFormationTarget
cloudFormationTarget_deploymentId = (CloudFormationTarget -> Maybe Text)
-> (CloudFormationTarget -> Maybe Text -> CloudFormationTarget)
-> Lens
     CloudFormationTarget CloudFormationTarget (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationTarget' {Maybe Text
deploymentId :: Maybe Text
$sel:deploymentId:CloudFormationTarget' :: CloudFormationTarget -> Maybe Text
deploymentId} -> Maybe Text
deploymentId) (\s :: CloudFormationTarget
s@CloudFormationTarget' {} Maybe Text
a -> CloudFormationTarget
s {$sel:deploymentId:CloudFormationTarget' :: Maybe Text
deploymentId = Maybe Text
a} :: CloudFormationTarget)

-- | The resource type for the AWS CloudFormation blue\/green deployment.
cloudFormationTarget_resourceType :: Lens.Lens' CloudFormationTarget (Prelude.Maybe Prelude.Text)
cloudFormationTarget_resourceType :: (Maybe Text -> f (Maybe Text))
-> CloudFormationTarget -> f CloudFormationTarget
cloudFormationTarget_resourceType = (CloudFormationTarget -> Maybe Text)
-> (CloudFormationTarget -> Maybe Text -> CloudFormationTarget)
-> Lens
     CloudFormationTarget CloudFormationTarget (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationTarget' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:CloudFormationTarget' :: CloudFormationTarget -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: CloudFormationTarget
s@CloudFormationTarget' {} Maybe Text
a -> CloudFormationTarget
s {$sel:resourceType:CloudFormationTarget' :: Maybe Text
resourceType = Maybe Text
a} :: CloudFormationTarget)

-- | The date and time when the target application was updated by an AWS
-- CloudFormation blue\/green deployment.
cloudFormationTarget_lastUpdatedAt :: Lens.Lens' CloudFormationTarget (Prelude.Maybe Prelude.UTCTime)
cloudFormationTarget_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CloudFormationTarget -> f CloudFormationTarget
cloudFormationTarget_lastUpdatedAt = (CloudFormationTarget -> Maybe POSIX)
-> (CloudFormationTarget -> Maybe POSIX -> CloudFormationTarget)
-> Lens
     CloudFormationTarget
     CloudFormationTarget
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationTarget' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:CloudFormationTarget' :: CloudFormationTarget -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: CloudFormationTarget
s@CloudFormationTarget' {} Maybe POSIX
a -> CloudFormationTarget
s {$sel:lastUpdatedAt:CloudFormationTarget' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: CloudFormationTarget) ((Maybe POSIX -> f (Maybe POSIX))
 -> CloudFormationTarget -> f CloudFormationTarget)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CloudFormationTarget
-> f CloudFormationTarget
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The lifecycle events of the AWS CloudFormation blue\/green deployment to
-- this target application.
cloudFormationTarget_lifecycleEvents :: Lens.Lens' CloudFormationTarget (Prelude.Maybe [LifecycleEvent])
cloudFormationTarget_lifecycleEvents :: (Maybe [LifecycleEvent] -> f (Maybe [LifecycleEvent]))
-> CloudFormationTarget -> f CloudFormationTarget
cloudFormationTarget_lifecycleEvents = (CloudFormationTarget -> Maybe [LifecycleEvent])
-> (CloudFormationTarget
    -> Maybe [LifecycleEvent] -> CloudFormationTarget)
-> Lens
     CloudFormationTarget
     CloudFormationTarget
     (Maybe [LifecycleEvent])
     (Maybe [LifecycleEvent])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationTarget' {Maybe [LifecycleEvent]
lifecycleEvents :: Maybe [LifecycleEvent]
$sel:lifecycleEvents:CloudFormationTarget' :: CloudFormationTarget -> Maybe [LifecycleEvent]
lifecycleEvents} -> Maybe [LifecycleEvent]
lifecycleEvents) (\s :: CloudFormationTarget
s@CloudFormationTarget' {} Maybe [LifecycleEvent]
a -> CloudFormationTarget
s {$sel:lifecycleEvents:CloudFormationTarget' :: Maybe [LifecycleEvent]
lifecycleEvents = Maybe [LifecycleEvent]
a} :: CloudFormationTarget) ((Maybe [LifecycleEvent] -> f (Maybe [LifecycleEvent]))
 -> CloudFormationTarget -> f CloudFormationTarget)
-> ((Maybe [LifecycleEvent] -> f (Maybe [LifecycleEvent]))
    -> Maybe [LifecycleEvent] -> f (Maybe [LifecycleEvent]))
-> (Maybe [LifecycleEvent] -> f (Maybe [LifecycleEvent]))
-> CloudFormationTarget
-> f CloudFormationTarget
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LifecycleEvent] [LifecycleEvent] [LifecycleEvent] [LifecycleEvent]
-> Iso
     (Maybe [LifecycleEvent])
     (Maybe [LifecycleEvent])
     (Maybe [LifecycleEvent])
     (Maybe [LifecycleEvent])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [LifecycleEvent] [LifecycleEvent] [LifecycleEvent] [LifecycleEvent]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The percentage of production traffic that the target version of an AWS
-- CloudFormation blue\/green deployment receives.
cloudFormationTarget_targetVersionWeight :: Lens.Lens' CloudFormationTarget (Prelude.Maybe Prelude.Double)
cloudFormationTarget_targetVersionWeight :: (Maybe Double -> f (Maybe Double))
-> CloudFormationTarget -> f CloudFormationTarget
cloudFormationTarget_targetVersionWeight = (CloudFormationTarget -> Maybe Double)
-> (CloudFormationTarget -> Maybe Double -> CloudFormationTarget)
-> Lens
     CloudFormationTarget
     CloudFormationTarget
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFormationTarget' {Maybe Double
targetVersionWeight :: Maybe Double
$sel:targetVersionWeight:CloudFormationTarget' :: CloudFormationTarget -> Maybe Double
targetVersionWeight} -> Maybe Double
targetVersionWeight) (\s :: CloudFormationTarget
s@CloudFormationTarget' {} Maybe Double
a -> CloudFormationTarget
s {$sel:targetVersionWeight:CloudFormationTarget' :: Maybe Double
targetVersionWeight = Maybe Double
a} :: CloudFormationTarget)

instance Core.FromJSON CloudFormationTarget where
  parseJSON :: Value -> Parser CloudFormationTarget
parseJSON =
    String
-> (Object -> Parser CloudFormationTarget)
-> Value
-> Parser CloudFormationTarget
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CloudFormationTarget"
      ( \Object
x ->
          Maybe Text
-> Maybe TargetStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [LifecycleEvent]
-> Maybe Double
-> CloudFormationTarget
CloudFormationTarget'
            (Maybe Text
 -> Maybe TargetStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe [LifecycleEvent]
 -> Maybe Double
 -> CloudFormationTarget)
-> Parser (Maybe Text)
-> Parser
     (Maybe TargetStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [LifecycleEvent]
      -> Maybe Double
      -> CloudFormationTarget)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"targetId")
            Parser
  (Maybe TargetStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [LifecycleEvent]
   -> Maybe Double
   -> CloudFormationTarget)
-> Parser (Maybe TargetStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [LifecycleEvent]
      -> Maybe Double
      -> CloudFormationTarget)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TargetStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [LifecycleEvent]
   -> Maybe Double
   -> CloudFormationTarget)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe [LifecycleEvent]
      -> Maybe Double
      -> CloudFormationTarget)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deploymentId")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe [LifecycleEvent]
   -> Maybe Double
   -> CloudFormationTarget)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe [LifecycleEvent] -> Maybe Double -> CloudFormationTarget)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
            Parser
  (Maybe POSIX
   -> Maybe [LifecycleEvent] -> Maybe Double -> CloudFormationTarget)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [LifecycleEvent] -> Maybe Double -> CloudFormationTarget)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdatedAt")
            Parser
  (Maybe [LifecycleEvent] -> Maybe Double -> CloudFormationTarget)
-> Parser (Maybe [LifecycleEvent])
-> Parser (Maybe Double -> CloudFormationTarget)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [LifecycleEvent]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lifecycleEvents"
                            Parser (Maybe (Maybe [LifecycleEvent]))
-> Maybe [LifecycleEvent] -> Parser (Maybe [LifecycleEvent])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LifecycleEvent]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe Double -> CloudFormationTarget)
-> Parser (Maybe Double) -> Parser CloudFormationTarget
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"targetVersionWeight")
      )

instance Prelude.Hashable CloudFormationTarget

instance Prelude.NFData CloudFormationTarget