{-# 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.ServiceInstanceSummary
-- 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.ServiceInstanceSummary where

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

-- | A summary of the service instance detail data.
--
-- /See:/ 'newServiceInstanceSummary' smart constructor.
data ServiceInstanceSummary = ServiceInstanceSummary'
  { -- | A service instance deployment status message.
    ServiceInstanceSummary -> Maybe (Sensitive Text)
deploymentStatusMessage :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the service instance.
    ServiceInstanceSummary -> Text
arn :: Prelude.Text,
    -- | The time when the service instance was created.
    ServiceInstanceSummary -> POSIX
createdAt :: Core.POSIX,
    -- | The service instance deployment status.
    ServiceInstanceSummary -> DeploymentStatus
deploymentStatus :: DeploymentStatus,
    -- | The name of the environment that the service instance was deployed into.
    ServiceInstanceSummary -> Text
environmentName :: Prelude.Text,
    -- | The time when a deployment of the service was last attempted.
    ServiceInstanceSummary -> POSIX
lastDeploymentAttemptedAt :: Core.POSIX,
    -- | The time when the service was last deployed successfully.
    ServiceInstanceSummary -> POSIX
lastDeploymentSucceededAt :: Core.POSIX,
    -- | The name of the service instance.
    ServiceInstanceSummary -> Text
name :: Prelude.Text,
    -- | The name of the service that the service instance belongs to.
    ServiceInstanceSummary -> Text
serviceName :: Prelude.Text,
    -- | The ID of the major version of a service template.
    ServiceInstanceSummary -> Text
templateMajorVersion :: Prelude.Text,
    -- | The ID of the minor version of a service template.
    ServiceInstanceSummary -> Text
templateMinorVersion :: Prelude.Text,
    -- | The name of the service template.
    ServiceInstanceSummary -> Text
templateName :: Prelude.Text
  }
  deriving (ServiceInstanceSummary -> ServiceInstanceSummary -> Bool
(ServiceInstanceSummary -> ServiceInstanceSummary -> Bool)
-> (ServiceInstanceSummary -> ServiceInstanceSummary -> Bool)
-> Eq ServiceInstanceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceInstanceSummary -> ServiceInstanceSummary -> Bool
$c/= :: ServiceInstanceSummary -> ServiceInstanceSummary -> Bool
== :: ServiceInstanceSummary -> ServiceInstanceSummary -> Bool
$c== :: ServiceInstanceSummary -> ServiceInstanceSummary -> Bool
Prelude.Eq, Int -> ServiceInstanceSummary -> ShowS
[ServiceInstanceSummary] -> ShowS
ServiceInstanceSummary -> String
(Int -> ServiceInstanceSummary -> ShowS)
-> (ServiceInstanceSummary -> String)
-> ([ServiceInstanceSummary] -> ShowS)
-> Show ServiceInstanceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceInstanceSummary] -> ShowS
$cshowList :: [ServiceInstanceSummary] -> ShowS
show :: ServiceInstanceSummary -> String
$cshow :: ServiceInstanceSummary -> String
showsPrec :: Int -> ServiceInstanceSummary -> ShowS
$cshowsPrec :: Int -> ServiceInstanceSummary -> ShowS
Prelude.Show, (forall x. ServiceInstanceSummary -> Rep ServiceInstanceSummary x)
-> (forall x.
    Rep ServiceInstanceSummary x -> ServiceInstanceSummary)
-> Generic ServiceInstanceSummary
forall x. Rep ServiceInstanceSummary x -> ServiceInstanceSummary
forall x. ServiceInstanceSummary -> Rep ServiceInstanceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceInstanceSummary x -> ServiceInstanceSummary
$cfrom :: forall x. ServiceInstanceSummary -> Rep ServiceInstanceSummary x
Prelude.Generic)

-- |
-- Create a value of 'ServiceInstanceSummary' 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', 'serviceInstanceSummary_deploymentStatusMessage' - A service instance deployment status message.
--
-- 'arn', 'serviceInstanceSummary_arn' - The Amazon Resource Name (ARN) of the service instance.
--
-- 'createdAt', 'serviceInstanceSummary_createdAt' - The time when the service instance was created.
--
-- 'deploymentStatus', 'serviceInstanceSummary_deploymentStatus' - The service instance deployment status.
--
-- 'environmentName', 'serviceInstanceSummary_environmentName' - The name of the environment that the service instance was deployed into.
--
-- 'lastDeploymentAttemptedAt', 'serviceInstanceSummary_lastDeploymentAttemptedAt' - The time when a deployment of the service was last attempted.
--
-- 'lastDeploymentSucceededAt', 'serviceInstanceSummary_lastDeploymentSucceededAt' - The time when the service was last deployed successfully.
--
-- 'name', 'serviceInstanceSummary_name' - The name of the service instance.
--
-- 'serviceName', 'serviceInstanceSummary_serviceName' - The name of the service that the service instance belongs to.
--
-- 'templateMajorVersion', 'serviceInstanceSummary_templateMajorVersion' - The ID of the major version of a service template.
--
-- 'templateMinorVersion', 'serviceInstanceSummary_templateMinorVersion' - The ID of the minor version of a service template.
--
-- 'templateName', 'serviceInstanceSummary_templateName' - The name of the service template.
newServiceInstanceSummary ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'deploymentStatus'
  DeploymentStatus ->
  -- | 'environmentName'
  Prelude.Text ->
  -- | 'lastDeploymentAttemptedAt'
  Prelude.UTCTime ->
  -- | 'lastDeploymentSucceededAt'
  Prelude.UTCTime ->
  -- | 'name'
  Prelude.Text ->
  -- | 'serviceName'
  Prelude.Text ->
  -- | 'templateMajorVersion'
  Prelude.Text ->
  -- | 'templateMinorVersion'
  Prelude.Text ->
  -- | 'templateName'
  Prelude.Text ->
  ServiceInstanceSummary
newServiceInstanceSummary :: Text
-> UTCTime
-> DeploymentStatus
-> Text
-> UTCTime
-> UTCTime
-> Text
-> Text
-> Text
-> Text
-> Text
-> ServiceInstanceSummary
newServiceInstanceSummary
  Text
pArn_
  UTCTime
pCreatedAt_
  DeploymentStatus
pDeploymentStatus_
  Text
pEnvironmentName_
  UTCTime
pLastDeploymentAttemptedAt_
  UTCTime
pLastDeploymentSucceededAt_
  Text
pName_
  Text
pServiceName_
  Text
pTemplateMajorVersion_
  Text
pTemplateMinorVersion_
  Text
pTemplateName_ =
    ServiceInstanceSummary' :: Maybe (Sensitive Text)
-> Text
-> POSIX
-> DeploymentStatus
-> Text
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Text
-> Text
-> ServiceInstanceSummary
ServiceInstanceSummary'
      { $sel:deploymentStatusMessage:ServiceInstanceSummary' :: Maybe (Sensitive Text)
deploymentStatusMessage =
          Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:arn:ServiceInstanceSummary' :: Text
arn = Text
pArn_,
        $sel:createdAt:ServiceInstanceSummary' :: 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:ServiceInstanceSummary' :: DeploymentStatus
deploymentStatus = DeploymentStatus
pDeploymentStatus_,
        $sel:environmentName:ServiceInstanceSummary' :: Text
environmentName = Text
pEnvironmentName_,
        $sel:lastDeploymentAttemptedAt:ServiceInstanceSummary' :: 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:ServiceInstanceSummary' :: 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:ServiceInstanceSummary' :: Text
name = Text
pName_,
        $sel:serviceName:ServiceInstanceSummary' :: Text
serviceName = Text
pServiceName_,
        $sel:templateMajorVersion:ServiceInstanceSummary' :: Text
templateMajorVersion = Text
pTemplateMajorVersion_,
        $sel:templateMinorVersion:ServiceInstanceSummary' :: Text
templateMinorVersion = Text
pTemplateMinorVersion_,
        $sel:templateName:ServiceInstanceSummary' :: Text
templateName = Text
pTemplateName_
      }

-- | A service instance deployment status message.
serviceInstanceSummary_deploymentStatusMessage :: Lens.Lens' ServiceInstanceSummary (Prelude.Maybe Prelude.Text)
serviceInstanceSummary_deploymentStatusMessage :: (Maybe Text -> f (Maybe Text))
-> ServiceInstanceSummary -> f ServiceInstanceSummary
serviceInstanceSummary_deploymentStatusMessage = (ServiceInstanceSummary -> Maybe (Sensitive Text))
-> (ServiceInstanceSummary
    -> Maybe (Sensitive Text) -> ServiceInstanceSummary)
-> Lens
     ServiceInstanceSummary
     ServiceInstanceSummary
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInstanceSummary' {Maybe (Sensitive Text)
deploymentStatusMessage :: Maybe (Sensitive Text)
$sel:deploymentStatusMessage:ServiceInstanceSummary' :: ServiceInstanceSummary -> Maybe (Sensitive Text)
deploymentStatusMessage} -> Maybe (Sensitive Text)
deploymentStatusMessage) (\s :: ServiceInstanceSummary
s@ServiceInstanceSummary' {} Maybe (Sensitive Text)
a -> ServiceInstanceSummary
s {$sel:deploymentStatusMessage:ServiceInstanceSummary' :: Maybe (Sensitive Text)
deploymentStatusMessage = Maybe (Sensitive Text)
a} :: ServiceInstanceSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> ServiceInstanceSummary -> f ServiceInstanceSummary)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ServiceInstanceSummary
-> f ServiceInstanceSummary
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 service instance.
serviceInstanceSummary_arn :: Lens.Lens' ServiceInstanceSummary Prelude.Text
serviceInstanceSummary_arn :: (Text -> f Text)
-> ServiceInstanceSummary -> f ServiceInstanceSummary
serviceInstanceSummary_arn = (ServiceInstanceSummary -> Text)
-> (ServiceInstanceSummary -> Text -> ServiceInstanceSummary)
-> Lens ServiceInstanceSummary ServiceInstanceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInstanceSummary' {Text
arn :: Text
$sel:arn:ServiceInstanceSummary' :: ServiceInstanceSummary -> Text
arn} -> Text
arn) (\s :: ServiceInstanceSummary
s@ServiceInstanceSummary' {} Text
a -> ServiceInstanceSummary
s {$sel:arn:ServiceInstanceSummary' :: Text
arn = Text
a} :: ServiceInstanceSummary)

-- | The time when the service instance was created.
serviceInstanceSummary_createdAt :: Lens.Lens' ServiceInstanceSummary Prelude.UTCTime
serviceInstanceSummary_createdAt :: (UTCTime -> f UTCTime)
-> ServiceInstanceSummary -> f ServiceInstanceSummary
serviceInstanceSummary_createdAt = (ServiceInstanceSummary -> POSIX)
-> (ServiceInstanceSummary -> POSIX -> ServiceInstanceSummary)
-> Lens ServiceInstanceSummary ServiceInstanceSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInstanceSummary' {POSIX
createdAt :: POSIX
$sel:createdAt:ServiceInstanceSummary' :: ServiceInstanceSummary -> POSIX
createdAt} -> POSIX
createdAt) (\s :: ServiceInstanceSummary
s@ServiceInstanceSummary' {} POSIX
a -> ServiceInstanceSummary
s {$sel:createdAt:ServiceInstanceSummary' :: POSIX
createdAt = POSIX
a} :: ServiceInstanceSummary) ((POSIX -> f POSIX)
 -> ServiceInstanceSummary -> f ServiceInstanceSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ServiceInstanceSummary
-> f ServiceInstanceSummary
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 service instance deployment status.
serviceInstanceSummary_deploymentStatus :: Lens.Lens' ServiceInstanceSummary DeploymentStatus
serviceInstanceSummary_deploymentStatus :: (DeploymentStatus -> f DeploymentStatus)
-> ServiceInstanceSummary -> f ServiceInstanceSummary
serviceInstanceSummary_deploymentStatus = (ServiceInstanceSummary -> DeploymentStatus)
-> (ServiceInstanceSummary
    -> DeploymentStatus -> ServiceInstanceSummary)
-> Lens
     ServiceInstanceSummary
     ServiceInstanceSummary
     DeploymentStatus
     DeploymentStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInstanceSummary' {DeploymentStatus
deploymentStatus :: DeploymentStatus
$sel:deploymentStatus:ServiceInstanceSummary' :: ServiceInstanceSummary -> DeploymentStatus
deploymentStatus} -> DeploymentStatus
deploymentStatus) (\s :: ServiceInstanceSummary
s@ServiceInstanceSummary' {} DeploymentStatus
a -> ServiceInstanceSummary
s {$sel:deploymentStatus:ServiceInstanceSummary' :: DeploymentStatus
deploymentStatus = DeploymentStatus
a} :: ServiceInstanceSummary)

-- | The name of the environment that the service instance was deployed into.
serviceInstanceSummary_environmentName :: Lens.Lens' ServiceInstanceSummary Prelude.Text
serviceInstanceSummary_environmentName :: (Text -> f Text)
-> ServiceInstanceSummary -> f ServiceInstanceSummary
serviceInstanceSummary_environmentName = (ServiceInstanceSummary -> Text)
-> (ServiceInstanceSummary -> Text -> ServiceInstanceSummary)
-> Lens ServiceInstanceSummary ServiceInstanceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInstanceSummary' {Text
environmentName :: Text
$sel:environmentName:ServiceInstanceSummary' :: ServiceInstanceSummary -> Text
environmentName} -> Text
environmentName) (\s :: ServiceInstanceSummary
s@ServiceInstanceSummary' {} Text
a -> ServiceInstanceSummary
s {$sel:environmentName:ServiceInstanceSummary' :: Text
environmentName = Text
a} :: ServiceInstanceSummary)

-- | The time when a deployment of the service was last attempted.
serviceInstanceSummary_lastDeploymentAttemptedAt :: Lens.Lens' ServiceInstanceSummary Prelude.UTCTime
serviceInstanceSummary_lastDeploymentAttemptedAt :: (UTCTime -> f UTCTime)
-> ServiceInstanceSummary -> f ServiceInstanceSummary
serviceInstanceSummary_lastDeploymentAttemptedAt = (ServiceInstanceSummary -> POSIX)
-> (ServiceInstanceSummary -> POSIX -> ServiceInstanceSummary)
-> Lens ServiceInstanceSummary ServiceInstanceSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInstanceSummary' {POSIX
lastDeploymentAttemptedAt :: POSIX
$sel:lastDeploymentAttemptedAt:ServiceInstanceSummary' :: ServiceInstanceSummary -> POSIX
lastDeploymentAttemptedAt} -> POSIX
lastDeploymentAttemptedAt) (\s :: ServiceInstanceSummary
s@ServiceInstanceSummary' {} POSIX
a -> ServiceInstanceSummary
s {$sel:lastDeploymentAttemptedAt:ServiceInstanceSummary' :: POSIX
lastDeploymentAttemptedAt = POSIX
a} :: ServiceInstanceSummary) ((POSIX -> f POSIX)
 -> ServiceInstanceSummary -> f ServiceInstanceSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ServiceInstanceSummary
-> f ServiceInstanceSummary
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 service was last deployed successfully.
serviceInstanceSummary_lastDeploymentSucceededAt :: Lens.Lens' ServiceInstanceSummary Prelude.UTCTime
serviceInstanceSummary_lastDeploymentSucceededAt :: (UTCTime -> f UTCTime)
-> ServiceInstanceSummary -> f ServiceInstanceSummary
serviceInstanceSummary_lastDeploymentSucceededAt = (ServiceInstanceSummary -> POSIX)
-> (ServiceInstanceSummary -> POSIX -> ServiceInstanceSummary)
-> Lens ServiceInstanceSummary ServiceInstanceSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInstanceSummary' {POSIX
lastDeploymentSucceededAt :: POSIX
$sel:lastDeploymentSucceededAt:ServiceInstanceSummary' :: ServiceInstanceSummary -> POSIX
lastDeploymentSucceededAt} -> POSIX
lastDeploymentSucceededAt) (\s :: ServiceInstanceSummary
s@ServiceInstanceSummary' {} POSIX
a -> ServiceInstanceSummary
s {$sel:lastDeploymentSucceededAt:ServiceInstanceSummary' :: POSIX
lastDeploymentSucceededAt = POSIX
a} :: ServiceInstanceSummary) ((POSIX -> f POSIX)
 -> ServiceInstanceSummary -> f ServiceInstanceSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ServiceInstanceSummary
-> f ServiceInstanceSummary
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 service instance.
serviceInstanceSummary_name :: Lens.Lens' ServiceInstanceSummary Prelude.Text
serviceInstanceSummary_name :: (Text -> f Text)
-> ServiceInstanceSummary -> f ServiceInstanceSummary
serviceInstanceSummary_name = (ServiceInstanceSummary -> Text)
-> (ServiceInstanceSummary -> Text -> ServiceInstanceSummary)
-> Lens ServiceInstanceSummary ServiceInstanceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInstanceSummary' {Text
name :: Text
$sel:name:ServiceInstanceSummary' :: ServiceInstanceSummary -> Text
name} -> Text
name) (\s :: ServiceInstanceSummary
s@ServiceInstanceSummary' {} Text
a -> ServiceInstanceSummary
s {$sel:name:ServiceInstanceSummary' :: Text
name = Text
a} :: ServiceInstanceSummary)

-- | The name of the service that the service instance belongs to.
serviceInstanceSummary_serviceName :: Lens.Lens' ServiceInstanceSummary Prelude.Text
serviceInstanceSummary_serviceName :: (Text -> f Text)
-> ServiceInstanceSummary -> f ServiceInstanceSummary
serviceInstanceSummary_serviceName = (ServiceInstanceSummary -> Text)
-> (ServiceInstanceSummary -> Text -> ServiceInstanceSummary)
-> Lens ServiceInstanceSummary ServiceInstanceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInstanceSummary' {Text
serviceName :: Text
$sel:serviceName:ServiceInstanceSummary' :: ServiceInstanceSummary -> Text
serviceName} -> Text
serviceName) (\s :: ServiceInstanceSummary
s@ServiceInstanceSummary' {} Text
a -> ServiceInstanceSummary
s {$sel:serviceName:ServiceInstanceSummary' :: Text
serviceName = Text
a} :: ServiceInstanceSummary)

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

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

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

instance Core.FromJSON ServiceInstanceSummary where
  parseJSON :: Value -> Parser ServiceInstanceSummary
parseJSON =
    String
-> (Object -> Parser ServiceInstanceSummary)
-> Value
-> Parser ServiceInstanceSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ServiceInstanceSummary"
      ( \Object
x ->
          Maybe (Sensitive Text)
-> Text
-> POSIX
-> DeploymentStatus
-> Text
-> POSIX
-> POSIX
-> Text
-> Text
-> Text
-> Text
-> Text
-> ServiceInstanceSummary
ServiceInstanceSummary'
            (Maybe (Sensitive Text)
 -> Text
 -> POSIX
 -> DeploymentStatus
 -> Text
 -> POSIX
 -> POSIX
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> ServiceInstanceSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Text
      -> POSIX
      -> DeploymentStatus
      -> Text
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> ServiceInstanceSummary)
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
  (Text
   -> POSIX
   -> DeploymentStatus
   -> Text
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> ServiceInstanceSummary)
-> Parser Text
-> Parser
     (POSIX
      -> DeploymentStatus
      -> Text
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> ServiceInstanceSummary)
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
   -> Text
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> ServiceInstanceSummary)
-> Parser POSIX
-> Parser
     (DeploymentStatus
      -> Text
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> ServiceInstanceSummary)
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
   -> Text
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> ServiceInstanceSummary)
-> Parser DeploymentStatus
-> Parser
     (Text
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> ServiceInstanceSummary)
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
  (Text
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> ServiceInstanceSummary)
-> Parser Text
-> Parser
     (POSIX
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> ServiceInstanceSummary)
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
"environmentName")
            Parser
  (POSIX
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> ServiceInstanceSummary)
-> Parser POSIX
-> Parser
     (POSIX
      -> Text -> Text -> Text -> Text -> Text -> ServiceInstanceSummary)
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 -> Text -> ServiceInstanceSummary)
-> Parser POSIX
-> Parser
     (Text -> Text -> Text -> Text -> Text -> ServiceInstanceSummary)
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 -> Text -> ServiceInstanceSummary)
-> Parser Text
-> Parser (Text -> Text -> Text -> Text -> ServiceInstanceSummary)
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 -> Text -> ServiceInstanceSummary)
-> Parser Text
-> Parser (Text -> Text -> Text -> ServiceInstanceSummary)
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
"serviceName")
            Parser (Text -> Text -> Text -> ServiceInstanceSummary)
-> Parser Text -> Parser (Text -> Text -> ServiceInstanceSummary)
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 -> ServiceInstanceSummary)
-> Parser Text -> Parser (Text -> ServiceInstanceSummary)
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 -> ServiceInstanceSummary)
-> Parser Text -> Parser ServiceInstanceSummary
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 ServiceInstanceSummary

instance Prelude.NFData ServiceInstanceSummary