{-# 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.UpdateTemplateAlias
-- 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)
--
-- Updates the template alias of a template.
module Amazonka.QuickSight.UpdateTemplateAlias
  ( -- * Creating a Request
    UpdateTemplateAlias (..),
    newUpdateTemplateAlias,

    -- * Request Lenses
    updateTemplateAlias_awsAccountId,
    updateTemplateAlias_templateId,
    updateTemplateAlias_aliasName,
    updateTemplateAlias_templateVersionNumber,

    -- * Destructuring the Response
    UpdateTemplateAliasResponse (..),
    newUpdateTemplateAliasResponse,

    -- * Response Lenses
    updateTemplateAliasResponse_requestId,
    updateTemplateAliasResponse_templateAlias,
    updateTemplateAliasResponse_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:/ 'newUpdateTemplateAlias' smart constructor.
data UpdateTemplateAlias = UpdateTemplateAlias'
  { -- | The ID of the Amazon Web Services account that contains the template
    -- alias that you\'re updating.
    UpdateTemplateAlias -> Text
awsAccountId :: Prelude.Text,
    -- | The ID for the template.
    UpdateTemplateAlias -> Text
templateId :: Prelude.Text,
    -- | The alias of the template that you want to update. If you name a
    -- specific alias, you update 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.
    UpdateTemplateAlias -> Text
aliasName :: Prelude.Text,
    -- | The version number of the template.
    UpdateTemplateAlias -> Natural
templateVersionNumber :: Prelude.Natural
  }
  deriving (UpdateTemplateAlias -> UpdateTemplateAlias -> Bool
(UpdateTemplateAlias -> UpdateTemplateAlias -> Bool)
-> (UpdateTemplateAlias -> UpdateTemplateAlias -> Bool)
-> Eq UpdateTemplateAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTemplateAlias -> UpdateTemplateAlias -> Bool
$c/= :: UpdateTemplateAlias -> UpdateTemplateAlias -> Bool
== :: UpdateTemplateAlias -> UpdateTemplateAlias -> Bool
$c== :: UpdateTemplateAlias -> UpdateTemplateAlias -> Bool
Prelude.Eq, ReadPrec [UpdateTemplateAlias]
ReadPrec UpdateTemplateAlias
Int -> ReadS UpdateTemplateAlias
ReadS [UpdateTemplateAlias]
(Int -> ReadS UpdateTemplateAlias)
-> ReadS [UpdateTemplateAlias]
-> ReadPrec UpdateTemplateAlias
-> ReadPrec [UpdateTemplateAlias]
-> Read UpdateTemplateAlias
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTemplateAlias]
$creadListPrec :: ReadPrec [UpdateTemplateAlias]
readPrec :: ReadPrec UpdateTemplateAlias
$creadPrec :: ReadPrec UpdateTemplateAlias
readList :: ReadS [UpdateTemplateAlias]
$creadList :: ReadS [UpdateTemplateAlias]
readsPrec :: Int -> ReadS UpdateTemplateAlias
$creadsPrec :: Int -> ReadS UpdateTemplateAlias
Prelude.Read, Int -> UpdateTemplateAlias -> ShowS
[UpdateTemplateAlias] -> ShowS
UpdateTemplateAlias -> String
(Int -> UpdateTemplateAlias -> ShowS)
-> (UpdateTemplateAlias -> String)
-> ([UpdateTemplateAlias] -> ShowS)
-> Show UpdateTemplateAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTemplateAlias] -> ShowS
$cshowList :: [UpdateTemplateAlias] -> ShowS
show :: UpdateTemplateAlias -> String
$cshow :: UpdateTemplateAlias -> String
showsPrec :: Int -> UpdateTemplateAlias -> ShowS
$cshowsPrec :: Int -> UpdateTemplateAlias -> ShowS
Prelude.Show, (forall x. UpdateTemplateAlias -> Rep UpdateTemplateAlias x)
-> (forall x. Rep UpdateTemplateAlias x -> UpdateTemplateAlias)
-> Generic UpdateTemplateAlias
forall x. Rep UpdateTemplateAlias x -> UpdateTemplateAlias
forall x. UpdateTemplateAlias -> Rep UpdateTemplateAlias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTemplateAlias x -> UpdateTemplateAlias
$cfrom :: forall x. UpdateTemplateAlias -> Rep UpdateTemplateAlias x
Prelude.Generic)

-- |
-- Create a value of 'UpdateTemplateAlias' 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', 'updateTemplateAlias_awsAccountId' - The ID of the Amazon Web Services account that contains the template
-- alias that you\'re updating.
--
-- 'templateId', 'updateTemplateAlias_templateId' - The ID for the template.
--
-- 'aliasName', 'updateTemplateAlias_aliasName' - The alias of the template that you want to update. If you name a
-- specific alias, you update 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.
--
-- 'templateVersionNumber', 'updateTemplateAlias_templateVersionNumber' - The version number of the template.
newUpdateTemplateAlias ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'templateId'
  Prelude.Text ->
  -- | 'aliasName'
  Prelude.Text ->
  -- | 'templateVersionNumber'
  Prelude.Natural ->
  UpdateTemplateAlias
newUpdateTemplateAlias :: Text -> Text -> Text -> Natural -> UpdateTemplateAlias
newUpdateTemplateAlias
  Text
pAwsAccountId_
  Text
pTemplateId_
  Text
pAliasName_
  Natural
pTemplateVersionNumber_ =
    UpdateTemplateAlias' :: Text -> Text -> Text -> Natural -> UpdateTemplateAlias
UpdateTemplateAlias'
      { $sel:awsAccountId:UpdateTemplateAlias' :: Text
awsAccountId = Text
pAwsAccountId_,
        $sel:templateId:UpdateTemplateAlias' :: Text
templateId = Text
pTemplateId_,
        $sel:aliasName:UpdateTemplateAlias' :: Text
aliasName = Text
pAliasName_,
        $sel:templateVersionNumber:UpdateTemplateAlias' :: Natural
templateVersionNumber = Natural
pTemplateVersionNumber_
      }

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

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

-- | The alias of the template that you want to update. If you name a
-- specific alias, you update 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.
updateTemplateAlias_aliasName :: Lens.Lens' UpdateTemplateAlias Prelude.Text
updateTemplateAlias_aliasName :: (Text -> f Text) -> UpdateTemplateAlias -> f UpdateTemplateAlias
updateTemplateAlias_aliasName = (UpdateTemplateAlias -> Text)
-> (UpdateTemplateAlias -> Text -> UpdateTemplateAlias)
-> Lens UpdateTemplateAlias UpdateTemplateAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTemplateAlias' {Text
aliasName :: Text
$sel:aliasName:UpdateTemplateAlias' :: UpdateTemplateAlias -> Text
aliasName} -> Text
aliasName) (\s :: UpdateTemplateAlias
s@UpdateTemplateAlias' {} Text
a -> UpdateTemplateAlias
s {$sel:aliasName:UpdateTemplateAlias' :: Text
aliasName = Text
a} :: UpdateTemplateAlias)

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

instance Core.AWSRequest UpdateTemplateAlias where
  type
    AWSResponse UpdateTemplateAlias =
      UpdateTemplateAliasResponse
  request :: UpdateTemplateAlias -> Request UpdateTemplateAlias
request = Service -> UpdateTemplateAlias -> Request UpdateTemplateAlias
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateTemplateAlias
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateTemplateAlias)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateTemplateAlias))
-> Logger
-> Service
-> Proxy UpdateTemplateAlias
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateTemplateAlias)))
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 -> UpdateTemplateAliasResponse
UpdateTemplateAliasResponse'
            (Maybe Text
 -> Maybe TemplateAlias -> Int -> UpdateTemplateAliasResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe TemplateAlias -> Int -> UpdateTemplateAliasResponse)
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 -> UpdateTemplateAliasResponse)
-> Either String (Maybe TemplateAlias)
-> Either String (Int -> UpdateTemplateAliasResponse)
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 -> UpdateTemplateAliasResponse)
-> Either String Int -> Either String UpdateTemplateAliasResponse
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 UpdateTemplateAlias

instance Prelude.NFData UpdateTemplateAlias

instance Core.ToHeaders UpdateTemplateAlias where
  toHeaders :: UpdateTemplateAlias -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateTemplateAlias -> 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 UpdateTemplateAlias where
  toJSON :: UpdateTemplateAlias -> Value
toJSON UpdateTemplateAlias' {Natural
Text
templateVersionNumber :: Natural
aliasName :: Text
templateId :: Text
awsAccountId :: Text
$sel:templateVersionNumber:UpdateTemplateAlias' :: UpdateTemplateAlias -> Natural
$sel:aliasName:UpdateTemplateAlias' :: UpdateTemplateAlias -> Text
$sel:templateId:UpdateTemplateAlias' :: UpdateTemplateAlias -> Text
$sel:awsAccountId:UpdateTemplateAlias' :: UpdateTemplateAlias -> 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 UpdateTemplateAlias where
  toPath :: UpdateTemplateAlias -> ByteString
toPath UpdateTemplateAlias' {Natural
Text
templateVersionNumber :: Natural
aliasName :: Text
templateId :: Text
awsAccountId :: Text
$sel:templateVersionNumber:UpdateTemplateAlias' :: UpdateTemplateAlias -> Natural
$sel:aliasName:UpdateTemplateAlias' :: UpdateTemplateAlias -> Text
$sel:templateId:UpdateTemplateAlias' :: UpdateTemplateAlias -> Text
$sel:awsAccountId:UpdateTemplateAlias' :: UpdateTemplateAlias -> 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 UpdateTemplateAlias where
  toQuery :: UpdateTemplateAlias -> QueryString
toQuery = QueryString -> UpdateTemplateAlias -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

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

-- |
-- Create a value of 'UpdateTemplateAliasResponse' 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', 'updateTemplateAliasResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'templateAlias', 'updateTemplateAliasResponse_templateAlias' - The template alias.
--
-- 'status', 'updateTemplateAliasResponse_status' - The HTTP status of the request.
newUpdateTemplateAliasResponse ::
  -- | 'status'
  Prelude.Int ->
  UpdateTemplateAliasResponse
newUpdateTemplateAliasResponse :: Int -> UpdateTemplateAliasResponse
newUpdateTemplateAliasResponse Int
pStatus_ =
  UpdateTemplateAliasResponse' :: Maybe Text
-> Maybe TemplateAlias -> Int -> UpdateTemplateAliasResponse
UpdateTemplateAliasResponse'
    { $sel:requestId:UpdateTemplateAliasResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateAlias:UpdateTemplateAliasResponse' :: Maybe TemplateAlias
templateAlias = Maybe TemplateAlias
forall a. Maybe a
Prelude.Nothing,
      $sel:status:UpdateTemplateAliasResponse' :: Int
status = Int
pStatus_
    }

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

-- | The template alias.
updateTemplateAliasResponse_templateAlias :: Lens.Lens' UpdateTemplateAliasResponse (Prelude.Maybe TemplateAlias)
updateTemplateAliasResponse_templateAlias :: (Maybe TemplateAlias -> f (Maybe TemplateAlias))
-> UpdateTemplateAliasResponse -> f UpdateTemplateAliasResponse
updateTemplateAliasResponse_templateAlias = (UpdateTemplateAliasResponse -> Maybe TemplateAlias)
-> (UpdateTemplateAliasResponse
    -> Maybe TemplateAlias -> UpdateTemplateAliasResponse)
-> Lens
     UpdateTemplateAliasResponse
     UpdateTemplateAliasResponse
     (Maybe TemplateAlias)
     (Maybe TemplateAlias)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTemplateAliasResponse' {Maybe TemplateAlias
templateAlias :: Maybe TemplateAlias
$sel:templateAlias:UpdateTemplateAliasResponse' :: UpdateTemplateAliasResponse -> Maybe TemplateAlias
templateAlias} -> Maybe TemplateAlias
templateAlias) (\s :: UpdateTemplateAliasResponse
s@UpdateTemplateAliasResponse' {} Maybe TemplateAlias
a -> UpdateTemplateAliasResponse
s {$sel:templateAlias:UpdateTemplateAliasResponse' :: Maybe TemplateAlias
templateAlias = Maybe TemplateAlias
a} :: UpdateTemplateAliasResponse)

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

instance Prelude.NFData UpdateTemplateAliasResponse