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

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

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

-- |
-- Create a value of 'EnvironmentTemplateVersion' 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', 'environmentTemplateVersion_schema' - The schema of the version of an environment template.
--
-- 'statusMessage', 'environmentTemplateVersion_statusMessage' - The status message of the version of an environment template.
--
-- 'recommendedMinorVersion', 'environmentTemplateVersion_recommendedMinorVersion' - The ID of the recommended minor version of the environment template.
--
-- 'description', 'environmentTemplateVersion_description' - A description of the minor version of an environment template.
--
-- 'arn', 'environmentTemplateVersion_arn' - The Amazon Resource Name (ARN) of the version of an environment
-- template.
--
-- 'createdAt', 'environmentTemplateVersion_createdAt' - The time when the version of an environment template was created.
--
-- 'lastModifiedAt', 'environmentTemplateVersion_lastModifiedAt' - The time when the version of an environment template was last modified.
--
-- 'majorVersion', 'environmentTemplateVersion_majorVersion' - The ID of the latest major version that\'s associated with the version
-- of an environment template.
--
-- 'minorVersion', 'environmentTemplateVersion_minorVersion' - The ID of the minor version of an environment template.
--
-- 'status', 'environmentTemplateVersion_status' - The status of the version of an environment template.
--
-- 'templateName', 'environmentTemplateVersion_templateName' - The name of the version of an environment template.
newEnvironmentTemplateVersion ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'lastModifiedAt'
  Prelude.UTCTime ->
  -- | 'majorVersion'
  Prelude.Text ->
  -- | 'minorVersion'
  Prelude.Text ->
  -- | 'status'
  TemplateVersionStatus ->
  -- | 'templateName'
  Prelude.Text ->
  EnvironmentTemplateVersion
newEnvironmentTemplateVersion :: Text
-> UTCTime
-> UTCTime
-> Text
-> Text
-> TemplateVersionStatus
-> Text
-> EnvironmentTemplateVersion
newEnvironmentTemplateVersion
  Text
pArn_
  UTCTime
pCreatedAt_
  UTCTime
pLastModifiedAt_
  Text
pMajorVersion_
  Text
pMinorVersion_
  TemplateVersionStatus
pStatus_
  Text
pTemplateName_ =
    EnvironmentTemplateVersion' :: Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> Text
-> TemplateVersionStatus
-> Text
-> EnvironmentTemplateVersion
EnvironmentTemplateVersion'
      { $sel:schema:EnvironmentTemplateVersion' :: Maybe (Sensitive Text)
schema =
          Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:statusMessage:EnvironmentTemplateVersion' :: Maybe (Sensitive Text)
statusMessage = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendedMinorVersion:EnvironmentTemplateVersion' :: Maybe Text
recommendedMinorVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:description:EnvironmentTemplateVersion' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:arn:EnvironmentTemplateVersion' :: Text
arn = Text
pArn_,
        $sel:createdAt:EnvironmentTemplateVersion' :: 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:EnvironmentTemplateVersion' :: 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:EnvironmentTemplateVersion' :: Text
majorVersion = Text
pMajorVersion_,
        $sel:minorVersion:EnvironmentTemplateVersion' :: Text
minorVersion = Text
pMinorVersion_,
        $sel:status:EnvironmentTemplateVersion' :: TemplateVersionStatus
status = TemplateVersionStatus
pStatus_,
        $sel:templateName:EnvironmentTemplateVersion' :: Text
templateName = Text
pTemplateName_
      }

-- | The schema of the version of an environment template.
environmentTemplateVersion_schema :: Lens.Lens' EnvironmentTemplateVersion (Prelude.Maybe Prelude.Text)
environmentTemplateVersion_schema :: (Maybe Text -> f (Maybe Text))
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
environmentTemplateVersion_schema = (EnvironmentTemplateVersion -> Maybe (Sensitive Text))
-> (EnvironmentTemplateVersion
    -> Maybe (Sensitive Text) -> EnvironmentTemplateVersion)
-> Lens
     EnvironmentTemplateVersion
     EnvironmentTemplateVersion
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentTemplateVersion' {Maybe (Sensitive Text)
schema :: Maybe (Sensitive Text)
$sel:schema:EnvironmentTemplateVersion' :: EnvironmentTemplateVersion -> Maybe (Sensitive Text)
schema} -> Maybe (Sensitive Text)
schema) (\s :: EnvironmentTemplateVersion
s@EnvironmentTemplateVersion' {} Maybe (Sensitive Text)
a -> EnvironmentTemplateVersion
s {$sel:schema:EnvironmentTemplateVersion' :: Maybe (Sensitive Text)
schema = Maybe (Sensitive Text)
a} :: EnvironmentTemplateVersion) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> EnvironmentTemplateVersion
-> f EnvironmentTemplateVersion
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 status message of the version of an environment template.
environmentTemplateVersion_statusMessage :: Lens.Lens' EnvironmentTemplateVersion (Prelude.Maybe Prelude.Text)
environmentTemplateVersion_statusMessage :: (Maybe Text -> f (Maybe Text))
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
environmentTemplateVersion_statusMessage = (EnvironmentTemplateVersion -> Maybe (Sensitive Text))
-> (EnvironmentTemplateVersion
    -> Maybe (Sensitive Text) -> EnvironmentTemplateVersion)
-> Lens
     EnvironmentTemplateVersion
     EnvironmentTemplateVersion
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentTemplateVersion' {Maybe (Sensitive Text)
statusMessage :: Maybe (Sensitive Text)
$sel:statusMessage:EnvironmentTemplateVersion' :: EnvironmentTemplateVersion -> Maybe (Sensitive Text)
statusMessage} -> Maybe (Sensitive Text)
statusMessage) (\s :: EnvironmentTemplateVersion
s@EnvironmentTemplateVersion' {} Maybe (Sensitive Text)
a -> EnvironmentTemplateVersion
s {$sel:statusMessage:EnvironmentTemplateVersion' :: Maybe (Sensitive Text)
statusMessage = Maybe (Sensitive Text)
a} :: EnvironmentTemplateVersion) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> EnvironmentTemplateVersion
-> f EnvironmentTemplateVersion
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 environment template.
environmentTemplateVersion_recommendedMinorVersion :: Lens.Lens' EnvironmentTemplateVersion (Prelude.Maybe Prelude.Text)
environmentTemplateVersion_recommendedMinorVersion :: (Maybe Text -> f (Maybe Text))
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
environmentTemplateVersion_recommendedMinorVersion = (EnvironmentTemplateVersion -> Maybe Text)
-> (EnvironmentTemplateVersion
    -> Maybe Text -> EnvironmentTemplateVersion)
-> Lens
     EnvironmentTemplateVersion
     EnvironmentTemplateVersion
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentTemplateVersion' {Maybe Text
recommendedMinorVersion :: Maybe Text
$sel:recommendedMinorVersion:EnvironmentTemplateVersion' :: EnvironmentTemplateVersion -> Maybe Text
recommendedMinorVersion} -> Maybe Text
recommendedMinorVersion) (\s :: EnvironmentTemplateVersion
s@EnvironmentTemplateVersion' {} Maybe Text
a -> EnvironmentTemplateVersion
s {$sel:recommendedMinorVersion:EnvironmentTemplateVersion' :: Maybe Text
recommendedMinorVersion = Maybe Text
a} :: EnvironmentTemplateVersion)

-- | A description of the minor version of an environment template.
environmentTemplateVersion_description :: Lens.Lens' EnvironmentTemplateVersion (Prelude.Maybe Prelude.Text)
environmentTemplateVersion_description :: (Maybe Text -> f (Maybe Text))
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
environmentTemplateVersion_description = (EnvironmentTemplateVersion -> Maybe (Sensitive Text))
-> (EnvironmentTemplateVersion
    -> Maybe (Sensitive Text) -> EnvironmentTemplateVersion)
-> Lens
     EnvironmentTemplateVersion
     EnvironmentTemplateVersion
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentTemplateVersion' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:EnvironmentTemplateVersion' :: EnvironmentTemplateVersion -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: EnvironmentTemplateVersion
s@EnvironmentTemplateVersion' {} Maybe (Sensitive Text)
a -> EnvironmentTemplateVersion
s {$sel:description:EnvironmentTemplateVersion' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: EnvironmentTemplateVersion) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> EnvironmentTemplateVersion
-> f EnvironmentTemplateVersion
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 an environment
-- template.
environmentTemplateVersion_arn :: Lens.Lens' EnvironmentTemplateVersion Prelude.Text
environmentTemplateVersion_arn :: (Text -> f Text)
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
environmentTemplateVersion_arn = (EnvironmentTemplateVersion -> Text)
-> (EnvironmentTemplateVersion
    -> Text -> EnvironmentTemplateVersion)
-> Lens
     EnvironmentTemplateVersion EnvironmentTemplateVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentTemplateVersion' {Text
arn :: Text
$sel:arn:EnvironmentTemplateVersion' :: EnvironmentTemplateVersion -> Text
arn} -> Text
arn) (\s :: EnvironmentTemplateVersion
s@EnvironmentTemplateVersion' {} Text
a -> EnvironmentTemplateVersion
s {$sel:arn:EnvironmentTemplateVersion' :: Text
arn = Text
a} :: EnvironmentTemplateVersion)

-- | The time when the version of an environment template was created.
environmentTemplateVersion_createdAt :: Lens.Lens' EnvironmentTemplateVersion Prelude.UTCTime
environmentTemplateVersion_createdAt :: (UTCTime -> f UTCTime)
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
environmentTemplateVersion_createdAt = (EnvironmentTemplateVersion -> POSIX)
-> (EnvironmentTemplateVersion
    -> POSIX -> EnvironmentTemplateVersion)
-> Lens
     EnvironmentTemplateVersion EnvironmentTemplateVersion POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentTemplateVersion' {POSIX
createdAt :: POSIX
$sel:createdAt:EnvironmentTemplateVersion' :: EnvironmentTemplateVersion -> POSIX
createdAt} -> POSIX
createdAt) (\s :: EnvironmentTemplateVersion
s@EnvironmentTemplateVersion' {} POSIX
a -> EnvironmentTemplateVersion
s {$sel:createdAt:EnvironmentTemplateVersion' :: POSIX
createdAt = POSIX
a} :: EnvironmentTemplateVersion) ((POSIX -> f POSIX)
 -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EnvironmentTemplateVersion
-> f EnvironmentTemplateVersion
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 an environment template was last modified.
environmentTemplateVersion_lastModifiedAt :: Lens.Lens' EnvironmentTemplateVersion Prelude.UTCTime
environmentTemplateVersion_lastModifiedAt :: (UTCTime -> f UTCTime)
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
environmentTemplateVersion_lastModifiedAt = (EnvironmentTemplateVersion -> POSIX)
-> (EnvironmentTemplateVersion
    -> POSIX -> EnvironmentTemplateVersion)
-> Lens
     EnvironmentTemplateVersion EnvironmentTemplateVersion POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentTemplateVersion' {POSIX
lastModifiedAt :: POSIX
$sel:lastModifiedAt:EnvironmentTemplateVersion' :: EnvironmentTemplateVersion -> POSIX
lastModifiedAt} -> POSIX
lastModifiedAt) (\s :: EnvironmentTemplateVersion
s@EnvironmentTemplateVersion' {} POSIX
a -> EnvironmentTemplateVersion
s {$sel:lastModifiedAt:EnvironmentTemplateVersion' :: POSIX
lastModifiedAt = POSIX
a} :: EnvironmentTemplateVersion) ((POSIX -> f POSIX)
 -> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EnvironmentTemplateVersion
-> f EnvironmentTemplateVersion
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 an environment template.
environmentTemplateVersion_majorVersion :: Lens.Lens' EnvironmentTemplateVersion Prelude.Text
environmentTemplateVersion_majorVersion :: (Text -> f Text)
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
environmentTemplateVersion_majorVersion = (EnvironmentTemplateVersion -> Text)
-> (EnvironmentTemplateVersion
    -> Text -> EnvironmentTemplateVersion)
-> Lens
     EnvironmentTemplateVersion EnvironmentTemplateVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentTemplateVersion' {Text
majorVersion :: Text
$sel:majorVersion:EnvironmentTemplateVersion' :: EnvironmentTemplateVersion -> Text
majorVersion} -> Text
majorVersion) (\s :: EnvironmentTemplateVersion
s@EnvironmentTemplateVersion' {} Text
a -> EnvironmentTemplateVersion
s {$sel:majorVersion:EnvironmentTemplateVersion' :: Text
majorVersion = Text
a} :: EnvironmentTemplateVersion)

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

-- | The status of the version of an environment template.
environmentTemplateVersion_status :: Lens.Lens' EnvironmentTemplateVersion TemplateVersionStatus
environmentTemplateVersion_status :: (TemplateVersionStatus -> f TemplateVersionStatus)
-> EnvironmentTemplateVersion -> f EnvironmentTemplateVersion
environmentTemplateVersion_status = (EnvironmentTemplateVersion -> TemplateVersionStatus)
-> (EnvironmentTemplateVersion
    -> TemplateVersionStatus -> EnvironmentTemplateVersion)
-> Lens
     EnvironmentTemplateVersion
     EnvironmentTemplateVersion
     TemplateVersionStatus
     TemplateVersionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentTemplateVersion' {TemplateVersionStatus
status :: TemplateVersionStatus
$sel:status:EnvironmentTemplateVersion' :: EnvironmentTemplateVersion -> TemplateVersionStatus
status} -> TemplateVersionStatus
status) (\s :: EnvironmentTemplateVersion
s@EnvironmentTemplateVersion' {} TemplateVersionStatus
a -> EnvironmentTemplateVersion
s {$sel:status:EnvironmentTemplateVersion' :: TemplateVersionStatus
status = TemplateVersionStatus
a} :: EnvironmentTemplateVersion)

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

instance Core.FromJSON EnvironmentTemplateVersion where
  parseJSON :: Value -> Parser EnvironmentTemplateVersion
parseJSON =
    String
-> (Object -> Parser EnvironmentTemplateVersion)
-> Value
-> Parser EnvironmentTemplateVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EnvironmentTemplateVersion"
      ( \Object
x ->
          Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> Text
-> TemplateVersionStatus
-> Text
-> EnvironmentTemplateVersion
EnvironmentTemplateVersion'
            (Maybe (Sensitive Text)
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe (Sensitive Text)
 -> Text
 -> POSIX
 -> POSIX
 -> Text
 -> Text
 -> TemplateVersionStatus
 -> Text
 -> EnvironmentTemplateVersion)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe (Sensitive Text)
      -> Text
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> EnvironmentTemplateVersion)
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
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> EnvironmentTemplateVersion)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Text
      -> Maybe (Sensitive Text)
      -> Text
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> EnvironmentTemplateVersion)
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
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> EnvironmentTemplateVersion)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Text
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> EnvironmentTemplateVersion)
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
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> EnvironmentTemplateVersion)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Text
      -> POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> EnvironmentTemplateVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
            Parser
  (Text
   -> POSIX
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> EnvironmentTemplateVersion)
-> Parser Text
-> Parser
     (POSIX
      -> POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> EnvironmentTemplateVersion)
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
   -> POSIX
   -> Text
   -> Text
   -> TemplateVersionStatus
   -> Text
   -> EnvironmentTemplateVersion)
-> Parser POSIX
-> Parser
     (POSIX
      -> Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> EnvironmentTemplateVersion)
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
   -> EnvironmentTemplateVersion)
-> Parser POSIX
-> Parser
     (Text
      -> Text
      -> TemplateVersionStatus
      -> Text
      -> EnvironmentTemplateVersion)
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
   -> EnvironmentTemplateVersion)
-> Parser Text
-> Parser
     (Text
      -> TemplateVersionStatus -> Text -> EnvironmentTemplateVersion)
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 -> EnvironmentTemplateVersion)
-> Parser Text
-> Parser
     (TemplateVersionStatus -> Text -> EnvironmentTemplateVersion)
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 -> EnvironmentTemplateVersion)
-> Parser TemplateVersionStatus
-> Parser (Text -> EnvironmentTemplateVersion)
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 -> EnvironmentTemplateVersion)
-> Parser Text -> Parser EnvironmentTemplateVersion
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 EnvironmentTemplateVersion

instance Prelude.NFData EnvironmentTemplateVersion