{-# 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.ServiceCatalog.Types.ProvisionedProductDetail
-- 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.ServiceCatalog.Types.ProvisionedProductDetail where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.ServiceCatalog.Types.ProvisionedProductStatus

-- | Information about a provisioned product.
--
-- /See:/ 'newProvisionedProductDetail' smart constructor.
data ProvisionedProductDetail = ProvisionedProductDetail'
  { -- | The ARN of the launch role associated with the provisioned product.
    ProvisionedProductDetail -> Maybe Text
launchRoleArn :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier that you provide to ensure idempotency. If multiple
    -- requests differ only by the idempotency token, the same response is
    -- returned for each repeated request.
    ProvisionedProductDetail -> Maybe Text
idempotencyToken :: Prelude.Maybe Prelude.Text,
    -- | The current status of the provisioned product.
    --
    -- -   @AVAILABLE@ - Stable state, ready to perform any operation. The most
    --     recent operation succeeded and completed.
    --
    -- -   @UNDER_CHANGE@ - Transitive state. Operations performed might not
    --     have valid results. Wait for an @AVAILABLE@ status before performing
    --     operations.
    --
    -- -   @TAINTED@ - Stable state, ready to perform any operation. The stack
    --     has completed the requested operation but is not exactly what was
    --     requested. For example, a request to update to a new version failed
    --     and the stack rolled back to the current version.
    --
    -- -   @ERROR@ - An unexpected error occurred. The provisioned product
    --     exists but the stack is not running. For example, CloudFormation
    --     received a parameter value that was not valid and could not launch
    --     the stack.
    --
    -- -   @PLAN_IN_PROGRESS@ - Transitive state. The plan operations were
    --     performed to provision a new product, but resources have not yet
    --     been created. After reviewing the list of resources to be created,
    --     execute the plan. Wait for an @AVAILABLE@ status before performing
    --     operations.
    ProvisionedProductDetail -> Maybe ProvisionedProductStatus
status :: Prelude.Maybe ProvisionedProductStatus,
    -- | The record identifier of the last successful request performed on this
    -- provisioned product of the following types:
    --
    -- -   ProvisionedProduct
    --
    -- -   UpdateProvisionedProduct
    --
    -- -   ExecuteProvisionedProductPlan
    --
    -- -   TerminateProvisionedProduct
    ProvisionedProductDetail -> Maybe Text
lastSuccessfulProvisioningRecordId :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the provisioning artifact. For example,
    -- @pa-4abcdjnxjj6ne@.
    ProvisionedProductDetail -> Maybe Text
provisioningArtifactId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the provisioned product.
    ProvisionedProductDetail -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The UTC time stamp of the creation time.
    ProvisionedProductDetail -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | The current status message of the provisioned product.
    ProvisionedProductDetail -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The user-friendly name of the provisioned product.
    ProvisionedProductDetail -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The record identifier of the last request performed on this provisioned
    -- product.
    ProvisionedProductDetail -> Maybe Text
lastRecordId :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the provisioned product.
    ProvisionedProductDetail -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The type of provisioned product. The supported values are @CFN_STACK@
    -- and @CFN_STACKSET@.
    ProvisionedProductDetail -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
    -- | The record identifier of the last request performed on this provisioned
    -- product of the following types:
    --
    -- -   ProvisionedProduct
    --
    -- -   UpdateProvisionedProduct
    --
    -- -   ExecuteProvisionedProductPlan
    --
    -- -   TerminateProvisionedProduct
    ProvisionedProductDetail -> Maybe Text
lastProvisioningRecordId :: Prelude.Maybe Prelude.Text,
    -- | The product identifier. For example, @prod-abcdzk7xy33qa@.
    ProvisionedProductDetail -> Maybe Text
productId :: Prelude.Maybe Prelude.Text
  }
  deriving (ProvisionedProductDetail -> ProvisionedProductDetail -> Bool
(ProvisionedProductDetail -> ProvisionedProductDetail -> Bool)
-> (ProvisionedProductDetail -> ProvisionedProductDetail -> Bool)
-> Eq ProvisionedProductDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProvisionedProductDetail -> ProvisionedProductDetail -> Bool
$c/= :: ProvisionedProductDetail -> ProvisionedProductDetail -> Bool
== :: ProvisionedProductDetail -> ProvisionedProductDetail -> Bool
$c== :: ProvisionedProductDetail -> ProvisionedProductDetail -> Bool
Prelude.Eq, ReadPrec [ProvisionedProductDetail]
ReadPrec ProvisionedProductDetail
Int -> ReadS ProvisionedProductDetail
ReadS [ProvisionedProductDetail]
(Int -> ReadS ProvisionedProductDetail)
-> ReadS [ProvisionedProductDetail]
-> ReadPrec ProvisionedProductDetail
-> ReadPrec [ProvisionedProductDetail]
-> Read ProvisionedProductDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProvisionedProductDetail]
$creadListPrec :: ReadPrec [ProvisionedProductDetail]
readPrec :: ReadPrec ProvisionedProductDetail
$creadPrec :: ReadPrec ProvisionedProductDetail
readList :: ReadS [ProvisionedProductDetail]
$creadList :: ReadS [ProvisionedProductDetail]
readsPrec :: Int -> ReadS ProvisionedProductDetail
$creadsPrec :: Int -> ReadS ProvisionedProductDetail
Prelude.Read, Int -> ProvisionedProductDetail -> ShowS
[ProvisionedProductDetail] -> ShowS
ProvisionedProductDetail -> String
(Int -> ProvisionedProductDetail -> ShowS)
-> (ProvisionedProductDetail -> String)
-> ([ProvisionedProductDetail] -> ShowS)
-> Show ProvisionedProductDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProvisionedProductDetail] -> ShowS
$cshowList :: [ProvisionedProductDetail] -> ShowS
show :: ProvisionedProductDetail -> String
$cshow :: ProvisionedProductDetail -> String
showsPrec :: Int -> ProvisionedProductDetail -> ShowS
$cshowsPrec :: Int -> ProvisionedProductDetail -> ShowS
Prelude.Show, (forall x.
 ProvisionedProductDetail -> Rep ProvisionedProductDetail x)
-> (forall x.
    Rep ProvisionedProductDetail x -> ProvisionedProductDetail)
-> Generic ProvisionedProductDetail
forall x.
Rep ProvisionedProductDetail x -> ProvisionedProductDetail
forall x.
ProvisionedProductDetail -> Rep ProvisionedProductDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProvisionedProductDetail x -> ProvisionedProductDetail
$cfrom :: forall x.
ProvisionedProductDetail -> Rep ProvisionedProductDetail x
Prelude.Generic)

-- |
-- Create a value of 'ProvisionedProductDetail' 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:
--
-- 'launchRoleArn', 'provisionedProductDetail_launchRoleArn' - The ARN of the launch role associated with the provisioned product.
--
-- 'idempotencyToken', 'provisionedProductDetail_idempotencyToken' - A unique identifier that you provide to ensure idempotency. If multiple
-- requests differ only by the idempotency token, the same response is
-- returned for each repeated request.
--
-- 'status', 'provisionedProductDetail_status' - The current status of the provisioned product.
--
-- -   @AVAILABLE@ - Stable state, ready to perform any operation. The most
--     recent operation succeeded and completed.
--
-- -   @UNDER_CHANGE@ - Transitive state. Operations performed might not
--     have valid results. Wait for an @AVAILABLE@ status before performing
--     operations.
--
-- -   @TAINTED@ - Stable state, ready to perform any operation. The stack
--     has completed the requested operation but is not exactly what was
--     requested. For example, a request to update to a new version failed
--     and the stack rolled back to the current version.
--
-- -   @ERROR@ - An unexpected error occurred. The provisioned product
--     exists but the stack is not running. For example, CloudFormation
--     received a parameter value that was not valid and could not launch
--     the stack.
--
-- -   @PLAN_IN_PROGRESS@ - Transitive state. The plan operations were
--     performed to provision a new product, but resources have not yet
--     been created. After reviewing the list of resources to be created,
--     execute the plan. Wait for an @AVAILABLE@ status before performing
--     operations.
--
-- 'lastSuccessfulProvisioningRecordId', 'provisionedProductDetail_lastSuccessfulProvisioningRecordId' - The record identifier of the last successful request performed on this
-- provisioned product of the following types:
--
-- -   ProvisionedProduct
--
-- -   UpdateProvisionedProduct
--
-- -   ExecuteProvisionedProductPlan
--
-- -   TerminateProvisionedProduct
--
-- 'provisioningArtifactId', 'provisionedProductDetail_provisioningArtifactId' - The identifier of the provisioning artifact. For example,
-- @pa-4abcdjnxjj6ne@.
--
-- 'arn', 'provisionedProductDetail_arn' - The ARN of the provisioned product.
--
-- 'createdTime', 'provisionedProductDetail_createdTime' - The UTC time stamp of the creation time.
--
-- 'statusMessage', 'provisionedProductDetail_statusMessage' - The current status message of the provisioned product.
--
-- 'name', 'provisionedProductDetail_name' - The user-friendly name of the provisioned product.
--
-- 'lastRecordId', 'provisionedProductDetail_lastRecordId' - The record identifier of the last request performed on this provisioned
-- product.
--
-- 'id', 'provisionedProductDetail_id' - The identifier of the provisioned product.
--
-- 'type'', 'provisionedProductDetail_type' - The type of provisioned product. The supported values are @CFN_STACK@
-- and @CFN_STACKSET@.
--
-- 'lastProvisioningRecordId', 'provisionedProductDetail_lastProvisioningRecordId' - The record identifier of the last request performed on this provisioned
-- product of the following types:
--
-- -   ProvisionedProduct
--
-- -   UpdateProvisionedProduct
--
-- -   ExecuteProvisionedProductPlan
--
-- -   TerminateProvisionedProduct
--
-- 'productId', 'provisionedProductDetail_productId' - The product identifier. For example, @prod-abcdzk7xy33qa@.
newProvisionedProductDetail ::
  ProvisionedProductDetail
newProvisionedProductDetail :: ProvisionedProductDetail
newProvisionedProductDetail =
  ProvisionedProductDetail' :: Maybe Text
-> Maybe Text
-> Maybe ProvisionedProductStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ProvisionedProductDetail
ProvisionedProductDetail'
    { $sel:launchRoleArn:ProvisionedProductDetail' :: Maybe Text
launchRoleArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:idempotencyToken:ProvisionedProductDetail' :: Maybe Text
idempotencyToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ProvisionedProductDetail' :: Maybe ProvisionedProductStatus
status = Maybe ProvisionedProductStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:lastSuccessfulProvisioningRecordId:ProvisionedProductDetail' :: Maybe Text
lastSuccessfulProvisioningRecordId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:provisioningArtifactId:ProvisionedProductDetail' :: Maybe Text
provisioningArtifactId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ProvisionedProductDetail' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:ProvisionedProductDetail' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:ProvisionedProductDetail' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ProvisionedProductDetail' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastRecordId:ProvisionedProductDetail' :: Maybe Text
lastRecordId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:ProvisionedProductDetail' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ProvisionedProductDetail' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastProvisioningRecordId:ProvisionedProductDetail' :: Maybe Text
lastProvisioningRecordId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:productId:ProvisionedProductDetail' :: Maybe Text
productId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the launch role associated with the provisioned product.
provisionedProductDetail_launchRoleArn :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_launchRoleArn :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_launchRoleArn = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
launchRoleArn :: Maybe Text
$sel:launchRoleArn:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
launchRoleArn} -> Maybe Text
launchRoleArn) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:launchRoleArn:ProvisionedProductDetail' :: Maybe Text
launchRoleArn = Maybe Text
a} :: ProvisionedProductDetail)

-- | A unique identifier that you provide to ensure idempotency. If multiple
-- requests differ only by the idempotency token, the same response is
-- returned for each repeated request.
provisionedProductDetail_idempotencyToken :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_idempotencyToken :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_idempotencyToken = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
idempotencyToken :: Maybe Text
$sel:idempotencyToken:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
idempotencyToken} -> Maybe Text
idempotencyToken) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:idempotencyToken:ProvisionedProductDetail' :: Maybe Text
idempotencyToken = Maybe Text
a} :: ProvisionedProductDetail)

-- | The current status of the provisioned product.
--
-- -   @AVAILABLE@ - Stable state, ready to perform any operation. The most
--     recent operation succeeded and completed.
--
-- -   @UNDER_CHANGE@ - Transitive state. Operations performed might not
--     have valid results. Wait for an @AVAILABLE@ status before performing
--     operations.
--
-- -   @TAINTED@ - Stable state, ready to perform any operation. The stack
--     has completed the requested operation but is not exactly what was
--     requested. For example, a request to update to a new version failed
--     and the stack rolled back to the current version.
--
-- -   @ERROR@ - An unexpected error occurred. The provisioned product
--     exists but the stack is not running. For example, CloudFormation
--     received a parameter value that was not valid and could not launch
--     the stack.
--
-- -   @PLAN_IN_PROGRESS@ - Transitive state. The plan operations were
--     performed to provision a new product, but resources have not yet
--     been created. After reviewing the list of resources to be created,
--     execute the plan. Wait for an @AVAILABLE@ status before performing
--     operations.
provisionedProductDetail_status :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe ProvisionedProductStatus)
provisionedProductDetail_status :: (Maybe ProvisionedProductStatus
 -> f (Maybe ProvisionedProductStatus))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_status = (ProvisionedProductDetail -> Maybe ProvisionedProductStatus)
-> (ProvisionedProductDetail
    -> Maybe ProvisionedProductStatus -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe ProvisionedProductStatus)
     (Maybe ProvisionedProductStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe ProvisionedProductStatus
status :: Maybe ProvisionedProductStatus
$sel:status:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe ProvisionedProductStatus
status} -> Maybe ProvisionedProductStatus
status) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe ProvisionedProductStatus
a -> ProvisionedProductDetail
s {$sel:status:ProvisionedProductDetail' :: Maybe ProvisionedProductStatus
status = Maybe ProvisionedProductStatus
a} :: ProvisionedProductDetail)

-- | The record identifier of the last successful request performed on this
-- provisioned product of the following types:
--
-- -   ProvisionedProduct
--
-- -   UpdateProvisionedProduct
--
-- -   ExecuteProvisionedProductPlan
--
-- -   TerminateProvisionedProduct
provisionedProductDetail_lastSuccessfulProvisioningRecordId :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_lastSuccessfulProvisioningRecordId :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_lastSuccessfulProvisioningRecordId = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
lastSuccessfulProvisioningRecordId :: Maybe Text
$sel:lastSuccessfulProvisioningRecordId:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
lastSuccessfulProvisioningRecordId} -> Maybe Text
lastSuccessfulProvisioningRecordId) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:lastSuccessfulProvisioningRecordId:ProvisionedProductDetail' :: Maybe Text
lastSuccessfulProvisioningRecordId = Maybe Text
a} :: ProvisionedProductDetail)

-- | The identifier of the provisioning artifact. For example,
-- @pa-4abcdjnxjj6ne@.
provisionedProductDetail_provisioningArtifactId :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_provisioningArtifactId :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_provisioningArtifactId = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
provisioningArtifactId :: Maybe Text
$sel:provisioningArtifactId:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
provisioningArtifactId} -> Maybe Text
provisioningArtifactId) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:provisioningArtifactId:ProvisionedProductDetail' :: Maybe Text
provisioningArtifactId = Maybe Text
a} :: ProvisionedProductDetail)

-- | The ARN of the provisioned product.
provisionedProductDetail_arn :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_arn :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_arn = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
arn :: Maybe Text
$sel:arn:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:arn:ProvisionedProductDetail' :: Maybe Text
arn = Maybe Text
a} :: ProvisionedProductDetail)

-- | The UTC time stamp of the creation time.
provisionedProductDetail_createdTime :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.UTCTime)
provisionedProductDetail_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_createdTime = (ProvisionedProductDetail -> Maybe POSIX)
-> (ProvisionedProductDetail
    -> Maybe POSIX -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe POSIX
a -> ProvisionedProductDetail
s {$sel:createdTime:ProvisionedProductDetail' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: ProvisionedProductDetail) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProvisionedProductDetail -> f ProvisionedProductDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProvisionedProductDetail
-> f ProvisionedProductDetail
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 current status message of the provisioned product.
provisionedProductDetail_statusMessage :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_statusMessage :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_statusMessage = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:statusMessage:ProvisionedProductDetail' :: Maybe Text
statusMessage = Maybe Text
a} :: ProvisionedProductDetail)

-- | The user-friendly name of the provisioned product.
provisionedProductDetail_name :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_name :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_name = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
name :: Maybe Text
$sel:name:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
name} -> Maybe Text
name) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:name:ProvisionedProductDetail' :: Maybe Text
name = Maybe Text
a} :: ProvisionedProductDetail)

-- | The record identifier of the last request performed on this provisioned
-- product.
provisionedProductDetail_lastRecordId :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_lastRecordId :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_lastRecordId = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
lastRecordId :: Maybe Text
$sel:lastRecordId:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
lastRecordId} -> Maybe Text
lastRecordId) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:lastRecordId:ProvisionedProductDetail' :: Maybe Text
lastRecordId = Maybe Text
a} :: ProvisionedProductDetail)

-- | The identifier of the provisioned product.
provisionedProductDetail_id :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_id :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_id = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
id :: Maybe Text
$sel:id:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
id} -> Maybe Text
id) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:id:ProvisionedProductDetail' :: Maybe Text
id = Maybe Text
a} :: ProvisionedProductDetail)

-- | The type of provisioned product. The supported values are @CFN_STACK@
-- and @CFN_STACKSET@.
provisionedProductDetail_type :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_type :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_type = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
type' :: Maybe Text
$sel:type':ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
type'} -> Maybe Text
type') (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:type':ProvisionedProductDetail' :: Maybe Text
type' = Maybe Text
a} :: ProvisionedProductDetail)

-- | The record identifier of the last request performed on this provisioned
-- product of the following types:
--
-- -   ProvisionedProduct
--
-- -   UpdateProvisionedProduct
--
-- -   ExecuteProvisionedProductPlan
--
-- -   TerminateProvisionedProduct
provisionedProductDetail_lastProvisioningRecordId :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_lastProvisioningRecordId :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_lastProvisioningRecordId = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
lastProvisioningRecordId :: Maybe Text
$sel:lastProvisioningRecordId:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
lastProvisioningRecordId} -> Maybe Text
lastProvisioningRecordId) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:lastProvisioningRecordId:ProvisionedProductDetail' :: Maybe Text
lastProvisioningRecordId = Maybe Text
a} :: ProvisionedProductDetail)

-- | The product identifier. For example, @prod-abcdzk7xy33qa@.
provisionedProductDetail_productId :: Lens.Lens' ProvisionedProductDetail (Prelude.Maybe Prelude.Text)
provisionedProductDetail_productId :: (Maybe Text -> f (Maybe Text))
-> ProvisionedProductDetail -> f ProvisionedProductDetail
provisionedProductDetail_productId = (ProvisionedProductDetail -> Maybe Text)
-> (ProvisionedProductDetail
    -> Maybe Text -> ProvisionedProductDetail)
-> Lens
     ProvisionedProductDetail
     ProvisionedProductDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedProductDetail' {Maybe Text
productId :: Maybe Text
$sel:productId:ProvisionedProductDetail' :: ProvisionedProductDetail -> Maybe Text
productId} -> Maybe Text
productId) (\s :: ProvisionedProductDetail
s@ProvisionedProductDetail' {} Maybe Text
a -> ProvisionedProductDetail
s {$sel:productId:ProvisionedProductDetail' :: Maybe Text
productId = Maybe Text
a} :: ProvisionedProductDetail)

instance Core.FromJSON ProvisionedProductDetail where
  parseJSON :: Value -> Parser ProvisionedProductDetail
parseJSON =
    String
-> (Object -> Parser ProvisionedProductDetail)
-> Value
-> Parser ProvisionedProductDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ProvisionedProductDetail"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe ProvisionedProductStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ProvisionedProductDetail
ProvisionedProductDetail'
            (Maybe Text
 -> Maybe Text
 -> Maybe ProvisionedProductStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ProvisionedProductStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ProvisionedProductDetail)
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
"LaunchRoleArn")
            Parser
  (Maybe Text
   -> Maybe ProvisionedProductStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe ProvisionedProductStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ProvisionedProductDetail)
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
"IdempotencyToken")
            Parser
  (Maybe ProvisionedProductStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ProvisionedProductDetail)
-> Parser (Maybe ProvisionedProductStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ProvisionedProductDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProvisionedProductStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ProvisionedProductDetail)
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
"LastSuccessfulProvisioningRecordId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ProvisionedProductDetail)
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
"ProvisioningArtifactId")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ProvisionedProductDetail)
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
"Arn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ProvisionedProductDetail)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ProvisionedProductDetail)
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
"CreatedTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ProvisionedProductDetail)
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
"StatusMessage")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ProvisionedProductDetail)
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
"Name")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ProvisionedProductDetail)
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
"LastRecordId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> ProvisionedProductDetail)
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
"Id")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ProvisionedProductDetail)
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
"Type")
            Parser (Maybe Text -> Maybe Text -> ProvisionedProductDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ProvisionedProductDetail)
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
"LastProvisioningRecordId")
            Parser (Maybe Text -> ProvisionedProductDetail)
-> Parser (Maybe Text) -> Parser ProvisionedProductDetail
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
"ProductId")
      )

instance Prelude.Hashable ProvisionedProductDetail

instance Prelude.NFData ProvisionedProductDetail