{-# 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.Proton.Types.EnvironmentSummary
-- 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.Proton.Types.EnvironmentSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.Types.DeploymentStatus
import Amazonka.Proton.Types.Provisioning

-- | A summary of the environment detail data.
--
-- /See:/ 'newEnvironmentSummary' smart constructor.
data EnvironmentSummary = EnvironmentSummary'
  { -- | An environment deployment status message.
    EnvironmentSummary -> Maybe (Sensitive Text)
deploymentStatusMessage :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The ID of the environment account that the environment infrastructure
    -- resources are provisioned in.
    EnvironmentSummary -> Maybe Text
environmentAccountId :: Prelude.Maybe Prelude.Text,
    -- | When included, indicates that the environment template is for customer
    -- provisioned and managed infrastructure.
    EnvironmentSummary -> Maybe Provisioning
provisioning :: Prelude.Maybe Provisioning,
    -- | The Amazon Resource Name (ARN) of the AWS Proton service role that
    -- allows AWS Proton to make calls to other services on your behalf.
    EnvironmentSummary -> Maybe Text
protonServiceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the environment account connection that the environment is
    -- associated with.
    EnvironmentSummary -> Maybe Text
environmentAccountConnectionId :: Prelude.Maybe Prelude.Text,
    -- | The description of the environment.
    EnvironmentSummary -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the environment.
    EnvironmentSummary -> Text
arn :: Prelude.Text,
    -- | The time when the environment was created.
    EnvironmentSummary -> POSIX
createdAt :: Core.POSIX,
    -- | The environment deployment status.
    EnvironmentSummary -> DeploymentStatus
deploymentStatus :: DeploymentStatus,
    -- | The time when a deployment of the environment was last attempted.
    EnvironmentSummary -> POSIX
lastDeploymentAttemptedAt :: Core.POSIX,
    -- | The time when the environment was last deployed successfully.
    EnvironmentSummary -> POSIX
lastDeploymentSucceededAt :: Core.POSIX,
    -- | The name of the environment.
    EnvironmentSummary -> Text
name :: Prelude.Text,
    -- | The ID of the major version of the environment template.
    EnvironmentSummary -> Text
templateMajorVersion :: Prelude.Text,
    -- | The ID of the minor version of the environment template.
    EnvironmentSummary -> Text
templateMinorVersion :: Prelude.Text,
    -- | The name of the environment template.
    EnvironmentSummary -> Text
templateName :: Prelude.Text
  }
  deriving (EnvironmentSummary -> EnvironmentSummary -> Bool
(EnvironmentSummary -> EnvironmentSummary -> Bool)
-> (EnvironmentSummary -> EnvironmentSummary -> Bool)
-> Eq EnvironmentSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnvironmentSummary -> EnvironmentSummary -> Bool
$c/= :: EnvironmentSummary -> EnvironmentSummary -> Bool
== :: EnvironmentSummary -> EnvironmentSummary -> Bool
$c== :: EnvironmentSummary -> EnvironmentSummary -> Bool
Prelude.Eq, Int -> EnvironmentSummary -> ShowS
[EnvironmentSummary] -> ShowS
EnvironmentSummary -> String
(Int -> EnvironmentSummary -> ShowS)
-> (EnvironmentSummary -> String)
-> ([EnvironmentSummary] -> ShowS)
-> Show EnvironmentSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnvironmentSummary] -> ShowS
$cshowList :: [EnvironmentSummary] -> ShowS
show :: EnvironmentSummary -> String
$cshow :: EnvironmentSummary -> String
showsPrec :: Int -> EnvironmentSummary -> ShowS
$cshowsPrec :: Int -> EnvironmentSummary -> ShowS
Prelude.Show, (forall x. EnvironmentSummary -> Rep EnvironmentSummary x)
-> (forall x. Rep EnvironmentSummary x -> EnvironmentSummary)
-> Generic EnvironmentSummary
forall x. Rep EnvironmentSummary x -> EnvironmentSummary
forall x. EnvironmentSummary -> Rep EnvironmentSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EnvironmentSummary x -> EnvironmentSummary
$cfrom :: forall x. EnvironmentSummary -> Rep EnvironmentSummary x
Prelude.Generic)

-- |
-- Create a value of 'EnvironmentSummary' 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:
--
-- 'deploymentStatusMessage', 'environmentSummary_deploymentStatusMessage' - An environment deployment status message.
--
-- 'environmentAccountId', 'environmentSummary_environmentAccountId' - The ID of the environment account that the environment infrastructure
-- resources are provisioned in.
--
-- 'provisioning', 'environmentSummary_provisioning' - When included, indicates that the environment template is for customer
-- provisioned and managed infrastructure.
--
-- 'protonServiceRoleArn', 'environmentSummary_protonServiceRoleArn' - The Amazon Resource Name (ARN) of the AWS Proton service role that
-- allows AWS Proton to make calls to other services on your behalf.
--
-- 'environmentAccountConnectionId', 'environmentSummary_environmentAccountConnectionId' - The ID of the environment account connection that the environment is
-- associated with.
--
-- 'description', 'environmentSummary_description' - The description of the environment.
--
-- 'arn', 'environmentSummary_arn' - The Amazon Resource Name (ARN) of the environment.
--
-- 'createdAt', 'environmentSummary_createdAt' - The time when the environment was created.
--
-- 'deploymentStatus', 'environmentSummary_deploymentStatus' - The environment deployment status.
--
-- 'lastDeploymentAttemptedAt', 'environmentSummary_lastDeploymentAttemptedAt' - The time when a deployment of the environment was last attempted.
--
-- 'lastDeploymentSucceededAt', 'environmentSummary_lastDeploymentSucceededAt' - The time when the environment was last deployed successfully.
--
-- 'name', 'environmentSummary_name' - The name of the environment.
--
-- 'templateMajorVersion', 'environmentSummary_templateMajorVersion' - The ID of the major version of the environment template.
--
-- 'templateMinorVersion', 'environmentSummary_templateMinorVersion' - The ID of the minor version of the environment template.
--
-- 'templateName', 'environmentSummary_templateName' - The name of the environment template.
newEnvironmentSummary ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'deploymentStatus'
  DeploymentStatus ->
  -- | 'lastDeploymentAttemptedAt'
  Prelude.UTCTime ->
  -- | 'lastDeploymentSucceededAt'
  Prelude.UTCTime ->
  -- | 'name'
  Prelude.Text ->
  -- | 'templateMajorVersion'
  Prelude.Text ->
  -- | 'templateMinorVersion'
  Prelude.Text ->
  -- | 'templateName'
  Prelude.Text ->
  EnvironmentSummary
newEnvironmentSummary :: Text
-> UTCTime
-> DeploymentStatus
-> UTCTime
-> UTCTime
-> Text
-> Text
-> Text
-> Text
-> EnvironmentSummary
newEnvironmentSummary
  Text
pArn_
  UTCTime
pCreatedAt_
  DeploymentStatus
pDeploymentStatus_
  UTCTime
pLastDeploymentAttemptedAt_
  UTCTime
pLastDeploymentSucceededAt_
  Text
pName_
  Text
pTemplateMajorVersion_
  Text
pTemplateMinorVersion_
  Text
pTemplateName_ =
    EnvironmentSummary' :: Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Provisioning
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> DeploymentStatus
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Text
-> EnvironmentSummary
EnvironmentSummary'
      { $sel:deploymentStatusMessage:EnvironmentSummary' :: Maybe (Sensitive Text)
deploymentStatusMessage =
          Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:environmentAccountId:EnvironmentSummary' :: Maybe Text
environmentAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:provisioning:EnvironmentSummary' :: Maybe Provisioning
provisioning = Maybe Provisioning
forall a. Maybe a
Prelude.Nothing,
        $sel:protonServiceRoleArn:EnvironmentSummary' :: Maybe Text
protonServiceRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:environmentAccountConnectionId:EnvironmentSummary' :: Maybe Text
environmentAccountConnectionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:description:EnvironmentSummary' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:arn:EnvironmentSummary' :: Text
arn = Text
pArn_,
        $sel:createdAt:EnvironmentSummary' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
        $sel:deploymentStatus:EnvironmentSummary' :: DeploymentStatus
deploymentStatus = DeploymentStatus
pDeploymentStatus_,
        $sel:lastDeploymentAttemptedAt:EnvironmentSummary' :: POSIX
lastDeploymentAttemptedAt =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastDeploymentAttemptedAt_,
        $sel:lastDeploymentSucceededAt:EnvironmentSummary' :: POSIX
lastDeploymentSucceededAt =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastDeploymentSucceededAt_,
        $sel:name:EnvironmentSummary' :: Text
name = Text
pName_,
        $sel:templateMajorVersion:EnvironmentSummary' :: Text
templateMajorVersion = Text
pTemplateMajorVersion_,
        $sel:templateMinorVersion:EnvironmentSummary' :: Text
templateMinorVersion = Text
pTemplateMinorVersion_,
        $sel:templateName:EnvironmentSummary' :: Text
templateName = Text
pTemplateName_
      }

-- | An environment deployment status message.
environmentSummary_deploymentStatusMessage :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_deploymentStatusMessage :: (Maybe Text -> f (Maybe Text))
-> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_deploymentStatusMessage = (EnvironmentSummary -> Maybe (Sensitive Text))
-> (EnvironmentSummary
    -> Maybe (Sensitive Text) -> EnvironmentSummary)
-> Lens
     EnvironmentSummary
     EnvironmentSummary
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Maybe (Sensitive Text)
deploymentStatusMessage :: Maybe (Sensitive Text)
$sel:deploymentStatusMessage:EnvironmentSummary' :: EnvironmentSummary -> Maybe (Sensitive Text)
deploymentStatusMessage} -> Maybe (Sensitive Text)
deploymentStatusMessage) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Maybe (Sensitive Text)
a -> EnvironmentSummary
s {$sel:deploymentStatusMessage:EnvironmentSummary' :: Maybe (Sensitive Text)
deploymentStatusMessage = Maybe (Sensitive Text)
a} :: EnvironmentSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> EnvironmentSummary -> f EnvironmentSummary)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> EnvironmentSummary
-> f EnvironmentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The ID of the environment account that the environment infrastructure
-- resources are provisioned in.
environmentSummary_environmentAccountId :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_environmentAccountId :: (Maybe Text -> f (Maybe Text))
-> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_environmentAccountId = (EnvironmentSummary -> Maybe Text)
-> (EnvironmentSummary -> Maybe Text -> EnvironmentSummary)
-> Lens
     EnvironmentSummary EnvironmentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Maybe Text
environmentAccountId :: Maybe Text
$sel:environmentAccountId:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
environmentAccountId} -> Maybe Text
environmentAccountId) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Maybe Text
a -> EnvironmentSummary
s {$sel:environmentAccountId:EnvironmentSummary' :: Maybe Text
environmentAccountId = Maybe Text
a} :: EnvironmentSummary)

-- | When included, indicates that the environment template is for customer
-- provisioned and managed infrastructure.
environmentSummary_provisioning :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Provisioning)
environmentSummary_provisioning :: (Maybe Provisioning -> f (Maybe Provisioning))
-> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_provisioning = (EnvironmentSummary -> Maybe Provisioning)
-> (EnvironmentSummary -> Maybe Provisioning -> EnvironmentSummary)
-> Lens
     EnvironmentSummary
     EnvironmentSummary
     (Maybe Provisioning)
     (Maybe Provisioning)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Maybe Provisioning
provisioning :: Maybe Provisioning
$sel:provisioning:EnvironmentSummary' :: EnvironmentSummary -> Maybe Provisioning
provisioning} -> Maybe Provisioning
provisioning) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Maybe Provisioning
a -> EnvironmentSummary
s {$sel:provisioning:EnvironmentSummary' :: Maybe Provisioning
provisioning = Maybe Provisioning
a} :: EnvironmentSummary)

-- | The Amazon Resource Name (ARN) of the AWS Proton service role that
-- allows AWS Proton to make calls to other services on your behalf.
environmentSummary_protonServiceRoleArn :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_protonServiceRoleArn :: (Maybe Text -> f (Maybe Text))
-> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_protonServiceRoleArn = (EnvironmentSummary -> Maybe Text)
-> (EnvironmentSummary -> Maybe Text -> EnvironmentSummary)
-> Lens
     EnvironmentSummary EnvironmentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Maybe Text
protonServiceRoleArn :: Maybe Text
$sel:protonServiceRoleArn:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
protonServiceRoleArn} -> Maybe Text
protonServiceRoleArn) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Maybe Text
a -> EnvironmentSummary
s {$sel:protonServiceRoleArn:EnvironmentSummary' :: Maybe Text
protonServiceRoleArn = Maybe Text
a} :: EnvironmentSummary)

-- | The ID of the environment account connection that the environment is
-- associated with.
environmentSummary_environmentAccountConnectionId :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_environmentAccountConnectionId :: (Maybe Text -> f (Maybe Text))
-> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_environmentAccountConnectionId = (EnvironmentSummary -> Maybe Text)
-> (EnvironmentSummary -> Maybe Text -> EnvironmentSummary)
-> Lens
     EnvironmentSummary EnvironmentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Maybe Text
environmentAccountConnectionId :: Maybe Text
$sel:environmentAccountConnectionId:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
environmentAccountConnectionId} -> Maybe Text
environmentAccountConnectionId) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Maybe Text
a -> EnvironmentSummary
s {$sel:environmentAccountConnectionId:EnvironmentSummary' :: Maybe Text
environmentAccountConnectionId = Maybe Text
a} :: EnvironmentSummary)

-- | The description of the environment.
environmentSummary_description :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_description :: (Maybe Text -> f (Maybe Text))
-> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_description = (EnvironmentSummary -> Maybe (Sensitive Text))
-> (EnvironmentSummary
    -> Maybe (Sensitive Text) -> EnvironmentSummary)
-> Lens
     EnvironmentSummary
     EnvironmentSummary
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:EnvironmentSummary' :: EnvironmentSummary -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Maybe (Sensitive Text)
a -> EnvironmentSummary
s {$sel:description:EnvironmentSummary' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: EnvironmentSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> EnvironmentSummary -> f EnvironmentSummary)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> EnvironmentSummary
-> f EnvironmentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The Amazon Resource Name (ARN) of the environment.
environmentSummary_arn :: Lens.Lens' EnvironmentSummary Prelude.Text
environmentSummary_arn :: (Text -> f Text) -> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_arn = (EnvironmentSummary -> Text)
-> (EnvironmentSummary -> Text -> EnvironmentSummary)
-> Lens EnvironmentSummary EnvironmentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Text
arn :: Text
$sel:arn:EnvironmentSummary' :: EnvironmentSummary -> Text
arn} -> Text
arn) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Text
a -> EnvironmentSummary
s {$sel:arn:EnvironmentSummary' :: Text
arn = Text
a} :: EnvironmentSummary)

-- | The time when the environment was created.
environmentSummary_createdAt :: Lens.Lens' EnvironmentSummary Prelude.UTCTime
environmentSummary_createdAt :: (UTCTime -> f UTCTime)
-> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_createdAt = (EnvironmentSummary -> POSIX)
-> (EnvironmentSummary -> POSIX -> EnvironmentSummary)
-> Lens EnvironmentSummary EnvironmentSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {POSIX
createdAt :: POSIX
$sel:createdAt:EnvironmentSummary' :: EnvironmentSummary -> POSIX
createdAt} -> POSIX
createdAt) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} POSIX
a -> EnvironmentSummary
s {$sel:createdAt:EnvironmentSummary' :: POSIX
createdAt = POSIX
a} :: EnvironmentSummary) ((POSIX -> f POSIX) -> EnvironmentSummary -> f EnvironmentSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EnvironmentSummary
-> f EnvironmentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The environment deployment status.
environmentSummary_deploymentStatus :: Lens.Lens' EnvironmentSummary DeploymentStatus
environmentSummary_deploymentStatus :: (DeploymentStatus -> f DeploymentStatus)
-> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_deploymentStatus = (EnvironmentSummary -> DeploymentStatus)
-> (EnvironmentSummary -> DeploymentStatus -> EnvironmentSummary)
-> Lens
     EnvironmentSummary
     EnvironmentSummary
     DeploymentStatus
     DeploymentStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {DeploymentStatus
deploymentStatus :: DeploymentStatus
$sel:deploymentStatus:EnvironmentSummary' :: EnvironmentSummary -> DeploymentStatus
deploymentStatus} -> DeploymentStatus
deploymentStatus) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} DeploymentStatus
a -> EnvironmentSummary
s {$sel:deploymentStatus:EnvironmentSummary' :: DeploymentStatus
deploymentStatus = DeploymentStatus
a} :: EnvironmentSummary)

-- | The time when a deployment of the environment was last attempted.
environmentSummary_lastDeploymentAttemptedAt :: Lens.Lens' EnvironmentSummary Prelude.UTCTime
environmentSummary_lastDeploymentAttemptedAt :: (UTCTime -> f UTCTime)
-> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_lastDeploymentAttemptedAt = (EnvironmentSummary -> POSIX)
-> (EnvironmentSummary -> POSIX -> EnvironmentSummary)
-> Lens EnvironmentSummary EnvironmentSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {POSIX
lastDeploymentAttemptedAt :: POSIX
$sel:lastDeploymentAttemptedAt:EnvironmentSummary' :: EnvironmentSummary -> POSIX
lastDeploymentAttemptedAt} -> POSIX
lastDeploymentAttemptedAt) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} POSIX
a -> EnvironmentSummary
s {$sel:lastDeploymentAttemptedAt:EnvironmentSummary' :: POSIX
lastDeploymentAttemptedAt = POSIX
a} :: EnvironmentSummary) ((POSIX -> f POSIX) -> EnvironmentSummary -> f EnvironmentSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EnvironmentSummary
-> f EnvironmentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The time when the environment was last deployed successfully.
environmentSummary_lastDeploymentSucceededAt :: Lens.Lens' EnvironmentSummary Prelude.UTCTime
environmentSummary_lastDeploymentSucceededAt :: (UTCTime -> f UTCTime)
-> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_lastDeploymentSucceededAt = (EnvironmentSummary -> POSIX)
-> (EnvironmentSummary -> POSIX -> EnvironmentSummary)
-> Lens EnvironmentSummary EnvironmentSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {POSIX
lastDeploymentSucceededAt :: POSIX
$sel:lastDeploymentSucceededAt:EnvironmentSummary' :: EnvironmentSummary -> POSIX
lastDeploymentSucceededAt} -> POSIX
lastDeploymentSucceededAt) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} POSIX
a -> EnvironmentSummary
s {$sel:lastDeploymentSucceededAt:EnvironmentSummary' :: POSIX
lastDeploymentSucceededAt = POSIX
a} :: EnvironmentSummary) ((POSIX -> f POSIX) -> EnvironmentSummary -> f EnvironmentSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EnvironmentSummary
-> f EnvironmentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the environment.
environmentSummary_name :: Lens.Lens' EnvironmentSummary Prelude.Text
environmentSummary_name :: (Text -> f Text) -> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_name = (EnvironmentSummary -> Text)
-> (EnvironmentSummary -> Text -> EnvironmentSummary)
-> Lens EnvironmentSummary EnvironmentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Text
name :: Text
$sel:name:EnvironmentSummary' :: EnvironmentSummary -> Text
name} -> Text
name) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Text
a -> EnvironmentSummary
s {$sel:name:EnvironmentSummary' :: Text
name = Text
a} :: EnvironmentSummary)

-- | The ID of the major version of the environment template.
environmentSummary_templateMajorVersion :: Lens.Lens' EnvironmentSummary Prelude.Text
environmentSummary_templateMajorVersion :: (Text -> f Text) -> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_templateMajorVersion = (EnvironmentSummary -> Text)
-> (EnvironmentSummary -> Text -> EnvironmentSummary)
-> Lens EnvironmentSummary EnvironmentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Text
templateMajorVersion :: Text
$sel:templateMajorVersion:EnvironmentSummary' :: EnvironmentSummary -> Text
templateMajorVersion} -> Text
templateMajorVersion) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Text
a -> EnvironmentSummary
s {$sel:templateMajorVersion:EnvironmentSummary' :: Text
templateMajorVersion = Text
a} :: EnvironmentSummary)

-- | The ID of the minor version of the environment template.
environmentSummary_templateMinorVersion :: Lens.Lens' EnvironmentSummary Prelude.Text
environmentSummary_templateMinorVersion :: (Text -> f Text) -> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_templateMinorVersion = (EnvironmentSummary -> Text)
-> (EnvironmentSummary -> Text -> EnvironmentSummary)
-> Lens EnvironmentSummary EnvironmentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Text
templateMinorVersion :: Text
$sel:templateMinorVersion:EnvironmentSummary' :: EnvironmentSummary -> Text
templateMinorVersion} -> Text
templateMinorVersion) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Text
a -> EnvironmentSummary
s {$sel:templateMinorVersion:EnvironmentSummary' :: Text
templateMinorVersion = Text
a} :: EnvironmentSummary)

-- | The name of the environment template.
environmentSummary_templateName :: Lens.Lens' EnvironmentSummary Prelude.Text
environmentSummary_templateName :: (Text -> f Text) -> EnvironmentSummary -> f EnvironmentSummary
environmentSummary_templateName = (EnvironmentSummary -> Text)
-> (EnvironmentSummary -> Text -> EnvironmentSummary)
-> Lens EnvironmentSummary EnvironmentSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Text
templateName :: Text
$sel:templateName:EnvironmentSummary' :: EnvironmentSummary -> Text
templateName} -> Text
templateName) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Text
a -> EnvironmentSummary
s {$sel:templateName:EnvironmentSummary' :: Text
templateName = Text
a} :: EnvironmentSummary)

instance Core.FromJSON EnvironmentSummary where
  parseJSON :: Value -> Parser EnvironmentSummary
parseJSON =
    String
-> (Object -> Parser EnvironmentSummary)
-> Value
-> Parser EnvironmentSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EnvironmentSummary"
      ( \Object
x ->
          Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Provisioning
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> DeploymentStatus
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Text
-> EnvironmentSummary
EnvironmentSummary'
            (Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe Provisioning
 -> Maybe Text
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Text
 -> POSIX
 -> DeploymentStatus
 -> POSIX
 -> POSIX
 -> Text
 -> Text
 -> Text
 -> Text
 -> EnvironmentSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Text
      -> Maybe Provisioning
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Text
      -> POSIX
      -> DeploymentStatus
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> EnvironmentSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deploymentStatusMessage")
            Parser
  (Maybe Text
   -> Maybe Provisioning
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Text
   -> POSIX
   -> DeploymentStatus
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> EnvironmentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Provisioning
      -> Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Text
      -> POSIX
      -> DeploymentStatus
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> EnvironmentSummary)
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
"environmentAccountId")
            Parser
  (Maybe Provisioning
   -> Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Text
   -> POSIX
   -> DeploymentStatus
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> EnvironmentSummary)
-> Parser (Maybe Provisioning)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Text
      -> POSIX
      -> DeploymentStatus
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> EnvironmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Provisioning)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"provisioning")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Text
   -> POSIX
   -> DeploymentStatus
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> EnvironmentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Text
      -> POSIX
      -> DeploymentStatus
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> EnvironmentSummary)
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
"protonServiceRoleArn")
            Parser
  (Maybe Text
   -> Maybe (Sensitive Text)
   -> Text
   -> POSIX
   -> DeploymentStatus
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> EnvironmentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Text
      -> POSIX
      -> DeploymentStatus
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> EnvironmentSummary)
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
"environmentAccountConnectionId")
            Parser
  (Maybe (Sensitive Text)
   -> Text
   -> POSIX
   -> DeploymentStatus
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> EnvironmentSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Text
      -> POSIX
      -> DeploymentStatus
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> EnvironmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
            Parser
  (Text
   -> POSIX
   -> DeploymentStatus
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> EnvironmentSummary)
-> Parser Text
-> Parser
     (POSIX
      -> DeploymentStatus
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> EnvironmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"arn")
            Parser
  (POSIX
   -> DeploymentStatus
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> EnvironmentSummary)
-> Parser POSIX
-> Parser
     (DeploymentStatus
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> EnvironmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"createdAt")
            Parser
  (DeploymentStatus
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> EnvironmentSummary)
-> Parser DeploymentStatus
-> Parser
     (POSIX
      -> POSIX -> Text -> Text -> Text -> Text -> EnvironmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser DeploymentStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"deploymentStatus")
            Parser
  (POSIX
   -> POSIX -> Text -> Text -> Text -> Text -> EnvironmentSummary)
-> Parser POSIX
-> Parser
     (POSIX -> Text -> Text -> Text -> Text -> EnvironmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"lastDeploymentAttemptedAt")
            Parser
  (POSIX -> Text -> Text -> Text -> Text -> EnvironmentSummary)
-> Parser POSIX
-> Parser (Text -> Text -> Text -> Text -> EnvironmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"lastDeploymentSucceededAt")
            Parser (Text -> Text -> Text -> Text -> EnvironmentSummary)
-> Parser Text
-> Parser (Text -> Text -> Text -> EnvironmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
            Parser (Text -> Text -> Text -> EnvironmentSummary)
-> Parser Text -> Parser (Text -> Text -> EnvironmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"templateMajorVersion")
            Parser (Text -> Text -> EnvironmentSummary)
-> Parser Text -> Parser (Text -> EnvironmentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"templateMinorVersion")
            Parser (Text -> EnvironmentSummary)
-> Parser Text -> Parser EnvironmentSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"templateName")
      )

instance Prelude.Hashable EnvironmentSummary

instance Prelude.NFData EnvironmentSummary