{-# 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.CodeCommit.UpdateApprovalRuleTemplateName
-- 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 name of a specified approval rule template.
module Amazonka.CodeCommit.UpdateApprovalRuleTemplateName
  ( -- * Creating a Request
    UpdateApprovalRuleTemplateName (..),
    newUpdateApprovalRuleTemplateName,

    -- * Request Lenses
    updateApprovalRuleTemplateName_oldApprovalRuleTemplateName,
    updateApprovalRuleTemplateName_newApprovalRuleTemplateName,

    -- * Destructuring the Response
    UpdateApprovalRuleTemplateNameResponse (..),
    newUpdateApprovalRuleTemplateNameResponse,

    -- * Response Lenses
    updateApprovalRuleTemplateNameResponse_httpStatus,
    updateApprovalRuleTemplateNameResponse_approvalRuleTemplate,
  )
where

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

-- | /See:/ 'newUpdateApprovalRuleTemplateName' smart constructor.
data UpdateApprovalRuleTemplateName = UpdateApprovalRuleTemplateName'
  { -- | The current name of the approval rule template.
    UpdateApprovalRuleTemplateName -> Text
oldApprovalRuleTemplateName :: Prelude.Text,
    -- | The new name you want to apply to the approval rule template.
    UpdateApprovalRuleTemplateName -> Text
newApprovalRuleTemplateName' :: Prelude.Text
  }
  deriving (UpdateApprovalRuleTemplateName
-> UpdateApprovalRuleTemplateName -> Bool
(UpdateApprovalRuleTemplateName
 -> UpdateApprovalRuleTemplateName -> Bool)
-> (UpdateApprovalRuleTemplateName
    -> UpdateApprovalRuleTemplateName -> Bool)
-> Eq UpdateApprovalRuleTemplateName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApprovalRuleTemplateName
-> UpdateApprovalRuleTemplateName -> Bool
$c/= :: UpdateApprovalRuleTemplateName
-> UpdateApprovalRuleTemplateName -> Bool
== :: UpdateApprovalRuleTemplateName
-> UpdateApprovalRuleTemplateName -> Bool
$c== :: UpdateApprovalRuleTemplateName
-> UpdateApprovalRuleTemplateName -> Bool
Prelude.Eq, ReadPrec [UpdateApprovalRuleTemplateName]
ReadPrec UpdateApprovalRuleTemplateName
Int -> ReadS UpdateApprovalRuleTemplateName
ReadS [UpdateApprovalRuleTemplateName]
(Int -> ReadS UpdateApprovalRuleTemplateName)
-> ReadS [UpdateApprovalRuleTemplateName]
-> ReadPrec UpdateApprovalRuleTemplateName
-> ReadPrec [UpdateApprovalRuleTemplateName]
-> Read UpdateApprovalRuleTemplateName
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApprovalRuleTemplateName]
$creadListPrec :: ReadPrec [UpdateApprovalRuleTemplateName]
readPrec :: ReadPrec UpdateApprovalRuleTemplateName
$creadPrec :: ReadPrec UpdateApprovalRuleTemplateName
readList :: ReadS [UpdateApprovalRuleTemplateName]
$creadList :: ReadS [UpdateApprovalRuleTemplateName]
readsPrec :: Int -> ReadS UpdateApprovalRuleTemplateName
$creadsPrec :: Int -> ReadS UpdateApprovalRuleTemplateName
Prelude.Read, Int -> UpdateApprovalRuleTemplateName -> ShowS
[UpdateApprovalRuleTemplateName] -> ShowS
UpdateApprovalRuleTemplateName -> String
(Int -> UpdateApprovalRuleTemplateName -> ShowS)
-> (UpdateApprovalRuleTemplateName -> String)
-> ([UpdateApprovalRuleTemplateName] -> ShowS)
-> Show UpdateApprovalRuleTemplateName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApprovalRuleTemplateName] -> ShowS
$cshowList :: [UpdateApprovalRuleTemplateName] -> ShowS
show :: UpdateApprovalRuleTemplateName -> String
$cshow :: UpdateApprovalRuleTemplateName -> String
showsPrec :: Int -> UpdateApprovalRuleTemplateName -> ShowS
$cshowsPrec :: Int -> UpdateApprovalRuleTemplateName -> ShowS
Prelude.Show, (forall x.
 UpdateApprovalRuleTemplateName
 -> Rep UpdateApprovalRuleTemplateName x)
-> (forall x.
    Rep UpdateApprovalRuleTemplateName x
    -> UpdateApprovalRuleTemplateName)
-> Generic UpdateApprovalRuleTemplateName
forall x.
Rep UpdateApprovalRuleTemplateName x
-> UpdateApprovalRuleTemplateName
forall x.
UpdateApprovalRuleTemplateName
-> Rep UpdateApprovalRuleTemplateName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateApprovalRuleTemplateName x
-> UpdateApprovalRuleTemplateName
$cfrom :: forall x.
UpdateApprovalRuleTemplateName
-> Rep UpdateApprovalRuleTemplateName x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApprovalRuleTemplateName' 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:
--
-- 'oldApprovalRuleTemplateName', 'updateApprovalRuleTemplateName_oldApprovalRuleTemplateName' - The current name of the approval rule template.
--
-- 'newApprovalRuleTemplateName'', 'updateApprovalRuleTemplateName_newApprovalRuleTemplateName' - The new name you want to apply to the approval rule template.
newUpdateApprovalRuleTemplateName ::
  -- | 'oldApprovalRuleTemplateName'
  Prelude.Text ->
  -- | 'newApprovalRuleTemplateName''
  Prelude.Text ->
  UpdateApprovalRuleTemplateName
newUpdateApprovalRuleTemplateName :: Text -> Text -> UpdateApprovalRuleTemplateName
newUpdateApprovalRuleTemplateName
  Text
pOldApprovalRuleTemplateName_
  Text
pNewApprovalRuleTemplateName_ =
    UpdateApprovalRuleTemplateName' :: Text -> Text -> UpdateApprovalRuleTemplateName
UpdateApprovalRuleTemplateName'
      { $sel:oldApprovalRuleTemplateName:UpdateApprovalRuleTemplateName' :: Text
oldApprovalRuleTemplateName =
          Text
pOldApprovalRuleTemplateName_,
        $sel:newApprovalRuleTemplateName':UpdateApprovalRuleTemplateName' :: Text
newApprovalRuleTemplateName' =
          Text
pNewApprovalRuleTemplateName_
      }

-- | The current name of the approval rule template.
updateApprovalRuleTemplateName_oldApprovalRuleTemplateName :: Lens.Lens' UpdateApprovalRuleTemplateName Prelude.Text
updateApprovalRuleTemplateName_oldApprovalRuleTemplateName :: (Text -> f Text)
-> UpdateApprovalRuleTemplateName
-> f UpdateApprovalRuleTemplateName
updateApprovalRuleTemplateName_oldApprovalRuleTemplateName = (UpdateApprovalRuleTemplateName -> Text)
-> (UpdateApprovalRuleTemplateName
    -> Text -> UpdateApprovalRuleTemplateName)
-> Lens
     UpdateApprovalRuleTemplateName
     UpdateApprovalRuleTemplateName
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApprovalRuleTemplateName' {Text
oldApprovalRuleTemplateName :: Text
$sel:oldApprovalRuleTemplateName:UpdateApprovalRuleTemplateName' :: UpdateApprovalRuleTemplateName -> Text
oldApprovalRuleTemplateName} -> Text
oldApprovalRuleTemplateName) (\s :: UpdateApprovalRuleTemplateName
s@UpdateApprovalRuleTemplateName' {} Text
a -> UpdateApprovalRuleTemplateName
s {$sel:oldApprovalRuleTemplateName:UpdateApprovalRuleTemplateName' :: Text
oldApprovalRuleTemplateName = Text
a} :: UpdateApprovalRuleTemplateName)

-- | The new name you want to apply to the approval rule template.
updateApprovalRuleTemplateName_newApprovalRuleTemplateName :: Lens.Lens' UpdateApprovalRuleTemplateName Prelude.Text
updateApprovalRuleTemplateName_newApprovalRuleTemplateName :: (Text -> f Text)
-> UpdateApprovalRuleTemplateName
-> f UpdateApprovalRuleTemplateName
updateApprovalRuleTemplateName_newApprovalRuleTemplateName = (UpdateApprovalRuleTemplateName -> Text)
-> (UpdateApprovalRuleTemplateName
    -> Text -> UpdateApprovalRuleTemplateName)
-> Lens
     UpdateApprovalRuleTemplateName
     UpdateApprovalRuleTemplateName
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApprovalRuleTemplateName' {Text
newApprovalRuleTemplateName' :: Text
$sel:newApprovalRuleTemplateName':UpdateApprovalRuleTemplateName' :: UpdateApprovalRuleTemplateName -> Text
newApprovalRuleTemplateName'} -> Text
newApprovalRuleTemplateName') (\s :: UpdateApprovalRuleTemplateName
s@UpdateApprovalRuleTemplateName' {} Text
a -> UpdateApprovalRuleTemplateName
s {$sel:newApprovalRuleTemplateName':UpdateApprovalRuleTemplateName' :: Text
newApprovalRuleTemplateName' = Text
a} :: UpdateApprovalRuleTemplateName)

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

instance
  Prelude.Hashable
    UpdateApprovalRuleTemplateName

instance
  Prelude.NFData
    UpdateApprovalRuleTemplateName

instance
  Core.ToHeaders
    UpdateApprovalRuleTemplateName
  where
  toHeaders :: UpdateApprovalRuleTemplateName -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> UpdateApprovalRuleTemplateName -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CodeCommit_20150413.UpdateApprovalRuleTemplateName" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateApprovalRuleTemplateName where
  toJSON :: UpdateApprovalRuleTemplateName -> Value
toJSON UpdateApprovalRuleTemplateName' {Text
newApprovalRuleTemplateName' :: Text
oldApprovalRuleTemplateName :: Text
$sel:newApprovalRuleTemplateName':UpdateApprovalRuleTemplateName' :: UpdateApprovalRuleTemplateName -> Text
$sel:oldApprovalRuleTemplateName:UpdateApprovalRuleTemplateName' :: UpdateApprovalRuleTemplateName -> 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
"oldApprovalRuleTemplateName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
oldApprovalRuleTemplateName
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"newApprovalRuleTemplateName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
newApprovalRuleTemplateName'
              )
          ]
      )

instance Core.ToPath UpdateApprovalRuleTemplateName where
  toPath :: UpdateApprovalRuleTemplateName -> ByteString
toPath = ByteString -> UpdateApprovalRuleTemplateName -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newUpdateApprovalRuleTemplateNameResponse' smart constructor.
data UpdateApprovalRuleTemplateNameResponse = UpdateApprovalRuleTemplateNameResponse'
  { -- | The response's http status code.
    UpdateApprovalRuleTemplateNameResponse -> Int
httpStatus :: Prelude.Int,
    -- | The structure and content of the updated approval rule template.
    UpdateApprovalRuleTemplateNameResponse -> ApprovalRuleTemplate
approvalRuleTemplate :: ApprovalRuleTemplate
  }
  deriving (UpdateApprovalRuleTemplateNameResponse
-> UpdateApprovalRuleTemplateNameResponse -> Bool
(UpdateApprovalRuleTemplateNameResponse
 -> UpdateApprovalRuleTemplateNameResponse -> Bool)
-> (UpdateApprovalRuleTemplateNameResponse
    -> UpdateApprovalRuleTemplateNameResponse -> Bool)
-> Eq UpdateApprovalRuleTemplateNameResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApprovalRuleTemplateNameResponse
-> UpdateApprovalRuleTemplateNameResponse -> Bool
$c/= :: UpdateApprovalRuleTemplateNameResponse
-> UpdateApprovalRuleTemplateNameResponse -> Bool
== :: UpdateApprovalRuleTemplateNameResponse
-> UpdateApprovalRuleTemplateNameResponse -> Bool
$c== :: UpdateApprovalRuleTemplateNameResponse
-> UpdateApprovalRuleTemplateNameResponse -> Bool
Prelude.Eq, ReadPrec [UpdateApprovalRuleTemplateNameResponse]
ReadPrec UpdateApprovalRuleTemplateNameResponse
Int -> ReadS UpdateApprovalRuleTemplateNameResponse
ReadS [UpdateApprovalRuleTemplateNameResponse]
(Int -> ReadS UpdateApprovalRuleTemplateNameResponse)
-> ReadS [UpdateApprovalRuleTemplateNameResponse]
-> ReadPrec UpdateApprovalRuleTemplateNameResponse
-> ReadPrec [UpdateApprovalRuleTemplateNameResponse]
-> Read UpdateApprovalRuleTemplateNameResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApprovalRuleTemplateNameResponse]
$creadListPrec :: ReadPrec [UpdateApprovalRuleTemplateNameResponse]
readPrec :: ReadPrec UpdateApprovalRuleTemplateNameResponse
$creadPrec :: ReadPrec UpdateApprovalRuleTemplateNameResponse
readList :: ReadS [UpdateApprovalRuleTemplateNameResponse]
$creadList :: ReadS [UpdateApprovalRuleTemplateNameResponse]
readsPrec :: Int -> ReadS UpdateApprovalRuleTemplateNameResponse
$creadsPrec :: Int -> ReadS UpdateApprovalRuleTemplateNameResponse
Prelude.Read, Int -> UpdateApprovalRuleTemplateNameResponse -> ShowS
[UpdateApprovalRuleTemplateNameResponse] -> ShowS
UpdateApprovalRuleTemplateNameResponse -> String
(Int -> UpdateApprovalRuleTemplateNameResponse -> ShowS)
-> (UpdateApprovalRuleTemplateNameResponse -> String)
-> ([UpdateApprovalRuleTemplateNameResponse] -> ShowS)
-> Show UpdateApprovalRuleTemplateNameResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApprovalRuleTemplateNameResponse] -> ShowS
$cshowList :: [UpdateApprovalRuleTemplateNameResponse] -> ShowS
show :: UpdateApprovalRuleTemplateNameResponse -> String
$cshow :: UpdateApprovalRuleTemplateNameResponse -> String
showsPrec :: Int -> UpdateApprovalRuleTemplateNameResponse -> ShowS
$cshowsPrec :: Int -> UpdateApprovalRuleTemplateNameResponse -> ShowS
Prelude.Show, (forall x.
 UpdateApprovalRuleTemplateNameResponse
 -> Rep UpdateApprovalRuleTemplateNameResponse x)
-> (forall x.
    Rep UpdateApprovalRuleTemplateNameResponse x
    -> UpdateApprovalRuleTemplateNameResponse)
-> Generic UpdateApprovalRuleTemplateNameResponse
forall x.
Rep UpdateApprovalRuleTemplateNameResponse x
-> UpdateApprovalRuleTemplateNameResponse
forall x.
UpdateApprovalRuleTemplateNameResponse
-> Rep UpdateApprovalRuleTemplateNameResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateApprovalRuleTemplateNameResponse x
-> UpdateApprovalRuleTemplateNameResponse
$cfrom :: forall x.
UpdateApprovalRuleTemplateNameResponse
-> Rep UpdateApprovalRuleTemplateNameResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApprovalRuleTemplateNameResponse' 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:
--
-- 'httpStatus', 'updateApprovalRuleTemplateNameResponse_httpStatus' - The response's http status code.
--
-- 'approvalRuleTemplate', 'updateApprovalRuleTemplateNameResponse_approvalRuleTemplate' - The structure and content of the updated approval rule template.
newUpdateApprovalRuleTemplateNameResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'approvalRuleTemplate'
  ApprovalRuleTemplate ->
  UpdateApprovalRuleTemplateNameResponse
newUpdateApprovalRuleTemplateNameResponse :: Int
-> ApprovalRuleTemplate -> UpdateApprovalRuleTemplateNameResponse
newUpdateApprovalRuleTemplateNameResponse
  Int
pHttpStatus_
  ApprovalRuleTemplate
pApprovalRuleTemplate_ =
    UpdateApprovalRuleTemplateNameResponse' :: Int
-> ApprovalRuleTemplate -> UpdateApprovalRuleTemplateNameResponse
UpdateApprovalRuleTemplateNameResponse'
      { $sel:httpStatus:UpdateApprovalRuleTemplateNameResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:approvalRuleTemplate:UpdateApprovalRuleTemplateNameResponse' :: ApprovalRuleTemplate
approvalRuleTemplate =
          ApprovalRuleTemplate
pApprovalRuleTemplate_
      }

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

-- | The structure and content of the updated approval rule template.
updateApprovalRuleTemplateNameResponse_approvalRuleTemplate :: Lens.Lens' UpdateApprovalRuleTemplateNameResponse ApprovalRuleTemplate
updateApprovalRuleTemplateNameResponse_approvalRuleTemplate :: (ApprovalRuleTemplate -> f ApprovalRuleTemplate)
-> UpdateApprovalRuleTemplateNameResponse
-> f UpdateApprovalRuleTemplateNameResponse
updateApprovalRuleTemplateNameResponse_approvalRuleTemplate = (UpdateApprovalRuleTemplateNameResponse -> ApprovalRuleTemplate)
-> (UpdateApprovalRuleTemplateNameResponse
    -> ApprovalRuleTemplate -> UpdateApprovalRuleTemplateNameResponse)
-> Lens
     UpdateApprovalRuleTemplateNameResponse
     UpdateApprovalRuleTemplateNameResponse
     ApprovalRuleTemplate
     ApprovalRuleTemplate
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApprovalRuleTemplateNameResponse' {ApprovalRuleTemplate
approvalRuleTemplate :: ApprovalRuleTemplate
$sel:approvalRuleTemplate:UpdateApprovalRuleTemplateNameResponse' :: UpdateApprovalRuleTemplateNameResponse -> ApprovalRuleTemplate
approvalRuleTemplate} -> ApprovalRuleTemplate
approvalRuleTemplate) (\s :: UpdateApprovalRuleTemplateNameResponse
s@UpdateApprovalRuleTemplateNameResponse' {} ApprovalRuleTemplate
a -> UpdateApprovalRuleTemplateNameResponse
s {$sel:approvalRuleTemplate:UpdateApprovalRuleTemplateNameResponse' :: ApprovalRuleTemplate
approvalRuleTemplate = ApprovalRuleTemplate
a} :: UpdateApprovalRuleTemplateNameResponse)

instance
  Prelude.NFData
    UpdateApprovalRuleTemplateNameResponse