{-# 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.UpdateApprovalRuleTemplateContent
-- 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 content of an approval rule template. You can change the
-- number of required approvals, the membership of the approval rule, and
-- whether an approval pool is defined.
module Amazonka.CodeCommit.UpdateApprovalRuleTemplateContent
  ( -- * Creating a Request
    UpdateApprovalRuleTemplateContent (..),
    newUpdateApprovalRuleTemplateContent,

    -- * Request Lenses
    updateApprovalRuleTemplateContent_existingRuleContentSha256,
    updateApprovalRuleTemplateContent_approvalRuleTemplateName,
    updateApprovalRuleTemplateContent_newRuleContent,

    -- * Destructuring the Response
    UpdateApprovalRuleTemplateContentResponse (..),
    newUpdateApprovalRuleTemplateContentResponse,

    -- * Response Lenses
    updateApprovalRuleTemplateContentResponse_httpStatus,
    updateApprovalRuleTemplateContentResponse_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:/ 'newUpdateApprovalRuleTemplateContent' smart constructor.
data UpdateApprovalRuleTemplateContent = UpdateApprovalRuleTemplateContent'
  { -- | The SHA-256 hash signature for the content of the approval rule. You can
    -- retrieve this information by using GetPullRequest.
    UpdateApprovalRuleTemplateContent -> Maybe Text
existingRuleContentSha256 :: Prelude.Maybe Prelude.Text,
    -- | The name of the approval rule template where you want to update the
    -- content of the rule.
    UpdateApprovalRuleTemplateContent -> Text
approvalRuleTemplateName :: Prelude.Text,
    -- | The content that replaces the existing content of the rule. Content
    -- statements must be complete. You cannot provide only the changes.
    UpdateApprovalRuleTemplateContent -> Text
newRuleContent' :: Prelude.Text
  }
  deriving (UpdateApprovalRuleTemplateContent
-> UpdateApprovalRuleTemplateContent -> Bool
(UpdateApprovalRuleTemplateContent
 -> UpdateApprovalRuleTemplateContent -> Bool)
-> (UpdateApprovalRuleTemplateContent
    -> UpdateApprovalRuleTemplateContent -> Bool)
-> Eq UpdateApprovalRuleTemplateContent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApprovalRuleTemplateContent
-> UpdateApprovalRuleTemplateContent -> Bool
$c/= :: UpdateApprovalRuleTemplateContent
-> UpdateApprovalRuleTemplateContent -> Bool
== :: UpdateApprovalRuleTemplateContent
-> UpdateApprovalRuleTemplateContent -> Bool
$c== :: UpdateApprovalRuleTemplateContent
-> UpdateApprovalRuleTemplateContent -> Bool
Prelude.Eq, ReadPrec [UpdateApprovalRuleTemplateContent]
ReadPrec UpdateApprovalRuleTemplateContent
Int -> ReadS UpdateApprovalRuleTemplateContent
ReadS [UpdateApprovalRuleTemplateContent]
(Int -> ReadS UpdateApprovalRuleTemplateContent)
-> ReadS [UpdateApprovalRuleTemplateContent]
-> ReadPrec UpdateApprovalRuleTemplateContent
-> ReadPrec [UpdateApprovalRuleTemplateContent]
-> Read UpdateApprovalRuleTemplateContent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApprovalRuleTemplateContent]
$creadListPrec :: ReadPrec [UpdateApprovalRuleTemplateContent]
readPrec :: ReadPrec UpdateApprovalRuleTemplateContent
$creadPrec :: ReadPrec UpdateApprovalRuleTemplateContent
readList :: ReadS [UpdateApprovalRuleTemplateContent]
$creadList :: ReadS [UpdateApprovalRuleTemplateContent]
readsPrec :: Int -> ReadS UpdateApprovalRuleTemplateContent
$creadsPrec :: Int -> ReadS UpdateApprovalRuleTemplateContent
Prelude.Read, Int -> UpdateApprovalRuleTemplateContent -> ShowS
[UpdateApprovalRuleTemplateContent] -> ShowS
UpdateApprovalRuleTemplateContent -> String
(Int -> UpdateApprovalRuleTemplateContent -> ShowS)
-> (UpdateApprovalRuleTemplateContent -> String)
-> ([UpdateApprovalRuleTemplateContent] -> ShowS)
-> Show UpdateApprovalRuleTemplateContent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApprovalRuleTemplateContent] -> ShowS
$cshowList :: [UpdateApprovalRuleTemplateContent] -> ShowS
show :: UpdateApprovalRuleTemplateContent -> String
$cshow :: UpdateApprovalRuleTemplateContent -> String
showsPrec :: Int -> UpdateApprovalRuleTemplateContent -> ShowS
$cshowsPrec :: Int -> UpdateApprovalRuleTemplateContent -> ShowS
Prelude.Show, (forall x.
 UpdateApprovalRuleTemplateContent
 -> Rep UpdateApprovalRuleTemplateContent x)
-> (forall x.
    Rep UpdateApprovalRuleTemplateContent x
    -> UpdateApprovalRuleTemplateContent)
-> Generic UpdateApprovalRuleTemplateContent
forall x.
Rep UpdateApprovalRuleTemplateContent x
-> UpdateApprovalRuleTemplateContent
forall x.
UpdateApprovalRuleTemplateContent
-> Rep UpdateApprovalRuleTemplateContent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateApprovalRuleTemplateContent x
-> UpdateApprovalRuleTemplateContent
$cfrom :: forall x.
UpdateApprovalRuleTemplateContent
-> Rep UpdateApprovalRuleTemplateContent x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApprovalRuleTemplateContent' 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:
--
-- 'existingRuleContentSha256', 'updateApprovalRuleTemplateContent_existingRuleContentSha256' - The SHA-256 hash signature for the content of the approval rule. You can
-- retrieve this information by using GetPullRequest.
--
-- 'approvalRuleTemplateName', 'updateApprovalRuleTemplateContent_approvalRuleTemplateName' - The name of the approval rule template where you want to update the
-- content of the rule.
--
-- 'newRuleContent'', 'updateApprovalRuleTemplateContent_newRuleContent' - The content that replaces the existing content of the rule. Content
-- statements must be complete. You cannot provide only the changes.
newUpdateApprovalRuleTemplateContent ::
  -- | 'approvalRuleTemplateName'
  Prelude.Text ->
  -- | 'newRuleContent''
  Prelude.Text ->
  UpdateApprovalRuleTemplateContent
newUpdateApprovalRuleTemplateContent :: Text -> Text -> UpdateApprovalRuleTemplateContent
newUpdateApprovalRuleTemplateContent
  Text
pApprovalRuleTemplateName_
  Text
pNewRuleContent_ =
    UpdateApprovalRuleTemplateContent' :: Maybe Text -> Text -> Text -> UpdateApprovalRuleTemplateContent
UpdateApprovalRuleTemplateContent'
      { $sel:existingRuleContentSha256:UpdateApprovalRuleTemplateContent' :: Maybe Text
existingRuleContentSha256 =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:approvalRuleTemplateName:UpdateApprovalRuleTemplateContent' :: Text
approvalRuleTemplateName =
          Text
pApprovalRuleTemplateName_,
        $sel:newRuleContent':UpdateApprovalRuleTemplateContent' :: Text
newRuleContent' = Text
pNewRuleContent_
      }

-- | The SHA-256 hash signature for the content of the approval rule. You can
-- retrieve this information by using GetPullRequest.
updateApprovalRuleTemplateContent_existingRuleContentSha256 :: Lens.Lens' UpdateApprovalRuleTemplateContent (Prelude.Maybe Prelude.Text)
updateApprovalRuleTemplateContent_existingRuleContentSha256 :: (Maybe Text -> f (Maybe Text))
-> UpdateApprovalRuleTemplateContent
-> f UpdateApprovalRuleTemplateContent
updateApprovalRuleTemplateContent_existingRuleContentSha256 = (UpdateApprovalRuleTemplateContent -> Maybe Text)
-> (UpdateApprovalRuleTemplateContent
    -> Maybe Text -> UpdateApprovalRuleTemplateContent)
-> Lens
     UpdateApprovalRuleTemplateContent
     UpdateApprovalRuleTemplateContent
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApprovalRuleTemplateContent' {Maybe Text
existingRuleContentSha256 :: Maybe Text
$sel:existingRuleContentSha256:UpdateApprovalRuleTemplateContent' :: UpdateApprovalRuleTemplateContent -> Maybe Text
existingRuleContentSha256} -> Maybe Text
existingRuleContentSha256) (\s :: UpdateApprovalRuleTemplateContent
s@UpdateApprovalRuleTemplateContent' {} Maybe Text
a -> UpdateApprovalRuleTemplateContent
s {$sel:existingRuleContentSha256:UpdateApprovalRuleTemplateContent' :: Maybe Text
existingRuleContentSha256 = Maybe Text
a} :: UpdateApprovalRuleTemplateContent)

-- | The name of the approval rule template where you want to update the
-- content of the rule.
updateApprovalRuleTemplateContent_approvalRuleTemplateName :: Lens.Lens' UpdateApprovalRuleTemplateContent Prelude.Text
updateApprovalRuleTemplateContent_approvalRuleTemplateName :: (Text -> f Text)
-> UpdateApprovalRuleTemplateContent
-> f UpdateApprovalRuleTemplateContent
updateApprovalRuleTemplateContent_approvalRuleTemplateName = (UpdateApprovalRuleTemplateContent -> Text)
-> (UpdateApprovalRuleTemplateContent
    -> Text -> UpdateApprovalRuleTemplateContent)
-> Lens
     UpdateApprovalRuleTemplateContent
     UpdateApprovalRuleTemplateContent
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApprovalRuleTemplateContent' {Text
approvalRuleTemplateName :: Text
$sel:approvalRuleTemplateName:UpdateApprovalRuleTemplateContent' :: UpdateApprovalRuleTemplateContent -> Text
approvalRuleTemplateName} -> Text
approvalRuleTemplateName) (\s :: UpdateApprovalRuleTemplateContent
s@UpdateApprovalRuleTemplateContent' {} Text
a -> UpdateApprovalRuleTemplateContent
s {$sel:approvalRuleTemplateName:UpdateApprovalRuleTemplateContent' :: Text
approvalRuleTemplateName = Text
a} :: UpdateApprovalRuleTemplateContent)

-- | The content that replaces the existing content of the rule. Content
-- statements must be complete. You cannot provide only the changes.
updateApprovalRuleTemplateContent_newRuleContent :: Lens.Lens' UpdateApprovalRuleTemplateContent Prelude.Text
updateApprovalRuleTemplateContent_newRuleContent :: (Text -> f Text)
-> UpdateApprovalRuleTemplateContent
-> f UpdateApprovalRuleTemplateContent
updateApprovalRuleTemplateContent_newRuleContent = (UpdateApprovalRuleTemplateContent -> Text)
-> (UpdateApprovalRuleTemplateContent
    -> Text -> UpdateApprovalRuleTemplateContent)
-> Lens
     UpdateApprovalRuleTemplateContent
     UpdateApprovalRuleTemplateContent
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApprovalRuleTemplateContent' {Text
newRuleContent' :: Text
$sel:newRuleContent':UpdateApprovalRuleTemplateContent' :: UpdateApprovalRuleTemplateContent -> Text
newRuleContent'} -> Text
newRuleContent') (\s :: UpdateApprovalRuleTemplateContent
s@UpdateApprovalRuleTemplateContent' {} Text
a -> UpdateApprovalRuleTemplateContent
s {$sel:newRuleContent':UpdateApprovalRuleTemplateContent' :: Text
newRuleContent' = Text
a} :: UpdateApprovalRuleTemplateContent)

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

instance
  Prelude.NFData
    UpdateApprovalRuleTemplateContent

instance
  Core.ToHeaders
    UpdateApprovalRuleTemplateContent
  where
  toHeaders :: UpdateApprovalRuleTemplateContent -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> UpdateApprovalRuleTemplateContent -> 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.UpdateApprovalRuleTemplateContent" ::
                          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
    UpdateApprovalRuleTemplateContent
  where
  toJSON :: UpdateApprovalRuleTemplateContent -> Value
toJSON UpdateApprovalRuleTemplateContent' {Maybe Text
Text
newRuleContent' :: Text
approvalRuleTemplateName :: Text
existingRuleContentSha256 :: Maybe Text
$sel:newRuleContent':UpdateApprovalRuleTemplateContent' :: UpdateApprovalRuleTemplateContent -> Text
$sel:approvalRuleTemplateName:UpdateApprovalRuleTemplateContent' :: UpdateApprovalRuleTemplateContent -> Text
$sel:existingRuleContentSha256:UpdateApprovalRuleTemplateContent' :: UpdateApprovalRuleTemplateContent -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"existingRuleContentSha256" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
existingRuleContentSha256,
            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
"newRuleContent" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
newRuleContent')
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateApprovalRuleTemplateContentResponse' 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', 'updateApprovalRuleTemplateContentResponse_httpStatus' - The response's http status code.
--
-- 'approvalRuleTemplate', 'updateApprovalRuleTemplateContentResponse_approvalRuleTemplate' - Undocumented member.
newUpdateApprovalRuleTemplateContentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'approvalRuleTemplate'
  ApprovalRuleTemplate ->
  UpdateApprovalRuleTemplateContentResponse
newUpdateApprovalRuleTemplateContentResponse :: Int
-> ApprovalRuleTemplate
-> UpdateApprovalRuleTemplateContentResponse
newUpdateApprovalRuleTemplateContentResponse
  Int
pHttpStatus_
  ApprovalRuleTemplate
pApprovalRuleTemplate_ =
    UpdateApprovalRuleTemplateContentResponse' :: Int
-> ApprovalRuleTemplate
-> UpdateApprovalRuleTemplateContentResponse
UpdateApprovalRuleTemplateContentResponse'
      { $sel:httpStatus:UpdateApprovalRuleTemplateContentResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:approvalRuleTemplate:UpdateApprovalRuleTemplateContentResponse' :: ApprovalRuleTemplate
approvalRuleTemplate =
          ApprovalRuleTemplate
pApprovalRuleTemplate_
      }

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

-- | Undocumented member.
updateApprovalRuleTemplateContentResponse_approvalRuleTemplate :: Lens.Lens' UpdateApprovalRuleTemplateContentResponse ApprovalRuleTemplate
updateApprovalRuleTemplateContentResponse_approvalRuleTemplate :: (ApprovalRuleTemplate -> f ApprovalRuleTemplate)
-> UpdateApprovalRuleTemplateContentResponse
-> f UpdateApprovalRuleTemplateContentResponse
updateApprovalRuleTemplateContentResponse_approvalRuleTemplate = (UpdateApprovalRuleTemplateContentResponse -> ApprovalRuleTemplate)
-> (UpdateApprovalRuleTemplateContentResponse
    -> ApprovalRuleTemplate
    -> UpdateApprovalRuleTemplateContentResponse)
-> Lens
     UpdateApprovalRuleTemplateContentResponse
     UpdateApprovalRuleTemplateContentResponse
     ApprovalRuleTemplate
     ApprovalRuleTemplate
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApprovalRuleTemplateContentResponse' {ApprovalRuleTemplate
approvalRuleTemplate :: ApprovalRuleTemplate
$sel:approvalRuleTemplate:UpdateApprovalRuleTemplateContentResponse' :: UpdateApprovalRuleTemplateContentResponse -> ApprovalRuleTemplate
approvalRuleTemplate} -> ApprovalRuleTemplate
approvalRuleTemplate) (\s :: UpdateApprovalRuleTemplateContentResponse
s@UpdateApprovalRuleTemplateContentResponse' {} ApprovalRuleTemplate
a -> UpdateApprovalRuleTemplateContentResponse
s {$sel:approvalRuleTemplate:UpdateApprovalRuleTemplateContentResponse' :: ApprovalRuleTemplate
approvalRuleTemplate = ApprovalRuleTemplate
a} :: UpdateApprovalRuleTemplateContentResponse)

instance
  Prelude.NFData
    UpdateApprovalRuleTemplateContentResponse