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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.Types.CompatibleEnvironmentTemplate
import Amazonka.Proton.Types.TemplateVersionStatus

-- | The version of a service template detail data.
--
-- /See:/ 'newServiceTemplateVersion' smart constructor.
data ServiceTemplateVersion = ServiceTemplateVersion'
  { -- | The schema of the version of a service template.
    ServiceTemplateVersion -> Maybe (Sensitive Text)
schema :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | A service template version status message.
    ServiceTemplateVersion -> Maybe (Sensitive Text)
statusMessage :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The ID of the recommended minor version of the service template.
    ServiceTemplateVersion -> Maybe Text
recommendedMinorVersion :: Prelude.Maybe Prelude.Text,
    -- | A description of the version of a service template.
    ServiceTemplateVersion -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the version of a service template.
    ServiceTemplateVersion -> Text
arn :: Prelude.Text,
    -- | An array of compatible environment template names for the major version
    -- of a service template.
    ServiceTemplateVersion -> [CompatibleEnvironmentTemplate]
compatibleEnvironmentTemplates :: [CompatibleEnvironmentTemplate],
    -- | The time when the version of a service template was created.
    ServiceTemplateVersion -> POSIX
createdAt :: Core.POSIX,
    -- | The time when the version of a service template was last modified.
    ServiceTemplateVersion -> POSIX
lastModifiedAt :: Core.POSIX,
    -- | The ID of the latest major version that\'s associated with the version
    -- of a service template.
    ServiceTemplateVersion -> Text
majorVersion :: Prelude.Text,
    -- | The ID of the minor version of a service template.
    ServiceTemplateVersion -> Text
minorVersion :: Prelude.Text,
    -- | The service template version status.
    ServiceTemplateVersion -> TemplateVersionStatus
status :: TemplateVersionStatus,
    -- | The name of the version of a service template.
    ServiceTemplateVersion -> Text
templateName :: Prelude.Text
  }
  deriving (ServiceTemplateVersion -> ServiceTemplateVersion -> Bool
(ServiceTemplateVersion -> ServiceTemplateVersion -> Bool)
-> (ServiceTemplateVersion -> ServiceTemplateVersion -> Bool)
-> Eq ServiceTemplateVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceTemplateVersion -> ServiceTemplateVersion -> Bool
$c/= :: ServiceTemplateVersion -> ServiceTemplateVersion -> Bool
== :: ServiceTemplateVersion -> ServiceTemplateVersion -> Bool
$c== :: ServiceTemplateVersion -> ServiceTemplateVersion -> Bool
Prelude.Eq, Int -> ServiceTemplateVersion -> ShowS
[ServiceTemplateVersion] -> ShowS
ServiceTemplateVersion -> String
(Int -> ServiceTemplateVersion -> ShowS)
-> (ServiceTemplateVersion -> String)
-> ([ServiceTemplateVersion] -> ShowS)
-> Show ServiceTemplateVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceTemplateVersion] -> ShowS
$cshowList :: [ServiceTemplateVersion] -> ShowS
show :: ServiceTemplateVersion -> String
$cshow :: ServiceTemplateVersion -> String
showsPrec :: Int -> ServiceTemplateVersion -> ShowS
$cshowsPrec :: Int -> ServiceTemplateVersion -> ShowS
Prelude.Show, (forall x. ServiceTemplateVersion -> Rep ServiceTemplateVersion x)
-> (forall x.
    Rep ServiceTemplateVersion x -> ServiceTemplateVersion)
-> Generic ServiceTemplateVersion
forall x. Rep ServiceTemplateVersion x -> ServiceTemplateVersion
forall x. ServiceTemplateVersion -> Rep ServiceTemplateVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceTemplateVersion x -> ServiceTemplateVersion
$cfrom :: forall x. ServiceTemplateVersion -> Rep ServiceTemplateVersion x
Prelude.Generic)

-- |
-- Create a value of 'ServiceTemplateVersion' 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:
--
-- 'schema', 'serviceTemplateVersion_schema' - The schema of the version of a service template.
--
-- 'statusMessage', 'serviceTemplateVersion_statusMessage' - A service template version status message.
--
-- 'recommendedMinorVersion', 'serviceTemplateVersion_recommendedMinorVersion' - The ID of the recommended minor version of the service template.
--
-- 'description', 'serviceTemplateVersion_description' - A description of the version of a service template.
--
-- 'arn', 'serviceTemplateVersion_arn' - The Amazon Resource Name (ARN) of the version of a service template.
--
-- 'compatibleEnvironmentTemplates', 'serviceTemplateVersion_compatibleEnvironmentTemplates' - An array of compatible environment template names for the major version
-- of a service template.
--
-- 'createdAt', 'serviceTemplateVersion_createdAt' - The time when the version of a service template was created.
--
-- 'lastModifiedAt', 'serviceTemplateVersion_lastModifiedAt' - The time when the version of a service template was last modified.
--
-- 'majorVersion', 'serviceTemplateVersion_majorVersion' - The ID of the latest major version that\'s associated with the version
-- of a service template.
--
-- 'minorVersion', 'serviceTemplateVersion_minorVersion' - The ID of the minor version of a service template.
--
-- 'status', 'serviceTemplateVersion_status' - The service template version status.
--
-- 'templateName', 'serviceTemplateVersion_templateName' - The name of the version of a service template.
newServiceTemplateVersion ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'lastModifiedAt'
  Prelude.UTCTime ->
  -- | 'majorVersion'
  Prelude.Text ->
  -- | 'minorVersion'
  Prelude.Text ->
  -- | 'status'
  TemplateVersionStatus ->
  -- | 'templateName'
  Prelude.Text ->
  ServiceTemplateVersion
newServiceTemplateVersion :: Text
-> UTCTime
-> UTCTime
-> Text
-> Text
-> TemplateVersionStatus
-> Text
-> ServiceTemplateVersion
newServiceTemplateVersion
  Text
pArn_
  UTCTime
pCreatedAt_
  UTCTime
pLastModifiedAt_
  Text
pMajorVersion_
  Text
pMinorVersion_
  TemplateVersionStatus
pStatus_
  Text
pTemplateName_ =
    ServiceTemplateVersion' :: Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Text
-> [CompatibleEnvironmentTemplate]
-> POSIX
-> POSIX
-> Text
-> Text
-> TemplateVersionStatus
-> Text
-> ServiceTemplateVersion
ServiceTemplateVersion'
      { $sel:schema:ServiceTemplateVersion' :: Maybe (Sensitive Text)
schema = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:statusMessage:ServiceTemplateVersion' :: Maybe (Sensitive Text)
statusMessage = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendedMinorVersion:ServiceTemplateVersion' :: Maybe Text
recommendedMinorVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:description:ServiceTemplateVersion' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:arn:ServiceTemplateVersion' :: Text
arn = Text
pArn_,
        $sel:compatibleEnvironmentTemplates:ServiceTemplateVersion' :: [CompatibleEnvironmentTemplate]
compatibleEnvironmentTemplates = [CompatibleEnvironmentTemplate]
forall a. Monoid a => a
Prelude.mempty,
        $sel:createdAt:ServiceTemplateVersion' :: 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:lastModifiedAt:ServiceTemplateVersion' :: POSIX
lastModifiedAt = 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
pLastModifiedAt_,
        $sel:majorVersion:ServiceTemplateVersion' :: Text
majorVersion = Text
pMajorVersion_,
        $sel:minorVersion:ServiceTemplateVersion' :: Text
minorVersion = Text
pMinorVersion_,
        $sel:status:ServiceTemplateVersion' :: TemplateVersionStatus
status = TemplateVersionStatus
pStatus_,
        $sel:templateName:ServiceTemplateVersion' :: Text
templateName = Text
pTemplateName_
      }

-- | The schema of the version of a service template.
serviceTemplateVersion_schema :: Lens.Lens' ServiceTemplateVersion (Prelude.Maybe Prelude.Text)
serviceTemplateVersion_schema :: (Maybe Text -> f (Maybe Text))
-> ServiceTemplateVersion -> f ServiceTemplateVersion
serviceTemplateVersion_schema = (ServiceTemplateVersion -> Maybe (Sensitive Text))
-> (ServiceTemplateVersion
    -> Maybe (Sensitive Text) -> ServiceTemplateVersion)
-> Lens
     ServiceTemplateVersion
     ServiceTemplateVersion
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplateVersion' {Maybe (Sensitive Text)
schema :: Maybe (Sensitive Text)
$sel:schema:ServiceTemplateVersion' :: ServiceTemplateVersion -> Maybe (Sensitive Text)
schema} -> Maybe (Sensitive Text)
schema) (\s :: ServiceTemplateVersion
s@ServiceTemplateVersion' {} Maybe (Sensitive Text)
a -> ServiceTemplateVersion
s {$sel:schema:ServiceTemplateVersion' :: Maybe (Sensitive Text)
schema = Maybe (Sensitive Text)
a} :: ServiceTemplateVersion) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ServiceTemplateVersion
-> f ServiceTemplateVersion
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

-- | A service template version status message.
serviceTemplateVersion_statusMessage :: Lens.Lens' ServiceTemplateVersion (Prelude.Maybe Prelude.Text)
serviceTemplateVersion_statusMessage :: (Maybe Text -> f (Maybe Text))
-> ServiceTemplateVersion -> f ServiceTemplateVersion
serviceTemplateVersion_statusMessage = (ServiceTemplateVersion -> Maybe (Sensitive Text))
-> (ServiceTemplateVersion
    -> Maybe (Sensitive Text) -> ServiceTemplateVersion)
-> Lens
     ServiceTemplateVersion
     ServiceTemplateVersion
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplateVersion' {Maybe (Sensitive Text)
statusMessage :: Maybe (Sensitive Text)
$sel:statusMessage:ServiceTemplateVersion' :: ServiceTemplateVersion -> Maybe (Sensitive Text)
statusMessage} -> Maybe (Sensitive Text)
statusMessage) (\s :: ServiceTemplateVersion
s@ServiceTemplateVersion' {} Maybe (Sensitive Text)
a -> ServiceTemplateVersion
s {$sel:statusMessage:ServiceTemplateVersion' :: Maybe (Sensitive Text)
statusMessage = Maybe (Sensitive Text)
a} :: ServiceTemplateVersion) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ServiceTemplateVersion
-> f ServiceTemplateVersion
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 recommended minor version of the service template.
serviceTemplateVersion_recommendedMinorVersion :: Lens.Lens' ServiceTemplateVersion (Prelude.Maybe Prelude.Text)
serviceTemplateVersion_recommendedMinorVersion :: (Maybe Text -> f (Maybe Text))
-> ServiceTemplateVersion -> f ServiceTemplateVersion
serviceTemplateVersion_recommendedMinorVersion = (ServiceTemplateVersion -> Maybe Text)
-> (ServiceTemplateVersion -> Maybe Text -> ServiceTemplateVersion)
-> Lens
     ServiceTemplateVersion
     ServiceTemplateVersion
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplateVersion' {Maybe Text
recommendedMinorVersion :: Maybe Text
$sel:recommendedMinorVersion:ServiceTemplateVersion' :: ServiceTemplateVersion -> Maybe Text
recommendedMinorVersion} -> Maybe Text
recommendedMinorVersion) (\s :: ServiceTemplateVersion
s@ServiceTemplateVersion' {} Maybe Text
a -> ServiceTemplateVersion
s {$sel:recommendedMinorVersion:ServiceTemplateVersion' :: Maybe Text
recommendedMinorVersion = Maybe Text
a} :: ServiceTemplateVersion)

-- | A description of the version of a service template.
serviceTemplateVersion_description :: Lens.Lens' ServiceTemplateVersion (Prelude.Maybe Prelude.Text)
serviceTemplateVersion_description :: (Maybe Text -> f (Maybe Text))
-> ServiceTemplateVersion -> f ServiceTemplateVersion
serviceTemplateVersion_description = (ServiceTemplateVersion -> Maybe (Sensitive Text))
-> (ServiceTemplateVersion
    -> Maybe (Sensitive Text) -> ServiceTemplateVersion)
-> Lens
     ServiceTemplateVersion
     ServiceTemplateVersion
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplateVersion' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:ServiceTemplateVersion' :: ServiceTemplateVersion -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: ServiceTemplateVersion
s@ServiceTemplateVersion' {} Maybe (Sensitive Text)
a -> ServiceTemplateVersion
s {$sel:description:ServiceTemplateVersion' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: ServiceTemplateVersion) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ServiceTemplateVersion
-> f ServiceTemplateVersion
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 version of a service template.
serviceTemplateVersion_arn :: Lens.Lens' ServiceTemplateVersion Prelude.Text
serviceTemplateVersion_arn :: (Text -> f Text)
-> ServiceTemplateVersion -> f ServiceTemplateVersion
serviceTemplateVersion_arn = (ServiceTemplateVersion -> Text)
-> (ServiceTemplateVersion -> Text -> ServiceTemplateVersion)
-> Lens ServiceTemplateVersion ServiceTemplateVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplateVersion' {Text
arn :: Text
$sel:arn:ServiceTemplateVersion' :: ServiceTemplateVersion -> Text
arn} -> Text
arn) (\s :: ServiceTemplateVersion
s@ServiceTemplateVersion' {} Text
a -> ServiceTemplateVersion
s {$sel:arn:ServiceTemplateVersion' :: Text
arn = Text
a} :: ServiceTemplateVersion)

-- | An array of compatible environment template names for the major version
-- of a service template.
serviceTemplateVersion_compatibleEnvironmentTemplates :: Lens.Lens' ServiceTemplateVersion [CompatibleEnvironmentTemplate]
serviceTemplateVersion_compatibleEnvironmentTemplates :: ([CompatibleEnvironmentTemplate]
 -> f [CompatibleEnvironmentTemplate])
-> ServiceTemplateVersion -> f ServiceTemplateVersion
serviceTemplateVersion_compatibleEnvironmentTemplates = (ServiceTemplateVersion -> [CompatibleEnvironmentTemplate])
-> (ServiceTemplateVersion
    -> [CompatibleEnvironmentTemplate] -> ServiceTemplateVersion)
-> Lens
     ServiceTemplateVersion
     ServiceTemplateVersion
     [CompatibleEnvironmentTemplate]
     [CompatibleEnvironmentTemplate]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplateVersion' {[CompatibleEnvironmentTemplate]
compatibleEnvironmentTemplates :: [CompatibleEnvironmentTemplate]
$sel:compatibleEnvironmentTemplates:ServiceTemplateVersion' :: ServiceTemplateVersion -> [CompatibleEnvironmentTemplate]
compatibleEnvironmentTemplates} -> [CompatibleEnvironmentTemplate]
compatibleEnvironmentTemplates) (\s :: ServiceTemplateVersion
s@ServiceTemplateVersion' {} [CompatibleEnvironmentTemplate]
a -> ServiceTemplateVersion
s {$sel:compatibleEnvironmentTemplates:ServiceTemplateVersion' :: [CompatibleEnvironmentTemplate]
compatibleEnvironmentTemplates = [CompatibleEnvironmentTemplate]
a} :: ServiceTemplateVersion) (([CompatibleEnvironmentTemplate]
  -> f [CompatibleEnvironmentTemplate])
 -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> (([CompatibleEnvironmentTemplate]
     -> f [CompatibleEnvironmentTemplate])
    -> [CompatibleEnvironmentTemplate]
    -> f [CompatibleEnvironmentTemplate])
-> ([CompatibleEnvironmentTemplate]
    -> f [CompatibleEnvironmentTemplate])
-> ServiceTemplateVersion
-> f ServiceTemplateVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([CompatibleEnvironmentTemplate]
 -> f [CompatibleEnvironmentTemplate])
-> [CompatibleEnvironmentTemplate]
-> f [CompatibleEnvironmentTemplate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The time when the version of a service template was created.
serviceTemplateVersion_createdAt :: Lens.Lens' ServiceTemplateVersion Prelude.UTCTime
serviceTemplateVersion_createdAt :: (UTCTime -> f UTCTime)
-> ServiceTemplateVersion -> f ServiceTemplateVersion
serviceTemplateVersion_createdAt = (ServiceTemplateVersion -> POSIX)
-> (ServiceTemplateVersion -> POSIX -> ServiceTemplateVersion)
-> Lens ServiceTemplateVersion ServiceTemplateVersion POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplateVersion' {POSIX
createdAt :: POSIX
$sel:createdAt:ServiceTemplateVersion' :: ServiceTemplateVersion -> POSIX
createdAt} -> POSIX
createdAt) (\s :: ServiceTemplateVersion
s@ServiceTemplateVersion' {} POSIX
a -> ServiceTemplateVersion
s {$sel:createdAt:ServiceTemplateVersion' :: POSIX
createdAt = POSIX
a} :: ServiceTemplateVersion) ((POSIX -> f POSIX)
 -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ServiceTemplateVersion
-> f ServiceTemplateVersion
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 version of a service template was last modified.
serviceTemplateVersion_lastModifiedAt :: Lens.Lens' ServiceTemplateVersion Prelude.UTCTime
serviceTemplateVersion_lastModifiedAt :: (UTCTime -> f UTCTime)
-> ServiceTemplateVersion -> f ServiceTemplateVersion
serviceTemplateVersion_lastModifiedAt = (ServiceTemplateVersion -> POSIX)
-> (ServiceTemplateVersion -> POSIX -> ServiceTemplateVersion)
-> Lens ServiceTemplateVersion ServiceTemplateVersion POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplateVersion' {POSIX
lastModifiedAt :: POSIX
$sel:lastModifiedAt:ServiceTemplateVersion' :: ServiceTemplateVersion -> POSIX
lastModifiedAt} -> POSIX
lastModifiedAt) (\s :: ServiceTemplateVersion
s@ServiceTemplateVersion' {} POSIX
a -> ServiceTemplateVersion
s {$sel:lastModifiedAt:ServiceTemplateVersion' :: POSIX
lastModifiedAt = POSIX
a} :: ServiceTemplateVersion) ((POSIX -> f POSIX)
 -> ServiceTemplateVersion -> f ServiceTemplateVersion)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ServiceTemplateVersion
-> f ServiceTemplateVersion
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 ID of the latest major version that\'s associated with the version
-- of a service template.
serviceTemplateVersion_majorVersion :: Lens.Lens' ServiceTemplateVersion Prelude.Text
serviceTemplateVersion_majorVersion :: (Text -> f Text)
-> ServiceTemplateVersion -> f ServiceTemplateVersion
serviceTemplateVersion_majorVersion = (ServiceTemplateVersion -> Text)
-> (ServiceTemplateVersion -> Text -> ServiceTemplateVersion)
-> Lens ServiceTemplateVersion ServiceTemplateVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplateVersion' {Text
majorVersion :: Text
$sel:majorVersion:ServiceTemplateVersion' :: ServiceTemplateVersion -> Text
majorVersion} -> Text
majorVersion) (\s :: ServiceTemplateVersion
s@ServiceTemplateVersion' {} Text
a -> ServiceTemplateVersion
s {$sel:majorVersion:ServiceTemplateVersion' :: Text
majorVersion = Text
a} :: ServiceTemplateVersion)

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

-- | The service template version status.
serviceTemplateVersion_status :: Lens.Lens' ServiceTemplateVersion TemplateVersionStatus
serviceTemplateVersion_status :: (TemplateVersionStatus -> f TemplateVersionStatus)
-> ServiceTemplateVersion -> f ServiceTemplateVersion
serviceTemplateVersion_status = (ServiceTemplateVersion -> TemplateVersionStatus)
-> (ServiceTemplateVersion
    -> TemplateVersionStatus -> ServiceTemplateVersion)
-> Lens
     ServiceTemplateVersion
     ServiceTemplateVersion
     TemplateVersionStatus
     TemplateVersionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceTemplateVersion' {TemplateVersionStatus
status :: TemplateVersionStatus
$sel:status:ServiceTemplateVersion' :: ServiceTemplateVersion -> TemplateVersionStatus
status} -> TemplateVersionStatus
status) (\s :: ServiceTemplateVersion
s@ServiceTemplateVersion' {} TemplateVersionStatus
a -> ServiceTemplateVersion
s {$sel:status:ServiceTemplateVersion' :: TemplateVersionStatus
status = TemplateVersionStatus
a} :: ServiceTemplateVersion)

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

instance Core.FromJSON ServiceTemplateVersion where
  parseJSON :: Value -> Parser ServiceTemplateVersion
parseJSON =
    String
-> (Object -> Parser ServiceTemplateVersion)
-> Value
-> Parser ServiceTemplateVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ServiceTemplateVersion"
      ( \Object
x ->
          Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Text
-> [CompatibleEnvironmentTemplate]
-> POSIX
-> POSIX
-> Text
-> Text
-> TemplateVersionStatus
-> Text
-> ServiceTemplateVersion
ServiceTemplateVersion'
            (Maybe (Sensitive Text)
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Text
 -> [CompatibleEnvironmentTemplate]
 -> POSIX
 -> POSIX
 -> Text
 -> Text
 -> TemplateVersionStatus
 -> Text
 -> ServiceTemplateVersion)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Text
      -> [CompatibleEnvironmentTemplate]
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> ServiceTemplateVersion)
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
"schema")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe (Sensitive Text)
   -> Text
   -> [CompatibleEnvironmentTemplate]
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> ServiceTemplateVersion)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Text
      -> [CompatibleEnvironmentTemplate]
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> ServiceTemplateVersion)
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
"statusMessage")
            Parser
  (Maybe Text
   -> Maybe (Sensitive Text)
   -> Text
   -> [CompatibleEnvironmentTemplate]
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> ServiceTemplateVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Text
      -> [CompatibleEnvironmentTemplate]
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> ServiceTemplateVersion)
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
"recommendedMinorVersion")
            Parser
  (Maybe (Sensitive Text)
   -> Text
   -> [CompatibleEnvironmentTemplate]
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> ServiceTemplateVersion)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Text
      -> [CompatibleEnvironmentTemplate]
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> ServiceTemplateVersion)
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
   -> [CompatibleEnvironmentTemplate]
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> ServiceTemplateVersion)
-> Parser Text
-> Parser
     ([CompatibleEnvironmentTemplate]
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> ServiceTemplateVersion)
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
  ([CompatibleEnvironmentTemplate]
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> ServiceTemplateVersion)
-> Parser [CompatibleEnvironmentTemplate]
-> Parser
     (POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> ServiceTemplateVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe [CompatibleEnvironmentTemplate])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"compatibleEnvironmentTemplates"
                            Parser (Maybe [CompatibleEnvironmentTemplate])
-> [CompatibleEnvironmentTemplate]
-> Parser [CompatibleEnvironmentTemplate]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [CompatibleEnvironmentTemplate]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (POSIX
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> ServiceTemplateVersion)
-> Parser POSIX
-> Parser
     (POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> ServiceTemplateVersion)
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
  (POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> ServiceTemplateVersion)
-> Parser POSIX
-> Parser
     (Text
      -> Text -> TemplateVersionStatus -> Text -> ServiceTemplateVersion)
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
"lastModifiedAt")
            Parser
  (Text
   -> Text -> TemplateVersionStatus -> Text -> ServiceTemplateVersion)
-> Parser Text
-> Parser
     (Text -> TemplateVersionStatus -> Text -> ServiceTemplateVersion)
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
"majorVersion")
            Parser
  (Text -> TemplateVersionStatus -> Text -> ServiceTemplateVersion)
-> Parser Text
-> Parser (TemplateVersionStatus -> Text -> ServiceTemplateVersion)
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
"minorVersion")
            Parser (TemplateVersionStatus -> Text -> ServiceTemplateVersion)
-> Parser TemplateVersionStatus
-> Parser (Text -> ServiceTemplateVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser TemplateVersionStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
            Parser (Text -> ServiceTemplateVersion)
-> Parser Text -> Parser ServiceTemplateVersion
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 ServiceTemplateVersion

instance Prelude.NFData ServiceTemplateVersion