{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Proton.Types.EnvironmentSummary where

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

-- | Summary data of an Proton environment resource. An Proton environment is
-- a set of resources shared across Proton services.
--
-- /See:/ 'newEnvironmentSummary' smart constructor.
data EnvironmentSummary = EnvironmentSummary'
  { -- | The Amazon Resource Name (ARN) of the IAM service role that Proton uses
    -- when provisioning directly defined components in this environment. It
    -- determines the scope of infrastructure that a component can provision.
    --
    -- The environment must have a @componentRoleArn@ to allow directly defined
    -- components to be associated with the environment.
    --
    -- For more information about components, see
    -- <https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html Proton components>
    -- in the /Proton User Guide/.
    EnvironmentSummary -> Maybe Text
componentRoleArn :: Prelude.Maybe Prelude.Text,
    -- | An environment deployment status message.
    EnvironmentSummary -> Maybe (Sensitive Text)
deploymentStatusMessage :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The description of the environment.
    EnvironmentSummary -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The ID of the environment account connection that the environment is
    -- associated with.
    EnvironmentSummary -> Maybe Text
environmentAccountConnectionId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the environment account that the environment infrastructure
    -- resources are provisioned in.
    EnvironmentSummary -> Maybe Text
environmentAccountId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the Proton service role that allows
    -- Proton to make calls to other services on your behalf.
    EnvironmentSummary -> Maybe Text
protonServiceRoleArn :: 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 environment.
    EnvironmentSummary -> Text
arn :: Prelude.Text,
    -- | The time when the environment was created.
    EnvironmentSummary -> POSIX
createdAt :: Data.POSIX,
    -- | The environment deployment status.
    EnvironmentSummary -> DeploymentStatus
deploymentStatus :: DeploymentStatus,
    -- | The time when a deployment of the environment was last attempted.
    EnvironmentSummary -> POSIX
lastDeploymentAttemptedAt :: Data.POSIX,
    -- | The time when the environment was last deployed successfully.
    EnvironmentSummary -> POSIX
lastDeploymentSucceededAt :: Data.POSIX,
    -- | The name of the environment.
    EnvironmentSummary -> Text
name :: Prelude.Text,
    -- | The major version of the environment template.
    EnvironmentSummary -> Text
templateMajorVersion :: Prelude.Text,
    -- | 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
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
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. 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:
--
-- 'componentRoleArn', 'environmentSummary_componentRoleArn' - The Amazon Resource Name (ARN) of the IAM service role that Proton uses
-- when provisioning directly defined components in this environment. It
-- determines the scope of infrastructure that a component can provision.
--
-- The environment must have a @componentRoleArn@ to allow directly defined
-- components to be associated with the environment.
--
-- For more information about components, see
-- <https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html Proton components>
-- in the /Proton User Guide/.
--
-- 'deploymentStatusMessage', 'environmentSummary_deploymentStatusMessage' - An environment deployment status message.
--
-- 'description', 'environmentSummary_description' - The description of the environment.
--
-- 'environmentAccountConnectionId', 'environmentSummary_environmentAccountConnectionId' - The ID of the environment account connection that the environment is
-- associated with.
--
-- 'environmentAccountId', 'environmentSummary_environmentAccountId' - The ID of the environment account that the environment infrastructure
-- resources are provisioned in.
--
-- 'protonServiceRoleArn', 'environmentSummary_protonServiceRoleArn' - The Amazon Resource Name (ARN) of the Proton service role that allows
-- Proton to make calls to other services on your behalf.
--
-- 'provisioning', 'environmentSummary_provisioning' - When included, indicates that the environment template is for customer
-- provisioned and managed infrastructure.
--
-- '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 major version of the environment template.
--
-- 'templateMinorVersion', 'environmentSummary_templateMinorVersion' - 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'
      { $sel:componentRoleArn:EnvironmentSummary' :: Maybe Text
componentRoleArn =
          forall a. Maybe a
Prelude.Nothing,
        $sel:deploymentStatusMessage:EnvironmentSummary' :: Maybe (Sensitive Text)
deploymentStatusMessage = forall a. Maybe a
Prelude.Nothing,
        $sel:description:EnvironmentSummary' :: Maybe (Sensitive Text)
description = forall a. Maybe a
Prelude.Nothing,
        $sel:environmentAccountConnectionId:EnvironmentSummary' :: Maybe Text
environmentAccountConnectionId = forall a. Maybe a
Prelude.Nothing,
        $sel:environmentAccountId:EnvironmentSummary' :: Maybe Text
environmentAccountId = forall a. Maybe a
Prelude.Nothing,
        $sel:protonServiceRoleArn:EnvironmentSummary' :: Maybe Text
protonServiceRoleArn = forall a. Maybe a
Prelude.Nothing,
        $sel:provisioning:EnvironmentSummary' :: Maybe Provisioning
provisioning = forall a. Maybe a
Prelude.Nothing,
        $sel:arn:EnvironmentSummary' :: Text
arn = Text
pArn_,
        $sel:createdAt:EnvironmentSummary' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
        $sel:deploymentStatus:EnvironmentSummary' :: DeploymentStatus
deploymentStatus = DeploymentStatus
pDeploymentStatus_,
        $sel:lastDeploymentAttemptedAt:EnvironmentSummary' :: POSIX
lastDeploymentAttemptedAt =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastDeploymentAttemptedAt_,
        $sel:lastDeploymentSucceededAt:EnvironmentSummary' :: POSIX
lastDeploymentSucceededAt =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time 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_
      }

-- | The Amazon Resource Name (ARN) of the IAM service role that Proton uses
-- when provisioning directly defined components in this environment. It
-- determines the scope of infrastructure that a component can provision.
--
-- The environment must have a @componentRoleArn@ to allow directly defined
-- components to be associated with the environment.
--
-- For more information about components, see
-- <https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html Proton components>
-- in the /Proton User Guide/.
environmentSummary_componentRoleArn :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_componentRoleArn :: Lens' EnvironmentSummary (Maybe Text)
environmentSummary_componentRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentSummary' {Maybe Text
componentRoleArn :: Maybe Text
$sel:componentRoleArn:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
componentRoleArn} -> Maybe Text
componentRoleArn) (\s :: EnvironmentSummary
s@EnvironmentSummary' {} Maybe Text
a -> EnvironmentSummary
s {$sel:componentRoleArn:EnvironmentSummary' :: Maybe Text
componentRoleArn = Maybe Text
a} :: EnvironmentSummary)

-- | An environment deployment status message.
environmentSummary_deploymentStatusMessage :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_deploymentStatusMessage :: Lens' EnvironmentSummary (Maybe Text)
environmentSummary_deploymentStatusMessage = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The description of the environment.
environmentSummary_description :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_description :: Lens' EnvironmentSummary (Maybe Text)
environmentSummary_description = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The ID of the environment account connection that the environment is
-- associated with.
environmentSummary_environmentAccountConnectionId :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_environmentAccountConnectionId :: Lens' EnvironmentSummary (Maybe Text)
environmentSummary_environmentAccountConnectionId = 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 ID of the environment account that the environment infrastructure
-- resources are provisioned in.
environmentSummary_environmentAccountId :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_environmentAccountId :: Lens' EnvironmentSummary (Maybe Text)
environmentSummary_environmentAccountId = 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)

-- | The Amazon Resource Name (ARN) of the Proton service role that allows
-- Proton to make calls to other services on your behalf.
environmentSummary_protonServiceRoleArn :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Prelude.Text)
environmentSummary_protonServiceRoleArn :: Lens' EnvironmentSummary (Maybe Text)
environmentSummary_protonServiceRoleArn = 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)

-- | When included, indicates that the environment template is for customer
-- provisioned and managed infrastructure.
environmentSummary_provisioning :: Lens.Lens' EnvironmentSummary (Prelude.Maybe Provisioning)
environmentSummary_provisioning :: Lens' EnvironmentSummary (Maybe Provisioning)
environmentSummary_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 environment.
environmentSummary_arn :: Lens.Lens' EnvironmentSummary Prelude.Text
environmentSummary_arn :: Lens' EnvironmentSummary Text
environmentSummary_arn = 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 :: Lens' EnvironmentSummary UTCTime
environmentSummary_createdAt = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The environment deployment status.
environmentSummary_deploymentStatus :: Lens.Lens' EnvironmentSummary DeploymentStatus
environmentSummary_deploymentStatus :: Lens' EnvironmentSummary DeploymentStatus
environmentSummary_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 :: Lens' EnvironmentSummary UTCTime
environmentSummary_lastDeploymentAttemptedAt = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The time when the environment was last deployed successfully.
environmentSummary_lastDeploymentSucceededAt :: Lens.Lens' EnvironmentSummary Prelude.UTCTime
environmentSummary_lastDeploymentSucceededAt :: Lens' EnvironmentSummary UTCTime
environmentSummary_lastDeploymentSucceededAt = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The name of the environment.
environmentSummary_name :: Lens.Lens' EnvironmentSummary Prelude.Text
environmentSummary_name :: Lens' EnvironmentSummary Text
environmentSummary_name = 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 major version of the environment template.
environmentSummary_templateMajorVersion :: Lens.Lens' EnvironmentSummary Prelude.Text
environmentSummary_templateMajorVersion :: Lens' EnvironmentSummary Text
environmentSummary_templateMajorVersion = 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 minor version of the environment template.
environmentSummary_templateMinorVersion :: Lens.Lens' EnvironmentSummary Prelude.Text
environmentSummary_templateMinorVersion :: Lens' EnvironmentSummary Text
environmentSummary_templateMinorVersion = 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 :: Lens' EnvironmentSummary Text
environmentSummary_templateName = 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 Data.FromJSON EnvironmentSummary where
  parseJSON :: Value -> Parser EnvironmentSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"EnvironmentSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Provisioning
-> Text
-> POSIX
-> DeploymentStatus
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Text
-> EnvironmentSummary
EnvironmentSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"componentRoleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"deploymentStatusMessage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"environmentAccountConnectionId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"environmentAccountId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"protonServiceRoleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"provisioning")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"createdAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"deploymentStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"lastDeploymentAttemptedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"lastDeploymentSucceededAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"templateMajorVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"templateMinorVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"templateName")
      )

instance Prelude.Hashable EnvironmentSummary where
  hashWithSalt :: Int -> EnvironmentSummary -> Int
hashWithSalt Int
_salt EnvironmentSummary' {Maybe Text
Maybe (Sensitive Text)
Maybe Provisioning
Text
POSIX
DeploymentStatus
templateName :: Text
templateMinorVersion :: Text
templateMajorVersion :: Text
name :: Text
lastDeploymentSucceededAt :: POSIX
lastDeploymentAttemptedAt :: POSIX
deploymentStatus :: DeploymentStatus
createdAt :: POSIX
arn :: Text
provisioning :: Maybe Provisioning
protonServiceRoleArn :: Maybe Text
environmentAccountId :: Maybe Text
environmentAccountConnectionId :: Maybe Text
description :: Maybe (Sensitive Text)
deploymentStatusMessage :: Maybe (Sensitive Text)
componentRoleArn :: Maybe Text
$sel:templateName:EnvironmentSummary' :: EnvironmentSummary -> Text
$sel:templateMinorVersion:EnvironmentSummary' :: EnvironmentSummary -> Text
$sel:templateMajorVersion:EnvironmentSummary' :: EnvironmentSummary -> Text
$sel:name:EnvironmentSummary' :: EnvironmentSummary -> Text
$sel:lastDeploymentSucceededAt:EnvironmentSummary' :: EnvironmentSummary -> POSIX
$sel:lastDeploymentAttemptedAt:EnvironmentSummary' :: EnvironmentSummary -> POSIX
$sel:deploymentStatus:EnvironmentSummary' :: EnvironmentSummary -> DeploymentStatus
$sel:createdAt:EnvironmentSummary' :: EnvironmentSummary -> POSIX
$sel:arn:EnvironmentSummary' :: EnvironmentSummary -> Text
$sel:provisioning:EnvironmentSummary' :: EnvironmentSummary -> Maybe Provisioning
$sel:protonServiceRoleArn:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
$sel:environmentAccountId:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
$sel:environmentAccountConnectionId:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
$sel:description:EnvironmentSummary' :: EnvironmentSummary -> Maybe (Sensitive Text)
$sel:deploymentStatusMessage:EnvironmentSummary' :: EnvironmentSummary -> Maybe (Sensitive Text)
$sel:componentRoleArn:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
deploymentStatusMessage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
environmentAccountConnectionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
environmentAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
protonServiceRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Provisioning
provisioning
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DeploymentStatus
deploymentStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastDeploymentAttemptedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastDeploymentSucceededAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateMajorVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateMinorVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateName

instance Prelude.NFData EnvironmentSummary where
  rnf :: EnvironmentSummary -> ()
rnf EnvironmentSummary' {Maybe Text
Maybe (Sensitive Text)
Maybe Provisioning
Text
POSIX
DeploymentStatus
templateName :: Text
templateMinorVersion :: Text
templateMajorVersion :: Text
name :: Text
lastDeploymentSucceededAt :: POSIX
lastDeploymentAttemptedAt :: POSIX
deploymentStatus :: DeploymentStatus
createdAt :: POSIX
arn :: Text
provisioning :: Maybe Provisioning
protonServiceRoleArn :: Maybe Text
environmentAccountId :: Maybe Text
environmentAccountConnectionId :: Maybe Text
description :: Maybe (Sensitive Text)
deploymentStatusMessage :: Maybe (Sensitive Text)
componentRoleArn :: Maybe Text
$sel:templateName:EnvironmentSummary' :: EnvironmentSummary -> Text
$sel:templateMinorVersion:EnvironmentSummary' :: EnvironmentSummary -> Text
$sel:templateMajorVersion:EnvironmentSummary' :: EnvironmentSummary -> Text
$sel:name:EnvironmentSummary' :: EnvironmentSummary -> Text
$sel:lastDeploymentSucceededAt:EnvironmentSummary' :: EnvironmentSummary -> POSIX
$sel:lastDeploymentAttemptedAt:EnvironmentSummary' :: EnvironmentSummary -> POSIX
$sel:deploymentStatus:EnvironmentSummary' :: EnvironmentSummary -> DeploymentStatus
$sel:createdAt:EnvironmentSummary' :: EnvironmentSummary -> POSIX
$sel:arn:EnvironmentSummary' :: EnvironmentSummary -> Text
$sel:provisioning:EnvironmentSummary' :: EnvironmentSummary -> Maybe Provisioning
$sel:protonServiceRoleArn:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
$sel:environmentAccountId:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
$sel:environmentAccountConnectionId:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
$sel:description:EnvironmentSummary' :: EnvironmentSummary -> Maybe (Sensitive Text)
$sel:deploymentStatusMessage:EnvironmentSummary' :: EnvironmentSummary -> Maybe (Sensitive Text)
$sel:componentRoleArn:EnvironmentSummary' :: EnvironmentSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
deploymentStatusMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
environmentAccountConnectionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
environmentAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
protonServiceRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Provisioning
provisioning
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DeploymentStatus
deploymentStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastDeploymentAttemptedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastDeploymentSucceededAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateMajorVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateMinorVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateName