{-# 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.QuickSight.DescribeTemplate
-- 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)
--
-- Describes a template\'s metadata.
module Amazonka.QuickSight.DescribeTemplate
  ( -- * Creating a Request
    DescribeTemplate (..),
    newDescribeTemplate,

    -- * Request Lenses
    describeTemplate_aliasName,
    describeTemplate_versionNumber,
    describeTemplate_awsAccountId,
    describeTemplate_templateId,

    -- * Destructuring the Response
    DescribeTemplateResponse (..),
    newDescribeTemplateResponse,

    -- * Response Lenses
    describeTemplateResponse_requestId,
    describeTemplateResponse_template,
    describeTemplateResponse_status,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeTemplate' smart constructor.
data DescribeTemplate = DescribeTemplate'
  { -- | The alias of the template that you want to describe. If you name a
    -- specific alias, you describe the version that the alias points to. You
    -- can specify the latest version of the template by providing the keyword
    -- @$LATEST@ in the @AliasName@ parameter. The keyword @$PUBLISHED@
    -- doesn\'t apply to templates.
    DescribeTemplate -> Maybe Text
aliasName :: Prelude.Maybe Prelude.Text,
    -- | (Optional) The number for the version to describe. If a @VersionNumber@
    -- parameter value isn\'t provided, the latest version of the template is
    -- described.
    DescribeTemplate -> Maybe Natural
versionNumber :: Prelude.Maybe Prelude.Natural,
    -- | The ID of the Amazon Web Services account that contains the template
    -- that you\'re describing.
    DescribeTemplate -> Text
awsAccountId :: Prelude.Text,
    -- | The ID for the template.
    DescribeTemplate -> Text
templateId :: Prelude.Text
  }
  deriving (DescribeTemplate -> DescribeTemplate -> Bool
(DescribeTemplate -> DescribeTemplate -> Bool)
-> (DescribeTemplate -> DescribeTemplate -> Bool)
-> Eq DescribeTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTemplate -> DescribeTemplate -> Bool
$c/= :: DescribeTemplate -> DescribeTemplate -> Bool
== :: DescribeTemplate -> DescribeTemplate -> Bool
$c== :: DescribeTemplate -> DescribeTemplate -> Bool
Prelude.Eq, ReadPrec [DescribeTemplate]
ReadPrec DescribeTemplate
Int -> ReadS DescribeTemplate
ReadS [DescribeTemplate]
(Int -> ReadS DescribeTemplate)
-> ReadS [DescribeTemplate]
-> ReadPrec DescribeTemplate
-> ReadPrec [DescribeTemplate]
-> Read DescribeTemplate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTemplate]
$creadListPrec :: ReadPrec [DescribeTemplate]
readPrec :: ReadPrec DescribeTemplate
$creadPrec :: ReadPrec DescribeTemplate
readList :: ReadS [DescribeTemplate]
$creadList :: ReadS [DescribeTemplate]
readsPrec :: Int -> ReadS DescribeTemplate
$creadsPrec :: Int -> ReadS DescribeTemplate
Prelude.Read, Int -> DescribeTemplate -> ShowS
[DescribeTemplate] -> ShowS
DescribeTemplate -> String
(Int -> DescribeTemplate -> ShowS)
-> (DescribeTemplate -> String)
-> ([DescribeTemplate] -> ShowS)
-> Show DescribeTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTemplate] -> ShowS
$cshowList :: [DescribeTemplate] -> ShowS
show :: DescribeTemplate -> String
$cshow :: DescribeTemplate -> String
showsPrec :: Int -> DescribeTemplate -> ShowS
$cshowsPrec :: Int -> DescribeTemplate -> ShowS
Prelude.Show, (forall x. DescribeTemplate -> Rep DescribeTemplate x)
-> (forall x. Rep DescribeTemplate x -> DescribeTemplate)
-> Generic DescribeTemplate
forall x. Rep DescribeTemplate x -> DescribeTemplate
forall x. DescribeTemplate -> Rep DescribeTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTemplate x -> DescribeTemplate
$cfrom :: forall x. DescribeTemplate -> Rep DescribeTemplate x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTemplate' 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:
--
-- 'aliasName', 'describeTemplate_aliasName' - The alias of the template that you want to describe. If you name a
-- specific alias, you describe the version that the alias points to. You
-- can specify the latest version of the template by providing the keyword
-- @$LATEST@ in the @AliasName@ parameter. The keyword @$PUBLISHED@
-- doesn\'t apply to templates.
--
-- 'versionNumber', 'describeTemplate_versionNumber' - (Optional) The number for the version to describe. If a @VersionNumber@
-- parameter value isn\'t provided, the latest version of the template is
-- described.
--
-- 'awsAccountId', 'describeTemplate_awsAccountId' - The ID of the Amazon Web Services account that contains the template
-- that you\'re describing.
--
-- 'templateId', 'describeTemplate_templateId' - The ID for the template.
newDescribeTemplate ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'templateId'
  Prelude.Text ->
  DescribeTemplate
newDescribeTemplate :: Text -> Text -> DescribeTemplate
newDescribeTemplate Text
pAwsAccountId_ Text
pTemplateId_ =
  DescribeTemplate' :: Maybe Text -> Maybe Natural -> Text -> Text -> DescribeTemplate
DescribeTemplate'
    { $sel:aliasName:DescribeTemplate' :: Maybe Text
aliasName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:versionNumber:DescribeTemplate' :: Maybe Natural
versionNumber = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:DescribeTemplate' :: Text
awsAccountId = Text
pAwsAccountId_,
      $sel:templateId:DescribeTemplate' :: Text
templateId = Text
pTemplateId_
    }

-- | The alias of the template that you want to describe. If you name a
-- specific alias, you describe the version that the alias points to. You
-- can specify the latest version of the template by providing the keyword
-- @$LATEST@ in the @AliasName@ parameter. The keyword @$PUBLISHED@
-- doesn\'t apply to templates.
describeTemplate_aliasName :: Lens.Lens' DescribeTemplate (Prelude.Maybe Prelude.Text)
describeTemplate_aliasName :: (Maybe Text -> f (Maybe Text))
-> DescribeTemplate -> f DescribeTemplate
describeTemplate_aliasName = (DescribeTemplate -> Maybe Text)
-> (DescribeTemplate -> Maybe Text -> DescribeTemplate)
-> Lens DescribeTemplate DescribeTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTemplate' {Maybe Text
aliasName :: Maybe Text
$sel:aliasName:DescribeTemplate' :: DescribeTemplate -> Maybe Text
aliasName} -> Maybe Text
aliasName) (\s :: DescribeTemplate
s@DescribeTemplate' {} Maybe Text
a -> DescribeTemplate
s {$sel:aliasName:DescribeTemplate' :: Maybe Text
aliasName = Maybe Text
a} :: DescribeTemplate)

-- | (Optional) The number for the version to describe. If a @VersionNumber@
-- parameter value isn\'t provided, the latest version of the template is
-- described.
describeTemplate_versionNumber :: Lens.Lens' DescribeTemplate (Prelude.Maybe Prelude.Natural)
describeTemplate_versionNumber :: (Maybe Natural -> f (Maybe Natural))
-> DescribeTemplate -> f DescribeTemplate
describeTemplate_versionNumber = (DescribeTemplate -> Maybe Natural)
-> (DescribeTemplate -> Maybe Natural -> DescribeTemplate)
-> Lens
     DescribeTemplate DescribeTemplate (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTemplate' {Maybe Natural
versionNumber :: Maybe Natural
$sel:versionNumber:DescribeTemplate' :: DescribeTemplate -> Maybe Natural
versionNumber} -> Maybe Natural
versionNumber) (\s :: DescribeTemplate
s@DescribeTemplate' {} Maybe Natural
a -> DescribeTemplate
s {$sel:versionNumber:DescribeTemplate' :: Maybe Natural
versionNumber = Maybe Natural
a} :: DescribeTemplate)

-- | The ID of the Amazon Web Services account that contains the template
-- that you\'re describing.
describeTemplate_awsAccountId :: Lens.Lens' DescribeTemplate Prelude.Text
describeTemplate_awsAccountId :: (Text -> f Text) -> DescribeTemplate -> f DescribeTemplate
describeTemplate_awsAccountId = (DescribeTemplate -> Text)
-> (DescribeTemplate -> Text -> DescribeTemplate)
-> Lens DescribeTemplate DescribeTemplate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTemplate' {Text
awsAccountId :: Text
$sel:awsAccountId:DescribeTemplate' :: DescribeTemplate -> Text
awsAccountId} -> Text
awsAccountId) (\s :: DescribeTemplate
s@DescribeTemplate' {} Text
a -> DescribeTemplate
s {$sel:awsAccountId:DescribeTemplate' :: Text
awsAccountId = Text
a} :: DescribeTemplate)

-- | The ID for the template.
describeTemplate_templateId :: Lens.Lens' DescribeTemplate Prelude.Text
describeTemplate_templateId :: (Text -> f Text) -> DescribeTemplate -> f DescribeTemplate
describeTemplate_templateId = (DescribeTemplate -> Text)
-> (DescribeTemplate -> Text -> DescribeTemplate)
-> Lens DescribeTemplate DescribeTemplate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTemplate' {Text
templateId :: Text
$sel:templateId:DescribeTemplate' :: DescribeTemplate -> Text
templateId} -> Text
templateId) (\s :: DescribeTemplate
s@DescribeTemplate' {} Text
a -> DescribeTemplate
s {$sel:templateId:DescribeTemplate' :: Text
templateId = Text
a} :: DescribeTemplate)

instance Core.AWSRequest DescribeTemplate where
  type
    AWSResponse DescribeTemplate =
      DescribeTemplateResponse
  request :: DescribeTemplate -> Request DescribeTemplate
request = Service -> DescribeTemplate -> Request DescribeTemplate
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeTemplate
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTemplate)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeTemplate))
-> Logger
-> Service
-> Proxy DescribeTemplate
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTemplate)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe Template -> Int -> DescribeTemplateResponse
DescribeTemplateResponse'
            (Maybe Text -> Maybe Template -> Int -> DescribeTemplateResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Template -> Int -> DescribeTemplateResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RequestId")
            Either String (Maybe Template -> Int -> DescribeTemplateResponse)
-> Either String (Maybe Template)
-> Either String (Int -> DescribeTemplateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Template)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Template")
            Either String (Int -> DescribeTemplateResponse)
-> Either String Int -> Either String DescribeTemplateResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeTemplate

instance Prelude.NFData DescribeTemplate

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

instance Core.ToPath DescribeTemplate where
  toPath :: DescribeTemplate -> ByteString
toPath DescribeTemplate' {Maybe Natural
Maybe Text
Text
templateId :: Text
awsAccountId :: Text
versionNumber :: Maybe Natural
aliasName :: Maybe Text
$sel:templateId:DescribeTemplate' :: DescribeTemplate -> Text
$sel:awsAccountId:DescribeTemplate' :: DescribeTemplate -> Text
$sel:versionNumber:DescribeTemplate' :: DescribeTemplate -> Maybe Natural
$sel:aliasName:DescribeTemplate' :: DescribeTemplate -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
        ByteString
"/templates/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
templateId
      ]

instance Core.ToQuery DescribeTemplate where
  toQuery :: DescribeTemplate -> QueryString
toQuery DescribeTemplate' {Maybe Natural
Maybe Text
Text
templateId :: Text
awsAccountId :: Text
versionNumber :: Maybe Natural
aliasName :: Maybe Text
$sel:templateId:DescribeTemplate' :: DescribeTemplate -> Text
$sel:awsAccountId:DescribeTemplate' :: DescribeTemplate -> Text
$sel:versionNumber:DescribeTemplate' :: DescribeTemplate -> Maybe Natural
$sel:aliasName:DescribeTemplate' :: DescribeTemplate -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"alias-name" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
aliasName,
        ByteString
"version-number" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
versionNumber
      ]

-- | /See:/ 'newDescribeTemplateResponse' smart constructor.
data DescribeTemplateResponse = DescribeTemplateResponse'
  { -- | The Amazon Web Services request ID for this operation.
    DescribeTemplateResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The template structure for the object you want to describe.
    DescribeTemplateResponse -> Maybe Template
template :: Prelude.Maybe Template,
    -- | The HTTP status of the request.
    DescribeTemplateResponse -> Int
status :: Prelude.Int
  }
  deriving (DescribeTemplateResponse -> DescribeTemplateResponse -> Bool
(DescribeTemplateResponse -> DescribeTemplateResponse -> Bool)
-> (DescribeTemplateResponse -> DescribeTemplateResponse -> Bool)
-> Eq DescribeTemplateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTemplateResponse -> DescribeTemplateResponse -> Bool
$c/= :: DescribeTemplateResponse -> DescribeTemplateResponse -> Bool
== :: DescribeTemplateResponse -> DescribeTemplateResponse -> Bool
$c== :: DescribeTemplateResponse -> DescribeTemplateResponse -> Bool
Prelude.Eq, ReadPrec [DescribeTemplateResponse]
ReadPrec DescribeTemplateResponse
Int -> ReadS DescribeTemplateResponse
ReadS [DescribeTemplateResponse]
(Int -> ReadS DescribeTemplateResponse)
-> ReadS [DescribeTemplateResponse]
-> ReadPrec DescribeTemplateResponse
-> ReadPrec [DescribeTemplateResponse]
-> Read DescribeTemplateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTemplateResponse]
$creadListPrec :: ReadPrec [DescribeTemplateResponse]
readPrec :: ReadPrec DescribeTemplateResponse
$creadPrec :: ReadPrec DescribeTemplateResponse
readList :: ReadS [DescribeTemplateResponse]
$creadList :: ReadS [DescribeTemplateResponse]
readsPrec :: Int -> ReadS DescribeTemplateResponse
$creadsPrec :: Int -> ReadS DescribeTemplateResponse
Prelude.Read, Int -> DescribeTemplateResponse -> ShowS
[DescribeTemplateResponse] -> ShowS
DescribeTemplateResponse -> String
(Int -> DescribeTemplateResponse -> ShowS)
-> (DescribeTemplateResponse -> String)
-> ([DescribeTemplateResponse] -> ShowS)
-> Show DescribeTemplateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTemplateResponse] -> ShowS
$cshowList :: [DescribeTemplateResponse] -> ShowS
show :: DescribeTemplateResponse -> String
$cshow :: DescribeTemplateResponse -> String
showsPrec :: Int -> DescribeTemplateResponse -> ShowS
$cshowsPrec :: Int -> DescribeTemplateResponse -> ShowS
Prelude.Show, (forall x.
 DescribeTemplateResponse -> Rep DescribeTemplateResponse x)
-> (forall x.
    Rep DescribeTemplateResponse x -> DescribeTemplateResponse)
-> Generic DescribeTemplateResponse
forall x.
Rep DescribeTemplateResponse x -> DescribeTemplateResponse
forall x.
DescribeTemplateResponse -> Rep DescribeTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeTemplateResponse x -> DescribeTemplateResponse
$cfrom :: forall x.
DescribeTemplateResponse -> Rep DescribeTemplateResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTemplateResponse' 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:
--
-- 'requestId', 'describeTemplateResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'template', 'describeTemplateResponse_template' - The template structure for the object you want to describe.
--
-- 'status', 'describeTemplateResponse_status' - The HTTP status of the request.
newDescribeTemplateResponse ::
  -- | 'status'
  Prelude.Int ->
  DescribeTemplateResponse
newDescribeTemplateResponse :: Int -> DescribeTemplateResponse
newDescribeTemplateResponse Int
pStatus_ =
  DescribeTemplateResponse' :: Maybe Text -> Maybe Template -> Int -> DescribeTemplateResponse
DescribeTemplateResponse'
    { $sel:requestId:DescribeTemplateResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:template:DescribeTemplateResponse' :: Maybe Template
template = Maybe Template
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeTemplateResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon Web Services request ID for this operation.
describeTemplateResponse_requestId :: Lens.Lens' DescribeTemplateResponse (Prelude.Maybe Prelude.Text)
describeTemplateResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> DescribeTemplateResponse -> f DescribeTemplateResponse
describeTemplateResponse_requestId = (DescribeTemplateResponse -> Maybe Text)
-> (DescribeTemplateResponse
    -> Maybe Text -> DescribeTemplateResponse)
-> Lens
     DescribeTemplateResponse
     DescribeTemplateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTemplateResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:DescribeTemplateResponse' :: DescribeTemplateResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: DescribeTemplateResponse
s@DescribeTemplateResponse' {} Maybe Text
a -> DescribeTemplateResponse
s {$sel:requestId:DescribeTemplateResponse' :: Maybe Text
requestId = Maybe Text
a} :: DescribeTemplateResponse)

-- | The template structure for the object you want to describe.
describeTemplateResponse_template :: Lens.Lens' DescribeTemplateResponse (Prelude.Maybe Template)
describeTemplateResponse_template :: (Maybe Template -> f (Maybe Template))
-> DescribeTemplateResponse -> f DescribeTemplateResponse
describeTemplateResponse_template = (DescribeTemplateResponse -> Maybe Template)
-> (DescribeTemplateResponse
    -> Maybe Template -> DescribeTemplateResponse)
-> Lens
     DescribeTemplateResponse
     DescribeTemplateResponse
     (Maybe Template)
     (Maybe Template)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTemplateResponse' {Maybe Template
template :: Maybe Template
$sel:template:DescribeTemplateResponse' :: DescribeTemplateResponse -> Maybe Template
template} -> Maybe Template
template) (\s :: DescribeTemplateResponse
s@DescribeTemplateResponse' {} Maybe Template
a -> DescribeTemplateResponse
s {$sel:template:DescribeTemplateResponse' :: Maybe Template
template = Maybe Template
a} :: DescribeTemplateResponse)

-- | The HTTP status of the request.
describeTemplateResponse_status :: Lens.Lens' DescribeTemplateResponse Prelude.Int
describeTemplateResponse_status :: (Int -> f Int)
-> DescribeTemplateResponse -> f DescribeTemplateResponse
describeTemplateResponse_status = (DescribeTemplateResponse -> Int)
-> (DescribeTemplateResponse -> Int -> DescribeTemplateResponse)
-> Lens DescribeTemplateResponse DescribeTemplateResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTemplateResponse' {Int
status :: Int
$sel:status:DescribeTemplateResponse' :: DescribeTemplateResponse -> Int
status} -> Int
status) (\s :: DescribeTemplateResponse
s@DescribeTemplateResponse' {} Int
a -> DescribeTemplateResponse
s {$sel:status:DescribeTemplateResponse' :: Int
status = Int
a} :: DescribeTemplateResponse)

instance Prelude.NFData DescribeTemplateResponse