{-# 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.ConnectCases.GetTemplate
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the details for the requested template.
module Amazonka.ConnectCases.GetTemplate
  ( -- * Creating a Request
    GetTemplate (..),
    newGetTemplate,

    -- * Request Lenses
    getTemplate_domainId,
    getTemplate_templateId,

    -- * Destructuring the Response
    GetTemplateResponse (..),
    newGetTemplateResponse,

    -- * Response Lenses
    getTemplateResponse_description,
    getTemplateResponse_layoutConfiguration,
    getTemplateResponse_requiredFields,
    getTemplateResponse_tags,
    getTemplateResponse_httpStatus,
    getTemplateResponse_name,
    getTemplateResponse_status,
    getTemplateResponse_templateArn,
    getTemplateResponse_templateId,
  )
where

import Amazonka.ConnectCases.Types
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

-- | /See:/ 'newGetTemplate' smart constructor.
data GetTemplate = GetTemplate'
  { -- | The unique identifier of the Cases domain.
    GetTemplate -> Text
domainId :: Prelude.Text,
    -- | A unique identifier of a template.
    GetTemplate -> Text
templateId :: Prelude.Text
  }
  deriving (GetTemplate -> GetTemplate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetTemplate -> GetTemplate -> Bool
$c/= :: GetTemplate -> GetTemplate -> Bool
== :: GetTemplate -> GetTemplate -> Bool
$c== :: GetTemplate -> GetTemplate -> Bool
Prelude.Eq, ReadPrec [GetTemplate]
ReadPrec GetTemplate
Int -> ReadS GetTemplate
ReadS [GetTemplate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetTemplate]
$creadListPrec :: ReadPrec [GetTemplate]
readPrec :: ReadPrec GetTemplate
$creadPrec :: ReadPrec GetTemplate
readList :: ReadS [GetTemplate]
$creadList :: ReadS [GetTemplate]
readsPrec :: Int -> ReadS GetTemplate
$creadsPrec :: Int -> ReadS GetTemplate
Prelude.Read, Int -> GetTemplate -> ShowS
[GetTemplate] -> ShowS
GetTemplate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetTemplate] -> ShowS
$cshowList :: [GetTemplate] -> ShowS
show :: GetTemplate -> String
$cshow :: GetTemplate -> String
showsPrec :: Int -> GetTemplate -> ShowS
$cshowsPrec :: Int -> GetTemplate -> ShowS
Prelude.Show, forall x. Rep GetTemplate x -> GetTemplate
forall x. GetTemplate -> Rep GetTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetTemplate x -> GetTemplate
$cfrom :: forall x. GetTemplate -> Rep GetTemplate x
Prelude.Generic)

-- |
-- Create a value of 'GetTemplate' 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:
--
-- 'domainId', 'getTemplate_domainId' - The unique identifier of the Cases domain.
--
-- 'templateId', 'getTemplate_templateId' - A unique identifier of a template.
newGetTemplate ::
  -- | 'domainId'
  Prelude.Text ->
  -- | 'templateId'
  Prelude.Text ->
  GetTemplate
newGetTemplate :: Text -> Text -> GetTemplate
newGetTemplate Text
pDomainId_ Text
pTemplateId_ =
  GetTemplate'
    { $sel:domainId:GetTemplate' :: Text
domainId = Text
pDomainId_,
      $sel:templateId:GetTemplate' :: Text
templateId = Text
pTemplateId_
    }

-- | The unique identifier of the Cases domain.
getTemplate_domainId :: Lens.Lens' GetTemplate Prelude.Text
getTemplate_domainId :: Lens' GetTemplate Text
getTemplate_domainId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplate' {Text
domainId :: Text
$sel:domainId:GetTemplate' :: GetTemplate -> Text
domainId} -> Text
domainId) (\s :: GetTemplate
s@GetTemplate' {} Text
a -> GetTemplate
s {$sel:domainId:GetTemplate' :: Text
domainId = Text
a} :: GetTemplate)

-- | A unique identifier of a template.
getTemplate_templateId :: Lens.Lens' GetTemplate Prelude.Text
getTemplate_templateId :: Lens' GetTemplate Text
getTemplate_templateId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplate' {Text
templateId :: Text
$sel:templateId:GetTemplate' :: GetTemplate -> Text
templateId} -> Text
templateId) (\s :: GetTemplate
s@GetTemplate' {} Text
a -> GetTemplate
s {$sel:templateId:GetTemplate' :: Text
templateId = Text
a} :: GetTemplate)

instance Core.AWSRequest GetTemplate where
  type AWSResponse GetTemplate = GetTemplateResponse
  request :: (Service -> Service) -> GetTemplate -> Request GetTemplate
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetTemplate
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetTemplate)))
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 LayoutConfiguration
-> Maybe [RequiredField]
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> TemplateStatus
-> Text
-> Text
-> GetTemplateResponse
GetTemplateResponse'
            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
"description")
            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
"layoutConfiguration")
            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
"requiredFields" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String 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 a
Data..:> Key
"templateArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"templateId")
      )

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

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

instance Data.ToHeaders GetTemplate where
  toHeaders :: GetTemplate -> 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.ToJSON GetTemplate where
  toJSON :: GetTemplate -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)

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

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

-- | /See:/ 'newGetTemplateResponse' smart constructor.
data GetTemplateResponse = GetTemplateResponse'
  { -- | A brief description of the template.
    GetTemplateResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Configuration of layouts associated to the template.
    GetTemplateResponse -> Maybe LayoutConfiguration
layoutConfiguration :: Prelude.Maybe LayoutConfiguration,
    -- | A list of fields that must contain a value for a case to be successfully
    -- created with this template.
    GetTemplateResponse -> Maybe [RequiredField]
requiredFields :: Prelude.Maybe [RequiredField],
    -- | A map of of key-value pairs that represent tags on a resource. Tags are
    -- used to organize, track, or control access for this resource.
    GetTemplateResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    GetTemplateResponse -> Int
httpStatus :: Prelude.Int,
    -- | The name of the template.
    GetTemplateResponse -> Text
name :: Prelude.Text,
    -- | The status of the template.
    GetTemplateResponse -> TemplateStatus
status :: TemplateStatus,
    -- | The Amazon Resource Name (ARN) of the template.
    GetTemplateResponse -> Text
templateArn :: Prelude.Text,
    -- | A unique identifier of a template.
    GetTemplateResponse -> Text
templateId :: Prelude.Text
  }
  deriving (GetTemplateResponse -> GetTemplateResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetTemplateResponse -> GetTemplateResponse -> Bool
$c/= :: GetTemplateResponse -> GetTemplateResponse -> Bool
== :: GetTemplateResponse -> GetTemplateResponse -> Bool
$c== :: GetTemplateResponse -> GetTemplateResponse -> Bool
Prelude.Eq, ReadPrec [GetTemplateResponse]
ReadPrec GetTemplateResponse
Int -> ReadS GetTemplateResponse
ReadS [GetTemplateResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetTemplateResponse]
$creadListPrec :: ReadPrec [GetTemplateResponse]
readPrec :: ReadPrec GetTemplateResponse
$creadPrec :: ReadPrec GetTemplateResponse
readList :: ReadS [GetTemplateResponse]
$creadList :: ReadS [GetTemplateResponse]
readsPrec :: Int -> ReadS GetTemplateResponse
$creadsPrec :: Int -> ReadS GetTemplateResponse
Prelude.Read, Int -> GetTemplateResponse -> ShowS
[GetTemplateResponse] -> ShowS
GetTemplateResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetTemplateResponse] -> ShowS
$cshowList :: [GetTemplateResponse] -> ShowS
show :: GetTemplateResponse -> String
$cshow :: GetTemplateResponse -> String
showsPrec :: Int -> GetTemplateResponse -> ShowS
$cshowsPrec :: Int -> GetTemplateResponse -> ShowS
Prelude.Show, forall x. Rep GetTemplateResponse x -> GetTemplateResponse
forall x. GetTemplateResponse -> Rep GetTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetTemplateResponse x -> GetTemplateResponse
$cfrom :: forall x. GetTemplateResponse -> Rep GetTemplateResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetTemplateResponse' 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:
--
-- 'description', 'getTemplateResponse_description' - A brief description of the template.
--
-- 'layoutConfiguration', 'getTemplateResponse_layoutConfiguration' - Configuration of layouts associated to the template.
--
-- 'requiredFields', 'getTemplateResponse_requiredFields' - A list of fields that must contain a value for a case to be successfully
-- created with this template.
--
-- 'tags', 'getTemplateResponse_tags' - A map of of key-value pairs that represent tags on a resource. Tags are
-- used to organize, track, or control access for this resource.
--
-- 'httpStatus', 'getTemplateResponse_httpStatus' - The response's http status code.
--
-- 'name', 'getTemplateResponse_name' - The name of the template.
--
-- 'status', 'getTemplateResponse_status' - The status of the template.
--
-- 'templateArn', 'getTemplateResponse_templateArn' - The Amazon Resource Name (ARN) of the template.
--
-- 'templateId', 'getTemplateResponse_templateId' - A unique identifier of a template.
newGetTemplateResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'name'
  Prelude.Text ->
  -- | 'status'
  TemplateStatus ->
  -- | 'templateArn'
  Prelude.Text ->
  -- | 'templateId'
  Prelude.Text ->
  GetTemplateResponse
newGetTemplateResponse :: Int
-> Text -> TemplateStatus -> Text -> Text -> GetTemplateResponse
newGetTemplateResponse
  Int
pHttpStatus_
  Text
pName_
  TemplateStatus
pStatus_
  Text
pTemplateArn_
  Text
pTemplateId_ =
    GetTemplateResponse'
      { $sel:description:GetTemplateResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
        $sel:layoutConfiguration:GetTemplateResponse' :: Maybe LayoutConfiguration
layoutConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:requiredFields:GetTemplateResponse' :: Maybe [RequiredField]
requiredFields = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:GetTemplateResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetTemplateResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:name:GetTemplateResponse' :: Text
name = Text
pName_,
        $sel:status:GetTemplateResponse' :: TemplateStatus
status = TemplateStatus
pStatus_,
        $sel:templateArn:GetTemplateResponse' :: Text
templateArn = Text
pTemplateArn_,
        $sel:templateId:GetTemplateResponse' :: Text
templateId = Text
pTemplateId_
      }

-- | A brief description of the template.
getTemplateResponse_description :: Lens.Lens' GetTemplateResponse (Prelude.Maybe Prelude.Text)
getTemplateResponse_description :: Lens' GetTemplateResponse (Maybe Text)
getTemplateResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateResponse' {Maybe Text
description :: Maybe Text
$sel:description:GetTemplateResponse' :: GetTemplateResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: GetTemplateResponse
s@GetTemplateResponse' {} Maybe Text
a -> GetTemplateResponse
s {$sel:description:GetTemplateResponse' :: Maybe Text
description = Maybe Text
a} :: GetTemplateResponse)

-- | Configuration of layouts associated to the template.
getTemplateResponse_layoutConfiguration :: Lens.Lens' GetTemplateResponse (Prelude.Maybe LayoutConfiguration)
getTemplateResponse_layoutConfiguration :: Lens' GetTemplateResponse (Maybe LayoutConfiguration)
getTemplateResponse_layoutConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateResponse' {Maybe LayoutConfiguration
layoutConfiguration :: Maybe LayoutConfiguration
$sel:layoutConfiguration:GetTemplateResponse' :: GetTemplateResponse -> Maybe LayoutConfiguration
layoutConfiguration} -> Maybe LayoutConfiguration
layoutConfiguration) (\s :: GetTemplateResponse
s@GetTemplateResponse' {} Maybe LayoutConfiguration
a -> GetTemplateResponse
s {$sel:layoutConfiguration:GetTemplateResponse' :: Maybe LayoutConfiguration
layoutConfiguration = Maybe LayoutConfiguration
a} :: GetTemplateResponse)

-- | A list of fields that must contain a value for a case to be successfully
-- created with this template.
getTemplateResponse_requiredFields :: Lens.Lens' GetTemplateResponse (Prelude.Maybe [RequiredField])
getTemplateResponse_requiredFields :: Lens' GetTemplateResponse (Maybe [RequiredField])
getTemplateResponse_requiredFields = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateResponse' {Maybe [RequiredField]
requiredFields :: Maybe [RequiredField]
$sel:requiredFields:GetTemplateResponse' :: GetTemplateResponse -> Maybe [RequiredField]
requiredFields} -> Maybe [RequiredField]
requiredFields) (\s :: GetTemplateResponse
s@GetTemplateResponse' {} Maybe [RequiredField]
a -> GetTemplateResponse
s {$sel:requiredFields:GetTemplateResponse' :: Maybe [RequiredField]
requiredFields = Maybe [RequiredField]
a} :: GetTemplateResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A map of of key-value pairs that represent tags on a resource. Tags are
-- used to organize, track, or control access for this resource.
getTemplateResponse_tags :: Lens.Lens' GetTemplateResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getTemplateResponse_tags :: Lens' GetTemplateResponse (Maybe (HashMap Text Text))
getTemplateResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetTemplateResponse' :: GetTemplateResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetTemplateResponse
s@GetTemplateResponse' {} Maybe (HashMap Text Text)
a -> GetTemplateResponse
s {$sel:tags:GetTemplateResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetTemplateResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

-- | The status of the template.
getTemplateResponse_status :: Lens.Lens' GetTemplateResponse TemplateStatus
getTemplateResponse_status :: Lens' GetTemplateResponse TemplateStatus
getTemplateResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateResponse' {TemplateStatus
status :: TemplateStatus
$sel:status:GetTemplateResponse' :: GetTemplateResponse -> TemplateStatus
status} -> TemplateStatus
status) (\s :: GetTemplateResponse
s@GetTemplateResponse' {} TemplateStatus
a -> GetTemplateResponse
s {$sel:status:GetTemplateResponse' :: TemplateStatus
status = TemplateStatus
a} :: GetTemplateResponse)

-- | The Amazon Resource Name (ARN) of the template.
getTemplateResponse_templateArn :: Lens.Lens' GetTemplateResponse Prelude.Text
getTemplateResponse_templateArn :: Lens' GetTemplateResponse Text
getTemplateResponse_templateArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateResponse' {Text
templateArn :: Text
$sel:templateArn:GetTemplateResponse' :: GetTemplateResponse -> Text
templateArn} -> Text
templateArn) (\s :: GetTemplateResponse
s@GetTemplateResponse' {} Text
a -> GetTemplateResponse
s {$sel:templateArn:GetTemplateResponse' :: Text
templateArn = Text
a} :: GetTemplateResponse)

-- | A unique identifier of a template.
getTemplateResponse_templateId :: Lens.Lens' GetTemplateResponse Prelude.Text
getTemplateResponse_templateId :: Lens' GetTemplateResponse Text
getTemplateResponse_templateId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTemplateResponse' {Text
templateId :: Text
$sel:templateId:GetTemplateResponse' :: GetTemplateResponse -> Text
templateId} -> Text
templateId) (\s :: GetTemplateResponse
s@GetTemplateResponse' {} Text
a -> GetTemplateResponse
s {$sel:templateId:GetTemplateResponse' :: Text
templateId = Text
a} :: GetTemplateResponse)

instance Prelude.NFData GetTemplateResponse where
  rnf :: GetTemplateResponse -> ()
rnf GetTemplateResponse' {Int
Maybe [RequiredField]
Maybe Text
Maybe (HashMap Text Text)
Maybe LayoutConfiguration
Text
TemplateStatus
templateId :: Text
templateArn :: Text
status :: TemplateStatus
name :: Text
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
requiredFields :: Maybe [RequiredField]
layoutConfiguration :: Maybe LayoutConfiguration
description :: Maybe Text
$sel:templateId:GetTemplateResponse' :: GetTemplateResponse -> Text
$sel:templateArn:GetTemplateResponse' :: GetTemplateResponse -> Text
$sel:status:GetTemplateResponse' :: GetTemplateResponse -> TemplateStatus
$sel:name:GetTemplateResponse' :: GetTemplateResponse -> Text
$sel:httpStatus:GetTemplateResponse' :: GetTemplateResponse -> Int
$sel:tags:GetTemplateResponse' :: GetTemplateResponse -> Maybe (HashMap Text Text)
$sel:requiredFields:GetTemplateResponse' :: GetTemplateResponse -> Maybe [RequiredField]
$sel:layoutConfiguration:GetTemplateResponse' :: GetTemplateResponse -> Maybe LayoutConfiguration
$sel:description:GetTemplateResponse' :: GetTemplateResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LayoutConfiguration
layoutConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RequiredField]
requiredFields
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TemplateStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateId