{-# 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.UpdateApprovalRuleTemplateDescription
-- 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 description for a specified approval rule template.
module Amazonka.CodeCommit.UpdateApprovalRuleTemplateDescription
  ( -- * Creating a Request
    UpdateApprovalRuleTemplateDescription (..),
    newUpdateApprovalRuleTemplateDescription,

    -- * Request Lenses
    updateApprovalRuleTemplateDescription_approvalRuleTemplateName,
    updateApprovalRuleTemplateDescription_approvalRuleTemplateDescription,

    -- * Destructuring the Response
    UpdateApprovalRuleTemplateDescriptionResponse (..),
    newUpdateApprovalRuleTemplateDescriptionResponse,

    -- * Response Lenses
    updateApprovalRuleTemplateDescriptionResponse_httpStatus,
    updateApprovalRuleTemplateDescriptionResponse_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:/ 'newUpdateApprovalRuleTemplateDescription' smart constructor.
data UpdateApprovalRuleTemplateDescription = UpdateApprovalRuleTemplateDescription'
  { -- | The name of the template for which you want to update the description.
    UpdateApprovalRuleTemplateDescription -> Text
approvalRuleTemplateName :: Prelude.Text,
    -- | The updated description of the approval rule template.
    UpdateApprovalRuleTemplateDescription -> Text
approvalRuleTemplateDescription :: Prelude.Text
  }
  deriving (UpdateApprovalRuleTemplateDescription
-> UpdateApprovalRuleTemplateDescription -> Bool
(UpdateApprovalRuleTemplateDescription
 -> UpdateApprovalRuleTemplateDescription -> Bool)
-> (UpdateApprovalRuleTemplateDescription
    -> UpdateApprovalRuleTemplateDescription -> Bool)
-> Eq UpdateApprovalRuleTemplateDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApprovalRuleTemplateDescription
-> UpdateApprovalRuleTemplateDescription -> Bool
$c/= :: UpdateApprovalRuleTemplateDescription
-> UpdateApprovalRuleTemplateDescription -> Bool
== :: UpdateApprovalRuleTemplateDescription
-> UpdateApprovalRuleTemplateDescription -> Bool
$c== :: UpdateApprovalRuleTemplateDescription
-> UpdateApprovalRuleTemplateDescription -> Bool
Prelude.Eq, ReadPrec [UpdateApprovalRuleTemplateDescription]
ReadPrec UpdateApprovalRuleTemplateDescription
Int -> ReadS UpdateApprovalRuleTemplateDescription
ReadS [UpdateApprovalRuleTemplateDescription]
(Int -> ReadS UpdateApprovalRuleTemplateDescription)
-> ReadS [UpdateApprovalRuleTemplateDescription]
-> ReadPrec UpdateApprovalRuleTemplateDescription
-> ReadPrec [UpdateApprovalRuleTemplateDescription]
-> Read UpdateApprovalRuleTemplateDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApprovalRuleTemplateDescription]
$creadListPrec :: ReadPrec [UpdateApprovalRuleTemplateDescription]
readPrec :: ReadPrec UpdateApprovalRuleTemplateDescription
$creadPrec :: ReadPrec UpdateApprovalRuleTemplateDescription
readList :: ReadS [UpdateApprovalRuleTemplateDescription]
$creadList :: ReadS [UpdateApprovalRuleTemplateDescription]
readsPrec :: Int -> ReadS UpdateApprovalRuleTemplateDescription
$creadsPrec :: Int -> ReadS UpdateApprovalRuleTemplateDescription
Prelude.Read, Int -> UpdateApprovalRuleTemplateDescription -> ShowS
[UpdateApprovalRuleTemplateDescription] -> ShowS
UpdateApprovalRuleTemplateDescription -> String
(Int -> UpdateApprovalRuleTemplateDescription -> ShowS)
-> (UpdateApprovalRuleTemplateDescription -> String)
-> ([UpdateApprovalRuleTemplateDescription] -> ShowS)
-> Show UpdateApprovalRuleTemplateDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApprovalRuleTemplateDescription] -> ShowS
$cshowList :: [UpdateApprovalRuleTemplateDescription] -> ShowS
show :: UpdateApprovalRuleTemplateDescription -> String
$cshow :: UpdateApprovalRuleTemplateDescription -> String
showsPrec :: Int -> UpdateApprovalRuleTemplateDescription -> ShowS
$cshowsPrec :: Int -> UpdateApprovalRuleTemplateDescription -> ShowS
Prelude.Show, (forall x.
 UpdateApprovalRuleTemplateDescription
 -> Rep UpdateApprovalRuleTemplateDescription x)
-> (forall x.
    Rep UpdateApprovalRuleTemplateDescription x
    -> UpdateApprovalRuleTemplateDescription)
-> Generic UpdateApprovalRuleTemplateDescription
forall x.
Rep UpdateApprovalRuleTemplateDescription x
-> UpdateApprovalRuleTemplateDescription
forall x.
UpdateApprovalRuleTemplateDescription
-> Rep UpdateApprovalRuleTemplateDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateApprovalRuleTemplateDescription x
-> UpdateApprovalRuleTemplateDescription
$cfrom :: forall x.
UpdateApprovalRuleTemplateDescription
-> Rep UpdateApprovalRuleTemplateDescription x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApprovalRuleTemplateDescription' 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:
--
-- 'approvalRuleTemplateName', 'updateApprovalRuleTemplateDescription_approvalRuleTemplateName' - The name of the template for which you want to update the description.
--
-- 'approvalRuleTemplateDescription', 'updateApprovalRuleTemplateDescription_approvalRuleTemplateDescription' - The updated description of the approval rule template.
newUpdateApprovalRuleTemplateDescription ::
  -- | 'approvalRuleTemplateName'
  Prelude.Text ->
  -- | 'approvalRuleTemplateDescription'
  Prelude.Text ->
  UpdateApprovalRuleTemplateDescription
newUpdateApprovalRuleTemplateDescription :: Text -> Text -> UpdateApprovalRuleTemplateDescription
newUpdateApprovalRuleTemplateDescription
  Text
pApprovalRuleTemplateName_
  Text
pApprovalRuleTemplateDescription_ =
    UpdateApprovalRuleTemplateDescription' :: Text -> Text -> UpdateApprovalRuleTemplateDescription
UpdateApprovalRuleTemplateDescription'
      { $sel:approvalRuleTemplateName:UpdateApprovalRuleTemplateDescription' :: Text
approvalRuleTemplateName =
          Text
pApprovalRuleTemplateName_,
        $sel:approvalRuleTemplateDescription:UpdateApprovalRuleTemplateDescription' :: Text
approvalRuleTemplateDescription =
          Text
pApprovalRuleTemplateDescription_
      }

-- | The name of the template for which you want to update the description.
updateApprovalRuleTemplateDescription_approvalRuleTemplateName :: Lens.Lens' UpdateApprovalRuleTemplateDescription Prelude.Text
updateApprovalRuleTemplateDescription_approvalRuleTemplateName :: (Text -> f Text)
-> UpdateApprovalRuleTemplateDescription
-> f UpdateApprovalRuleTemplateDescription
updateApprovalRuleTemplateDescription_approvalRuleTemplateName = (UpdateApprovalRuleTemplateDescription -> Text)
-> (UpdateApprovalRuleTemplateDescription
    -> Text -> UpdateApprovalRuleTemplateDescription)
-> Lens
     UpdateApprovalRuleTemplateDescription
     UpdateApprovalRuleTemplateDescription
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApprovalRuleTemplateDescription' {Text
approvalRuleTemplateName :: Text
$sel:approvalRuleTemplateName:UpdateApprovalRuleTemplateDescription' :: UpdateApprovalRuleTemplateDescription -> Text
approvalRuleTemplateName} -> Text
approvalRuleTemplateName) (\s :: UpdateApprovalRuleTemplateDescription
s@UpdateApprovalRuleTemplateDescription' {} Text
a -> UpdateApprovalRuleTemplateDescription
s {$sel:approvalRuleTemplateName:UpdateApprovalRuleTemplateDescription' :: Text
approvalRuleTemplateName = Text
a} :: UpdateApprovalRuleTemplateDescription)

-- | The updated description of the approval rule template.
updateApprovalRuleTemplateDescription_approvalRuleTemplateDescription :: Lens.Lens' UpdateApprovalRuleTemplateDescription Prelude.Text
updateApprovalRuleTemplateDescription_approvalRuleTemplateDescription :: (Text -> f Text)
-> UpdateApprovalRuleTemplateDescription
-> f UpdateApprovalRuleTemplateDescription
updateApprovalRuleTemplateDescription_approvalRuleTemplateDescription = (UpdateApprovalRuleTemplateDescription -> Text)
-> (UpdateApprovalRuleTemplateDescription
    -> Text -> UpdateApprovalRuleTemplateDescription)
-> Lens
     UpdateApprovalRuleTemplateDescription
     UpdateApprovalRuleTemplateDescription
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApprovalRuleTemplateDescription' {Text
approvalRuleTemplateDescription :: Text
$sel:approvalRuleTemplateDescription:UpdateApprovalRuleTemplateDescription' :: UpdateApprovalRuleTemplateDescription -> Text
approvalRuleTemplateDescription} -> Text
approvalRuleTemplateDescription) (\s :: UpdateApprovalRuleTemplateDescription
s@UpdateApprovalRuleTemplateDescription' {} Text
a -> UpdateApprovalRuleTemplateDescription
s {$sel:approvalRuleTemplateDescription:UpdateApprovalRuleTemplateDescription' :: Text
approvalRuleTemplateDescription = Text
a} :: UpdateApprovalRuleTemplateDescription)

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

instance
  Prelude.NFData
    UpdateApprovalRuleTemplateDescription

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

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

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

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

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

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

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

instance
  Prelude.NFData
    UpdateApprovalRuleTemplateDescriptionResponse