{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ServerlessApplicationRepository.GetCloudFormationTemplate
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets the specified AWS CloudFormation template.
module Amazonka.ServerlessApplicationRepository.GetCloudFormationTemplate
  ( -- * Creating a Request
    GetCloudFormationTemplate (..),
    newGetCloudFormationTemplate,

    -- * Request Lenses
    getCloudFormationTemplate_applicationId,
    getCloudFormationTemplate_templateId,

    -- * Destructuring the Response
    GetCloudFormationTemplateResponse (..),
    newGetCloudFormationTemplateResponse,

    -- * Response Lenses
    getCloudFormationTemplateResponse_applicationId,
    getCloudFormationTemplateResponse_creationTime,
    getCloudFormationTemplateResponse_expirationTime,
    getCloudFormationTemplateResponse_semanticVersion,
    getCloudFormationTemplateResponse_status,
    getCloudFormationTemplateResponse_templateId,
    getCloudFormationTemplateResponse_templateUrl,
    getCloudFormationTemplateResponse_httpStatus,
  )
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.ServerlessApplicationRepository.Types

-- | /See:/ 'newGetCloudFormationTemplate' smart constructor.
data GetCloudFormationTemplate = GetCloudFormationTemplate'
  { -- | The Amazon Resource Name (ARN) of the application.
    GetCloudFormationTemplate -> Text
applicationId :: Prelude.Text,
    -- | The UUID returned by CreateCloudFormationTemplate.
    --
    -- Pattern:
    -- [0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}
    GetCloudFormationTemplate -> Text
templateId :: Prelude.Text
  }
  deriving (GetCloudFormationTemplate -> GetCloudFormationTemplate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCloudFormationTemplate -> GetCloudFormationTemplate -> Bool
$c/= :: GetCloudFormationTemplate -> GetCloudFormationTemplate -> Bool
== :: GetCloudFormationTemplate -> GetCloudFormationTemplate -> Bool
$c== :: GetCloudFormationTemplate -> GetCloudFormationTemplate -> Bool
Prelude.Eq, ReadPrec [GetCloudFormationTemplate]
ReadPrec GetCloudFormationTemplate
Int -> ReadS GetCloudFormationTemplate
ReadS [GetCloudFormationTemplate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCloudFormationTemplate]
$creadListPrec :: ReadPrec [GetCloudFormationTemplate]
readPrec :: ReadPrec GetCloudFormationTemplate
$creadPrec :: ReadPrec GetCloudFormationTemplate
readList :: ReadS [GetCloudFormationTemplate]
$creadList :: ReadS [GetCloudFormationTemplate]
readsPrec :: Int -> ReadS GetCloudFormationTemplate
$creadsPrec :: Int -> ReadS GetCloudFormationTemplate
Prelude.Read, Int -> GetCloudFormationTemplate -> ShowS
[GetCloudFormationTemplate] -> ShowS
GetCloudFormationTemplate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCloudFormationTemplate] -> ShowS
$cshowList :: [GetCloudFormationTemplate] -> ShowS
show :: GetCloudFormationTemplate -> String
$cshow :: GetCloudFormationTemplate -> String
showsPrec :: Int -> GetCloudFormationTemplate -> ShowS
$cshowsPrec :: Int -> GetCloudFormationTemplate -> ShowS
Prelude.Show, forall x.
Rep GetCloudFormationTemplate x -> GetCloudFormationTemplate
forall x.
GetCloudFormationTemplate -> Rep GetCloudFormationTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCloudFormationTemplate x -> GetCloudFormationTemplate
$cfrom :: forall x.
GetCloudFormationTemplate -> Rep GetCloudFormationTemplate x
Prelude.Generic)

-- |
-- Create a value of 'GetCloudFormationTemplate' 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:
--
-- 'applicationId', 'getCloudFormationTemplate_applicationId' - The Amazon Resource Name (ARN) of the application.
--
-- 'templateId', 'getCloudFormationTemplate_templateId' - The UUID returned by CreateCloudFormationTemplate.
--
-- Pattern:
-- [0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}
newGetCloudFormationTemplate ::
  -- | 'applicationId'
  Prelude.Text ->
  -- | 'templateId'
  Prelude.Text ->
  GetCloudFormationTemplate
newGetCloudFormationTemplate :: Text -> Text -> GetCloudFormationTemplate
newGetCloudFormationTemplate
  Text
pApplicationId_
  Text
pTemplateId_ =
    GetCloudFormationTemplate'
      { $sel:applicationId:GetCloudFormationTemplate' :: Text
applicationId =
          Text
pApplicationId_,
        $sel:templateId:GetCloudFormationTemplate' :: Text
templateId = Text
pTemplateId_
      }

-- | The Amazon Resource Name (ARN) of the application.
getCloudFormationTemplate_applicationId :: Lens.Lens' GetCloudFormationTemplate Prelude.Text
getCloudFormationTemplate_applicationId :: Lens' GetCloudFormationTemplate Text
getCloudFormationTemplate_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCloudFormationTemplate' {Text
applicationId :: Text
$sel:applicationId:GetCloudFormationTemplate' :: GetCloudFormationTemplate -> Text
applicationId} -> Text
applicationId) (\s :: GetCloudFormationTemplate
s@GetCloudFormationTemplate' {} Text
a -> GetCloudFormationTemplate
s {$sel:applicationId:GetCloudFormationTemplate' :: Text
applicationId = Text
a} :: GetCloudFormationTemplate)

-- | The UUID returned by CreateCloudFormationTemplate.
--
-- Pattern:
-- [0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}
getCloudFormationTemplate_templateId :: Lens.Lens' GetCloudFormationTemplate Prelude.Text
getCloudFormationTemplate_templateId :: Lens' GetCloudFormationTemplate Text
getCloudFormationTemplate_templateId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCloudFormationTemplate' {Text
templateId :: Text
$sel:templateId:GetCloudFormationTemplate' :: GetCloudFormationTemplate -> Text
templateId} -> Text
templateId) (\s :: GetCloudFormationTemplate
s@GetCloudFormationTemplate' {} Text
a -> GetCloudFormationTemplate
s {$sel:templateId:GetCloudFormationTemplate' :: Text
templateId = Text
a} :: GetCloudFormationTemplate)

instance Core.AWSRequest GetCloudFormationTemplate where
  type
    AWSResponse GetCloudFormationTemplate =
      GetCloudFormationTemplateResponse
  request :: (Service -> Service)
-> GetCloudFormationTemplate -> Request GetCloudFormationTemplate
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetCloudFormationTemplate
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetCloudFormationTemplate)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Status
-> Maybe Text
-> Maybe Text
-> Int
-> GetCloudFormationTemplateResponse
GetCloudFormationTemplateResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"applicationId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"creationTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"expirationTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"semanticVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"templateId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"templateUrl")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetCloudFormationTemplate where
  hashWithSalt :: Int -> GetCloudFormationTemplate -> Int
hashWithSalt Int
_salt GetCloudFormationTemplate' {Text
templateId :: Text
applicationId :: Text
$sel:templateId:GetCloudFormationTemplate' :: GetCloudFormationTemplate -> Text
$sel:applicationId:GetCloudFormationTemplate' :: GetCloudFormationTemplate -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateId

instance Prelude.NFData GetCloudFormationTemplate where
  rnf :: GetCloudFormationTemplate -> ()
rnf GetCloudFormationTemplate' {Text
templateId :: Text
applicationId :: Text
$sel:templateId:GetCloudFormationTemplate' :: GetCloudFormationTemplate -> Text
$sel:applicationId:GetCloudFormationTemplate' :: GetCloudFormationTemplate -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
applicationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateId

instance Data.ToHeaders GetCloudFormationTemplate where
  toHeaders :: GetCloudFormationTemplate -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath GetCloudFormationTemplate where
  toPath :: GetCloudFormationTemplate -> ByteString
toPath GetCloudFormationTemplate' {Text
templateId :: Text
applicationId :: Text
$sel:templateId:GetCloudFormationTemplate' :: GetCloudFormationTemplate -> Text
$sel:applicationId:GetCloudFormationTemplate' :: GetCloudFormationTemplate -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/applications/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
applicationId,
        ByteString
"/templates/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
templateId
      ]

instance Data.ToQuery GetCloudFormationTemplate where
  toQuery :: GetCloudFormationTemplate -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetCloudFormationTemplateResponse' smart constructor.
data GetCloudFormationTemplateResponse = GetCloudFormationTemplateResponse'
  { -- | The application Amazon Resource Name (ARN).
    GetCloudFormationTemplateResponse -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
    -- | The date and time this resource was created.
    GetCloudFormationTemplateResponse -> Maybe Text
creationTime :: Prelude.Maybe Prelude.Text,
    -- | The date and time this template expires. Templates expire 1 hour after
    -- creation.
    GetCloudFormationTemplateResponse -> Maybe Text
expirationTime :: Prelude.Maybe Prelude.Text,
    -- | The semantic version of the application:
    --
    -- <https://semver.org/>
    GetCloudFormationTemplateResponse -> Maybe Text
semanticVersion :: Prelude.Maybe Prelude.Text,
    -- | Status of the template creation workflow.
    --
    -- Possible values: PREPARING | ACTIVE | EXPIRED
    GetCloudFormationTemplateResponse -> Maybe Status
status :: Prelude.Maybe Status,
    -- | The UUID returned by CreateCloudFormationTemplate.
    --
    -- Pattern:
    -- [0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}
    GetCloudFormationTemplateResponse -> Maybe Text
templateId :: Prelude.Maybe Prelude.Text,
    -- | A link to the template that can be used to deploy the application using
    -- AWS CloudFormation.
    GetCloudFormationTemplateResponse -> Maybe Text
templateUrl :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetCloudFormationTemplateResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetCloudFormationTemplateResponse
-> GetCloudFormationTemplateResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCloudFormationTemplateResponse
-> GetCloudFormationTemplateResponse -> Bool
$c/= :: GetCloudFormationTemplateResponse
-> GetCloudFormationTemplateResponse -> Bool
== :: GetCloudFormationTemplateResponse
-> GetCloudFormationTemplateResponse -> Bool
$c== :: GetCloudFormationTemplateResponse
-> GetCloudFormationTemplateResponse -> Bool
Prelude.Eq, ReadPrec [GetCloudFormationTemplateResponse]
ReadPrec GetCloudFormationTemplateResponse
Int -> ReadS GetCloudFormationTemplateResponse
ReadS [GetCloudFormationTemplateResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCloudFormationTemplateResponse]
$creadListPrec :: ReadPrec [GetCloudFormationTemplateResponse]
readPrec :: ReadPrec GetCloudFormationTemplateResponse
$creadPrec :: ReadPrec GetCloudFormationTemplateResponse
readList :: ReadS [GetCloudFormationTemplateResponse]
$creadList :: ReadS [GetCloudFormationTemplateResponse]
readsPrec :: Int -> ReadS GetCloudFormationTemplateResponse
$creadsPrec :: Int -> ReadS GetCloudFormationTemplateResponse
Prelude.Read, Int -> GetCloudFormationTemplateResponse -> ShowS
[GetCloudFormationTemplateResponse] -> ShowS
GetCloudFormationTemplateResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCloudFormationTemplateResponse] -> ShowS
$cshowList :: [GetCloudFormationTemplateResponse] -> ShowS
show :: GetCloudFormationTemplateResponse -> String
$cshow :: GetCloudFormationTemplateResponse -> String
showsPrec :: Int -> GetCloudFormationTemplateResponse -> ShowS
$cshowsPrec :: Int -> GetCloudFormationTemplateResponse -> ShowS
Prelude.Show, forall x.
Rep GetCloudFormationTemplateResponse x
-> GetCloudFormationTemplateResponse
forall x.
GetCloudFormationTemplateResponse
-> Rep GetCloudFormationTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCloudFormationTemplateResponse x
-> GetCloudFormationTemplateResponse
$cfrom :: forall x.
GetCloudFormationTemplateResponse
-> Rep GetCloudFormationTemplateResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetCloudFormationTemplateResponse' 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:
--
-- 'applicationId', 'getCloudFormationTemplateResponse_applicationId' - The application Amazon Resource Name (ARN).
--
-- 'creationTime', 'getCloudFormationTemplateResponse_creationTime' - The date and time this resource was created.
--
-- 'expirationTime', 'getCloudFormationTemplateResponse_expirationTime' - The date and time this template expires. Templates expire 1 hour after
-- creation.
--
-- 'semanticVersion', 'getCloudFormationTemplateResponse_semanticVersion' - The semantic version of the application:
--
-- <https://semver.org/>
--
-- 'status', 'getCloudFormationTemplateResponse_status' - Status of the template creation workflow.
--
-- Possible values: PREPARING | ACTIVE | EXPIRED
--
-- 'templateId', 'getCloudFormationTemplateResponse_templateId' - The UUID returned by CreateCloudFormationTemplate.
--
-- Pattern:
-- [0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}
--
-- 'templateUrl', 'getCloudFormationTemplateResponse_templateUrl' - A link to the template that can be used to deploy the application using
-- AWS CloudFormation.
--
-- 'httpStatus', 'getCloudFormationTemplateResponse_httpStatus' - The response's http status code.
newGetCloudFormationTemplateResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetCloudFormationTemplateResponse
newGetCloudFormationTemplateResponse :: Int -> GetCloudFormationTemplateResponse
newGetCloudFormationTemplateResponse Int
pHttpStatus_ =
  GetCloudFormationTemplateResponse'
    { $sel:applicationId:GetCloudFormationTemplateResponse' :: Maybe Text
applicationId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTime:GetCloudFormationTemplateResponse' :: Maybe Text
creationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:expirationTime:GetCloudFormationTemplateResponse' :: Maybe Text
expirationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:semanticVersion:GetCloudFormationTemplateResponse' :: Maybe Text
semanticVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:status:GetCloudFormationTemplateResponse' :: Maybe Status
status = forall a. Maybe a
Prelude.Nothing,
      $sel:templateId:GetCloudFormationTemplateResponse' :: Maybe Text
templateId = forall a. Maybe a
Prelude.Nothing,
      $sel:templateUrl:GetCloudFormationTemplateResponse' :: Maybe Text
templateUrl = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetCloudFormationTemplateResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The application Amazon Resource Name (ARN).
getCloudFormationTemplateResponse_applicationId :: Lens.Lens' GetCloudFormationTemplateResponse (Prelude.Maybe Prelude.Text)
getCloudFormationTemplateResponse_applicationId :: Lens' GetCloudFormationTemplateResponse (Maybe Text)
getCloudFormationTemplateResponse_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCloudFormationTemplateResponse' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: GetCloudFormationTemplateResponse
s@GetCloudFormationTemplateResponse' {} Maybe Text
a -> GetCloudFormationTemplateResponse
s {$sel:applicationId:GetCloudFormationTemplateResponse' :: Maybe Text
applicationId = Maybe Text
a} :: GetCloudFormationTemplateResponse)

-- | The date and time this resource was created.
getCloudFormationTemplateResponse_creationTime :: Lens.Lens' GetCloudFormationTemplateResponse (Prelude.Maybe Prelude.Text)
getCloudFormationTemplateResponse_creationTime :: Lens' GetCloudFormationTemplateResponse (Maybe Text)
getCloudFormationTemplateResponse_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCloudFormationTemplateResponse' {Maybe Text
creationTime :: Maybe Text
$sel:creationTime:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
creationTime} -> Maybe Text
creationTime) (\s :: GetCloudFormationTemplateResponse
s@GetCloudFormationTemplateResponse' {} Maybe Text
a -> GetCloudFormationTemplateResponse
s {$sel:creationTime:GetCloudFormationTemplateResponse' :: Maybe Text
creationTime = Maybe Text
a} :: GetCloudFormationTemplateResponse)

-- | The date and time this template expires. Templates expire 1 hour after
-- creation.
getCloudFormationTemplateResponse_expirationTime :: Lens.Lens' GetCloudFormationTemplateResponse (Prelude.Maybe Prelude.Text)
getCloudFormationTemplateResponse_expirationTime :: Lens' GetCloudFormationTemplateResponse (Maybe Text)
getCloudFormationTemplateResponse_expirationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCloudFormationTemplateResponse' {Maybe Text
expirationTime :: Maybe Text
$sel:expirationTime:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
expirationTime} -> Maybe Text
expirationTime) (\s :: GetCloudFormationTemplateResponse
s@GetCloudFormationTemplateResponse' {} Maybe Text
a -> GetCloudFormationTemplateResponse
s {$sel:expirationTime:GetCloudFormationTemplateResponse' :: Maybe Text
expirationTime = Maybe Text
a} :: GetCloudFormationTemplateResponse)

-- | The semantic version of the application:
--
-- <https://semver.org/>
getCloudFormationTemplateResponse_semanticVersion :: Lens.Lens' GetCloudFormationTemplateResponse (Prelude.Maybe Prelude.Text)
getCloudFormationTemplateResponse_semanticVersion :: Lens' GetCloudFormationTemplateResponse (Maybe Text)
getCloudFormationTemplateResponse_semanticVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCloudFormationTemplateResponse' {Maybe Text
semanticVersion :: Maybe Text
$sel:semanticVersion:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
semanticVersion} -> Maybe Text
semanticVersion) (\s :: GetCloudFormationTemplateResponse
s@GetCloudFormationTemplateResponse' {} Maybe Text
a -> GetCloudFormationTemplateResponse
s {$sel:semanticVersion:GetCloudFormationTemplateResponse' :: Maybe Text
semanticVersion = Maybe Text
a} :: GetCloudFormationTemplateResponse)

-- | Status of the template creation workflow.
--
-- Possible values: PREPARING | ACTIVE | EXPIRED
getCloudFormationTemplateResponse_status :: Lens.Lens' GetCloudFormationTemplateResponse (Prelude.Maybe Status)
getCloudFormationTemplateResponse_status :: Lens' GetCloudFormationTemplateResponse (Maybe Status)
getCloudFormationTemplateResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCloudFormationTemplateResponse' {Maybe Status
status :: Maybe Status
$sel:status:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Status
status} -> Maybe Status
status) (\s :: GetCloudFormationTemplateResponse
s@GetCloudFormationTemplateResponse' {} Maybe Status
a -> GetCloudFormationTemplateResponse
s {$sel:status:GetCloudFormationTemplateResponse' :: Maybe Status
status = Maybe Status
a} :: GetCloudFormationTemplateResponse)

-- | The UUID returned by CreateCloudFormationTemplate.
--
-- Pattern:
-- [0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}
getCloudFormationTemplateResponse_templateId :: Lens.Lens' GetCloudFormationTemplateResponse (Prelude.Maybe Prelude.Text)
getCloudFormationTemplateResponse_templateId :: Lens' GetCloudFormationTemplateResponse (Maybe Text)
getCloudFormationTemplateResponse_templateId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCloudFormationTemplateResponse' {Maybe Text
templateId :: Maybe Text
$sel:templateId:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
templateId} -> Maybe Text
templateId) (\s :: GetCloudFormationTemplateResponse
s@GetCloudFormationTemplateResponse' {} Maybe Text
a -> GetCloudFormationTemplateResponse
s {$sel:templateId:GetCloudFormationTemplateResponse' :: Maybe Text
templateId = Maybe Text
a} :: GetCloudFormationTemplateResponse)

-- | A link to the template that can be used to deploy the application using
-- AWS CloudFormation.
getCloudFormationTemplateResponse_templateUrl :: Lens.Lens' GetCloudFormationTemplateResponse (Prelude.Maybe Prelude.Text)
getCloudFormationTemplateResponse_templateUrl :: Lens' GetCloudFormationTemplateResponse (Maybe Text)
getCloudFormationTemplateResponse_templateUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCloudFormationTemplateResponse' {Maybe Text
templateUrl :: Maybe Text
$sel:templateUrl:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
templateUrl} -> Maybe Text
templateUrl) (\s :: GetCloudFormationTemplateResponse
s@GetCloudFormationTemplateResponse' {} Maybe Text
a -> GetCloudFormationTemplateResponse
s {$sel:templateUrl:GetCloudFormationTemplateResponse' :: Maybe Text
templateUrl = Maybe Text
a} :: GetCloudFormationTemplateResponse)

-- | The response's http status code.
getCloudFormationTemplateResponse_httpStatus :: Lens.Lens' GetCloudFormationTemplateResponse Prelude.Int
getCloudFormationTemplateResponse_httpStatus :: Lens' GetCloudFormationTemplateResponse Int
getCloudFormationTemplateResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCloudFormationTemplateResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetCloudFormationTemplateResponse
s@GetCloudFormationTemplateResponse' {} Int
a -> GetCloudFormationTemplateResponse
s {$sel:httpStatus:GetCloudFormationTemplateResponse' :: Int
httpStatus = Int
a} :: GetCloudFormationTemplateResponse)

instance
  Prelude.NFData
    GetCloudFormationTemplateResponse
  where
  rnf :: GetCloudFormationTemplateResponse -> ()
rnf GetCloudFormationTemplateResponse' {Int
Maybe Text
Maybe Status
httpStatus :: Int
templateUrl :: Maybe Text
templateId :: Maybe Text
status :: Maybe Status
semanticVersion :: Maybe Text
expirationTime :: Maybe Text
creationTime :: Maybe Text
applicationId :: Maybe Text
$sel:httpStatus:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Int
$sel:templateUrl:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
$sel:templateId:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
$sel:status:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Status
$sel:semanticVersion:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
$sel:expirationTime:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
$sel:creationTime:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
$sel:applicationId:GetCloudFormationTemplateResponse' :: GetCloudFormationTemplateResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
expirationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
semanticVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Status
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus