{-# 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.CreateTemplateAlias
-- 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)
--
-- Creates a template alias for a template.
module Amazonka.QuickSight.CreateTemplateAlias
  ( -- * Creating a Request
    CreateTemplateAlias (..),
    newCreateTemplateAlias,

    -- * Request Lenses
    createTemplateAlias_awsAccountId,
    createTemplateAlias_templateId,
    createTemplateAlias_aliasName,
    createTemplateAlias_templateVersionNumber,

    -- * Destructuring the Response
    CreateTemplateAliasResponse (..),
    newCreateTemplateAliasResponse,

    -- * Response Lenses
    createTemplateAliasResponse_requestId,
    createTemplateAliasResponse_templateAlias,
    createTemplateAliasResponse_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:/ 'newCreateTemplateAlias' smart constructor.
data CreateTemplateAlias = CreateTemplateAlias'
  { -- | The ID of the Amazon Web Services account that contains the template
    -- that you creating an alias for.
    CreateTemplateAlias -> Text
awsAccountId :: Prelude.Text,
    -- | An ID for the template.
    CreateTemplateAlias -> Text
templateId :: Prelude.Text,
    -- | The name that you want to give to the template alias that you\'re
    -- creating. Don\'t start the alias name with the @$@ character. Alias
    -- names that start with @$@ are reserved by Amazon QuickSight.
    CreateTemplateAlias -> Text
aliasName :: Prelude.Text,
    -- | The version number of the template.
    CreateTemplateAlias -> Natural
templateVersionNumber :: Prelude.Natural
  }
  deriving (CreateTemplateAlias -> CreateTemplateAlias -> Bool
(CreateTemplateAlias -> CreateTemplateAlias -> Bool)
-> (CreateTemplateAlias -> CreateTemplateAlias -> Bool)
-> Eq CreateTemplateAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTemplateAlias -> CreateTemplateAlias -> Bool
$c/= :: CreateTemplateAlias -> CreateTemplateAlias -> Bool
== :: CreateTemplateAlias -> CreateTemplateAlias -> Bool
$c== :: CreateTemplateAlias -> CreateTemplateAlias -> Bool
Prelude.Eq, ReadPrec [CreateTemplateAlias]
ReadPrec CreateTemplateAlias
Int -> ReadS CreateTemplateAlias
ReadS [CreateTemplateAlias]
(Int -> ReadS CreateTemplateAlias)
-> ReadS [CreateTemplateAlias]
-> ReadPrec CreateTemplateAlias
-> ReadPrec [CreateTemplateAlias]
-> Read CreateTemplateAlias
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTemplateAlias]
$creadListPrec :: ReadPrec [CreateTemplateAlias]
readPrec :: ReadPrec CreateTemplateAlias
$creadPrec :: ReadPrec CreateTemplateAlias
readList :: ReadS [CreateTemplateAlias]
$creadList :: ReadS [CreateTemplateAlias]
readsPrec :: Int -> ReadS CreateTemplateAlias
$creadsPrec :: Int -> ReadS CreateTemplateAlias
Prelude.Read, Int -> CreateTemplateAlias -> ShowS
[CreateTemplateAlias] -> ShowS
CreateTemplateAlias -> String
(Int -> CreateTemplateAlias -> ShowS)
-> (CreateTemplateAlias -> String)
-> ([CreateTemplateAlias] -> ShowS)
-> Show CreateTemplateAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTemplateAlias] -> ShowS
$cshowList :: [CreateTemplateAlias] -> ShowS
show :: CreateTemplateAlias -> String
$cshow :: CreateTemplateAlias -> String
showsPrec :: Int -> CreateTemplateAlias -> ShowS
$cshowsPrec :: Int -> CreateTemplateAlias -> ShowS
Prelude.Show, (forall x. CreateTemplateAlias -> Rep CreateTemplateAlias x)
-> (forall x. Rep CreateTemplateAlias x -> CreateTemplateAlias)
-> Generic CreateTemplateAlias
forall x. Rep CreateTemplateAlias x -> CreateTemplateAlias
forall x. CreateTemplateAlias -> Rep CreateTemplateAlias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTemplateAlias x -> CreateTemplateAlias
$cfrom :: forall x. CreateTemplateAlias -> Rep CreateTemplateAlias x
Prelude.Generic)

-- |
-- Create a value of 'CreateTemplateAlias' 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:
--
-- 'awsAccountId', 'createTemplateAlias_awsAccountId' - The ID of the Amazon Web Services account that contains the template
-- that you creating an alias for.
--
-- 'templateId', 'createTemplateAlias_templateId' - An ID for the template.
--
-- 'aliasName', 'createTemplateAlias_aliasName' - The name that you want to give to the template alias that you\'re
-- creating. Don\'t start the alias name with the @$@ character. Alias
-- names that start with @$@ are reserved by Amazon QuickSight.
--
-- 'templateVersionNumber', 'createTemplateAlias_templateVersionNumber' - The version number of the template.
newCreateTemplateAlias ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'templateId'
  Prelude.Text ->
  -- | 'aliasName'
  Prelude.Text ->
  -- | 'templateVersionNumber'
  Prelude.Natural ->
  CreateTemplateAlias
newCreateTemplateAlias :: Text -> Text -> Text -> Natural -> CreateTemplateAlias
newCreateTemplateAlias
  Text
pAwsAccountId_
  Text
pTemplateId_
  Text
pAliasName_
  Natural
pTemplateVersionNumber_ =
    CreateTemplateAlias' :: Text -> Text -> Text -> Natural -> CreateTemplateAlias
CreateTemplateAlias'
      { $sel:awsAccountId:CreateTemplateAlias' :: Text
awsAccountId = Text
pAwsAccountId_,
        $sel:templateId:CreateTemplateAlias' :: Text
templateId = Text
pTemplateId_,
        $sel:aliasName:CreateTemplateAlias' :: Text
aliasName = Text
pAliasName_,
        $sel:templateVersionNumber:CreateTemplateAlias' :: Natural
templateVersionNumber = Natural
pTemplateVersionNumber_
      }

-- | The ID of the Amazon Web Services account that contains the template
-- that you creating an alias for.
createTemplateAlias_awsAccountId :: Lens.Lens' CreateTemplateAlias Prelude.Text
createTemplateAlias_awsAccountId :: (Text -> f Text) -> CreateTemplateAlias -> f CreateTemplateAlias
createTemplateAlias_awsAccountId = (CreateTemplateAlias -> Text)
-> (CreateTemplateAlias -> Text -> CreateTemplateAlias)
-> Lens CreateTemplateAlias CreateTemplateAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTemplateAlias' {Text
awsAccountId :: Text
$sel:awsAccountId:CreateTemplateAlias' :: CreateTemplateAlias -> Text
awsAccountId} -> Text
awsAccountId) (\s :: CreateTemplateAlias
s@CreateTemplateAlias' {} Text
a -> CreateTemplateAlias
s {$sel:awsAccountId:CreateTemplateAlias' :: Text
awsAccountId = Text
a} :: CreateTemplateAlias)

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

-- | The name that you want to give to the template alias that you\'re
-- creating. Don\'t start the alias name with the @$@ character. Alias
-- names that start with @$@ are reserved by Amazon QuickSight.
createTemplateAlias_aliasName :: Lens.Lens' CreateTemplateAlias Prelude.Text
createTemplateAlias_aliasName :: (Text -> f Text) -> CreateTemplateAlias -> f CreateTemplateAlias
createTemplateAlias_aliasName = (CreateTemplateAlias -> Text)
-> (CreateTemplateAlias -> Text -> CreateTemplateAlias)
-> Lens CreateTemplateAlias CreateTemplateAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTemplateAlias' {Text
aliasName :: Text
$sel:aliasName:CreateTemplateAlias' :: CreateTemplateAlias -> Text
aliasName} -> Text
aliasName) (\s :: CreateTemplateAlias
s@CreateTemplateAlias' {} Text
a -> CreateTemplateAlias
s {$sel:aliasName:CreateTemplateAlias' :: Text
aliasName = Text
a} :: CreateTemplateAlias)

-- | The version number of the template.
createTemplateAlias_templateVersionNumber :: Lens.Lens' CreateTemplateAlias Prelude.Natural
createTemplateAlias_templateVersionNumber :: (Natural -> f Natural)
-> CreateTemplateAlias -> f CreateTemplateAlias
createTemplateAlias_templateVersionNumber = (CreateTemplateAlias -> Natural)
-> (CreateTemplateAlias -> Natural -> CreateTemplateAlias)
-> Lens CreateTemplateAlias CreateTemplateAlias Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTemplateAlias' {Natural
templateVersionNumber :: Natural
$sel:templateVersionNumber:CreateTemplateAlias' :: CreateTemplateAlias -> Natural
templateVersionNumber} -> Natural
templateVersionNumber) (\s :: CreateTemplateAlias
s@CreateTemplateAlias' {} Natural
a -> CreateTemplateAlias
s {$sel:templateVersionNumber:CreateTemplateAlias' :: Natural
templateVersionNumber = Natural
a} :: CreateTemplateAlias)

instance Core.AWSRequest CreateTemplateAlias where
  type
    AWSResponse CreateTemplateAlias =
      CreateTemplateAliasResponse
  request :: CreateTemplateAlias -> Request CreateTemplateAlias
request = Service -> CreateTemplateAlias -> Request CreateTemplateAlias
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateTemplateAlias
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateTemplateAlias)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateTemplateAlias))
-> Logger
-> Service
-> Proxy CreateTemplateAlias
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateTemplateAlias)))
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 TemplateAlias -> Int -> CreateTemplateAliasResponse
CreateTemplateAliasResponse'
            (Maybe Text
 -> Maybe TemplateAlias -> Int -> CreateTemplateAliasResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe TemplateAlias -> Int -> CreateTemplateAliasResponse)
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 TemplateAlias -> Int -> CreateTemplateAliasResponse)
-> Either String (Maybe TemplateAlias)
-> Either String (Int -> CreateTemplateAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe TemplateAlias)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TemplateAlias")
            Either String (Int -> CreateTemplateAliasResponse)
-> Either String Int -> Either String CreateTemplateAliasResponse
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 CreateTemplateAlias

instance Prelude.NFData CreateTemplateAlias

instance Core.ToHeaders CreateTemplateAlias where
  toHeaders :: CreateTemplateAlias -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateTemplateAlias -> 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.ToJSON CreateTemplateAlias where
  toJSON :: CreateTemplateAlias -> Value
toJSON CreateTemplateAlias' {Natural
Text
templateVersionNumber :: Natural
aliasName :: Text
templateId :: Text
awsAccountId :: Text
$sel:templateVersionNumber:CreateTemplateAlias' :: CreateTemplateAlias -> Natural
$sel:aliasName:CreateTemplateAlias' :: CreateTemplateAlias -> Text
$sel:templateId:CreateTemplateAlias' :: CreateTemplateAlias -> Text
$sel:awsAccountId:CreateTemplateAlias' :: CreateTemplateAlias -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"TemplateVersionNumber"
                  Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
templateVersionNumber
              )
          ]
      )

instance Core.ToPath CreateTemplateAlias where
  toPath :: CreateTemplateAlias -> ByteString
toPath CreateTemplateAlias' {Natural
Text
templateVersionNumber :: Natural
aliasName :: Text
templateId :: Text
awsAccountId :: Text
$sel:templateVersionNumber:CreateTemplateAlias' :: CreateTemplateAlias -> Natural
$sel:aliasName:CreateTemplateAlias' :: CreateTemplateAlias -> Text
$sel:templateId:CreateTemplateAlias' :: CreateTemplateAlias -> Text
$sel:awsAccountId:CreateTemplateAlias' :: CreateTemplateAlias -> 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,
        ByteString
"/aliases/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
aliasName
      ]

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

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

-- |
-- Create a value of 'CreateTemplateAliasResponse' 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', 'createTemplateAliasResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'templateAlias', 'createTemplateAliasResponse_templateAlias' - Information about the template alias.
--
-- 'status', 'createTemplateAliasResponse_status' - The HTTP status of the request.
newCreateTemplateAliasResponse ::
  -- | 'status'
  Prelude.Int ->
  CreateTemplateAliasResponse
newCreateTemplateAliasResponse :: Int -> CreateTemplateAliasResponse
newCreateTemplateAliasResponse Int
pStatus_ =
  CreateTemplateAliasResponse' :: Maybe Text
-> Maybe TemplateAlias -> Int -> CreateTemplateAliasResponse
CreateTemplateAliasResponse'
    { $sel:requestId:CreateTemplateAliasResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateAlias:CreateTemplateAliasResponse' :: Maybe TemplateAlias
templateAlias = Maybe TemplateAlias
forall a. Maybe a
Prelude.Nothing,
      $sel:status:CreateTemplateAliasResponse' :: Int
status = Int
pStatus_
    }

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

-- | Information about the template alias.
createTemplateAliasResponse_templateAlias :: Lens.Lens' CreateTemplateAliasResponse (Prelude.Maybe TemplateAlias)
createTemplateAliasResponse_templateAlias :: (Maybe TemplateAlias -> f (Maybe TemplateAlias))
-> CreateTemplateAliasResponse -> f CreateTemplateAliasResponse
createTemplateAliasResponse_templateAlias = (CreateTemplateAliasResponse -> Maybe TemplateAlias)
-> (CreateTemplateAliasResponse
    -> Maybe TemplateAlias -> CreateTemplateAliasResponse)
-> Lens
     CreateTemplateAliasResponse
     CreateTemplateAliasResponse
     (Maybe TemplateAlias)
     (Maybe TemplateAlias)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTemplateAliasResponse' {Maybe TemplateAlias
templateAlias :: Maybe TemplateAlias
$sel:templateAlias:CreateTemplateAliasResponse' :: CreateTemplateAliasResponse -> Maybe TemplateAlias
templateAlias} -> Maybe TemplateAlias
templateAlias) (\s :: CreateTemplateAliasResponse
s@CreateTemplateAliasResponse' {} Maybe TemplateAlias
a -> CreateTemplateAliasResponse
s {$sel:templateAlias:CreateTemplateAliasResponse' :: Maybe TemplateAlias
templateAlias = Maybe TemplateAlias
a} :: CreateTemplateAliasResponse)

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

instance Prelude.NFData CreateTemplateAliasResponse