{-# 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.WAF.UpdateRule
-- 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)
--
-- This is __AWS WAF Classic__ documentation. For more information, see
-- <https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html AWS WAF Classic>
-- in the developer guide.
--
-- __For the latest version of AWS WAF__, use the AWS WAFV2 API and see the
-- <https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html AWS WAF Developer Guide>.
-- With the latest version, AWS WAF has a single set of endpoints for
-- regional and global use.
--
-- Inserts or deletes Predicate objects in a @Rule@. Each @Predicate@
-- object identifies a predicate, such as a ByteMatchSet or an IPSet, that
-- specifies the web requests that you want to allow, block, or count. If
-- you add more than one predicate to a @Rule@, a request must match all of
-- the specifications to be allowed, blocked, or counted. For example,
-- suppose that you add the following to a @Rule@:
--
-- -   A @ByteMatchSet@ that matches the value @BadBot@ in the @User-Agent@
--     header
--
-- -   An @IPSet@ that matches the IP address @192.0.2.44@
--
-- You then add the @Rule@ to a @WebACL@ and specify that you want to block
-- requests that satisfy the @Rule@. For a request to be blocked, the
-- @User-Agent@ header in the request must contain the value @BadBot@ /and/
-- the request must originate from the IP address 192.0.2.44.
--
-- To create and configure a @Rule@, perform the following steps:
--
-- 1.  Create and update the predicates that you want to include in the
--     @Rule@.
--
-- 2.  Create the @Rule@. See CreateRule.
--
-- 3.  Use @GetChangeToken@ to get the change token that you provide in the
--     @ChangeToken@ parameter of an UpdateRule request.
--
-- 4.  Submit an @UpdateRule@ request to add predicates to the @Rule@.
--
-- 5.  Create and update a @WebACL@ that contains the @Rule@. See
--     CreateWebACL.
--
-- If you want to replace one @ByteMatchSet@ or @IPSet@ with another, you
-- delete the existing one and add the new one.
--
-- For more information about how to use the AWS WAF API to allow or block
-- HTTP requests, see the
-- <https://docs.aws.amazon.com/waf/latest/developerguide/ AWS WAF Developer Guide>.
module Amazonka.WAF.UpdateRule
  ( -- * Creating a Request
    UpdateRule (..),
    newUpdateRule,

    -- * Request Lenses
    updateRule_ruleId,
    updateRule_changeToken,
    updateRule_updates,

    -- * Destructuring the Response
    UpdateRuleResponse (..),
    newUpdateRuleResponse,

    -- * Response Lenses
    updateRuleResponse_changeToken,
    updateRuleResponse_httpStatus,
  )
where

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
import Amazonka.WAF.Types

-- | /See:/ 'newUpdateRule' smart constructor.
data UpdateRule = UpdateRule'
  { -- | The @RuleId@ of the @Rule@ that you want to update. @RuleId@ is returned
    -- by @CreateRule@ and by ListRules.
    UpdateRule -> Text
ruleId :: Prelude.Text,
    -- | The value returned by the most recent call to GetChangeToken.
    UpdateRule -> Text
changeToken :: Prelude.Text,
    -- | An array of @RuleUpdate@ objects that you want to insert into or delete
    -- from a Rule. For more information, see the applicable data types:
    --
    -- -   RuleUpdate: Contains @Action@ and @Predicate@
    --
    -- -   Predicate: Contains @DataId@, @Negated@, and @Type@
    --
    -- -   FieldToMatch: Contains @Data@ and @Type@
    UpdateRule -> [RuleUpdate]
updates :: [RuleUpdate]
  }
  deriving (UpdateRule -> UpdateRule -> Bool
(UpdateRule -> UpdateRule -> Bool)
-> (UpdateRule -> UpdateRule -> Bool) -> Eq UpdateRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRule -> UpdateRule -> Bool
$c/= :: UpdateRule -> UpdateRule -> Bool
== :: UpdateRule -> UpdateRule -> Bool
$c== :: UpdateRule -> UpdateRule -> Bool
Prelude.Eq, ReadPrec [UpdateRule]
ReadPrec UpdateRule
Int -> ReadS UpdateRule
ReadS [UpdateRule]
(Int -> ReadS UpdateRule)
-> ReadS [UpdateRule]
-> ReadPrec UpdateRule
-> ReadPrec [UpdateRule]
-> Read UpdateRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRule]
$creadListPrec :: ReadPrec [UpdateRule]
readPrec :: ReadPrec UpdateRule
$creadPrec :: ReadPrec UpdateRule
readList :: ReadS [UpdateRule]
$creadList :: ReadS [UpdateRule]
readsPrec :: Int -> ReadS UpdateRule
$creadsPrec :: Int -> ReadS UpdateRule
Prelude.Read, Int -> UpdateRule -> ShowS
[UpdateRule] -> ShowS
UpdateRule -> String
(Int -> UpdateRule -> ShowS)
-> (UpdateRule -> String)
-> ([UpdateRule] -> ShowS)
-> Show UpdateRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRule] -> ShowS
$cshowList :: [UpdateRule] -> ShowS
show :: UpdateRule -> String
$cshow :: UpdateRule -> String
showsPrec :: Int -> UpdateRule -> ShowS
$cshowsPrec :: Int -> UpdateRule -> ShowS
Prelude.Show, (forall x. UpdateRule -> Rep UpdateRule x)
-> (forall x. Rep UpdateRule x -> UpdateRule) -> Generic UpdateRule
forall x. Rep UpdateRule x -> UpdateRule
forall x. UpdateRule -> Rep UpdateRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateRule x -> UpdateRule
$cfrom :: forall x. UpdateRule -> Rep UpdateRule x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRule' 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:
--
-- 'ruleId', 'updateRule_ruleId' - The @RuleId@ of the @Rule@ that you want to update. @RuleId@ is returned
-- by @CreateRule@ and by ListRules.
--
-- 'changeToken', 'updateRule_changeToken' - The value returned by the most recent call to GetChangeToken.
--
-- 'updates', 'updateRule_updates' - An array of @RuleUpdate@ objects that you want to insert into or delete
-- from a Rule. For more information, see the applicable data types:
--
-- -   RuleUpdate: Contains @Action@ and @Predicate@
--
-- -   Predicate: Contains @DataId@, @Negated@, and @Type@
--
-- -   FieldToMatch: Contains @Data@ and @Type@
newUpdateRule ::
  -- | 'ruleId'
  Prelude.Text ->
  -- | 'changeToken'
  Prelude.Text ->
  UpdateRule
newUpdateRule :: Text -> Text -> UpdateRule
newUpdateRule Text
pRuleId_ Text
pChangeToken_ =
  UpdateRule' :: Text -> Text -> [RuleUpdate] -> UpdateRule
UpdateRule'
    { $sel:ruleId:UpdateRule' :: Text
ruleId = Text
pRuleId_,
      $sel:changeToken:UpdateRule' :: Text
changeToken = Text
pChangeToken_,
      $sel:updates:UpdateRule' :: [RuleUpdate]
updates = [RuleUpdate]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The @RuleId@ of the @Rule@ that you want to update. @RuleId@ is returned
-- by @CreateRule@ and by ListRules.
updateRule_ruleId :: Lens.Lens' UpdateRule Prelude.Text
updateRule_ruleId :: (Text -> f Text) -> UpdateRule -> f UpdateRule
updateRule_ruleId = (UpdateRule -> Text)
-> (UpdateRule -> Text -> UpdateRule)
-> Lens UpdateRule UpdateRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRule' {Text
ruleId :: Text
$sel:ruleId:UpdateRule' :: UpdateRule -> Text
ruleId} -> Text
ruleId) (\s :: UpdateRule
s@UpdateRule' {} Text
a -> UpdateRule
s {$sel:ruleId:UpdateRule' :: Text
ruleId = Text
a} :: UpdateRule)

-- | The value returned by the most recent call to GetChangeToken.
updateRule_changeToken :: Lens.Lens' UpdateRule Prelude.Text
updateRule_changeToken :: (Text -> f Text) -> UpdateRule -> f UpdateRule
updateRule_changeToken = (UpdateRule -> Text)
-> (UpdateRule -> Text -> UpdateRule)
-> Lens UpdateRule UpdateRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRule' {Text
changeToken :: Text
$sel:changeToken:UpdateRule' :: UpdateRule -> Text
changeToken} -> Text
changeToken) (\s :: UpdateRule
s@UpdateRule' {} Text
a -> UpdateRule
s {$sel:changeToken:UpdateRule' :: Text
changeToken = Text
a} :: UpdateRule)

-- | An array of @RuleUpdate@ objects that you want to insert into or delete
-- from a Rule. For more information, see the applicable data types:
--
-- -   RuleUpdate: Contains @Action@ and @Predicate@
--
-- -   Predicate: Contains @DataId@, @Negated@, and @Type@
--
-- -   FieldToMatch: Contains @Data@ and @Type@
updateRule_updates :: Lens.Lens' UpdateRule [RuleUpdate]
updateRule_updates :: ([RuleUpdate] -> f [RuleUpdate]) -> UpdateRule -> f UpdateRule
updateRule_updates = (UpdateRule -> [RuleUpdate])
-> (UpdateRule -> [RuleUpdate] -> UpdateRule)
-> Lens UpdateRule UpdateRule [RuleUpdate] [RuleUpdate]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRule' {[RuleUpdate]
updates :: [RuleUpdate]
$sel:updates:UpdateRule' :: UpdateRule -> [RuleUpdate]
updates} -> [RuleUpdate]
updates) (\s :: UpdateRule
s@UpdateRule' {} [RuleUpdate]
a -> UpdateRule
s {$sel:updates:UpdateRule' :: [RuleUpdate]
updates = [RuleUpdate]
a} :: UpdateRule) (([RuleUpdate] -> f [RuleUpdate]) -> UpdateRule -> f UpdateRule)
-> (([RuleUpdate] -> f [RuleUpdate])
    -> [RuleUpdate] -> f [RuleUpdate])
-> ([RuleUpdate] -> f [RuleUpdate])
-> UpdateRule
-> f UpdateRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([RuleUpdate] -> f [RuleUpdate]) -> [RuleUpdate] -> f [RuleUpdate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData UpdateRule

instance Core.ToHeaders UpdateRule where
  toHeaders :: UpdateRule -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateRule -> 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
"AWSWAF_20150824.UpdateRule" :: 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 UpdateRule where
  toJSON :: UpdateRule -> Value
toJSON UpdateRule' {[RuleUpdate]
Text
updates :: [RuleUpdate]
changeToken :: Text
ruleId :: Text
$sel:updates:UpdateRule' :: UpdateRule -> [RuleUpdate]
$sel:changeToken:UpdateRule' :: UpdateRule -> Text
$sel:ruleId:UpdateRule' :: UpdateRule -> 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
"RuleId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
ruleId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ChangeToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
changeToken),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Updates" Text -> [RuleUpdate] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [RuleUpdate]
updates)
          ]
      )

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

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

-- | /See:/ 'newUpdateRuleResponse' smart constructor.
data UpdateRuleResponse = UpdateRuleResponse'
  { -- | The @ChangeToken@ that you used to submit the @UpdateRule@ request. You
    -- can also use this value to query the status of the request. For more
    -- information, see GetChangeTokenStatus.
    UpdateRuleResponse -> Maybe Text
changeToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateRuleResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateRuleResponse -> UpdateRuleResponse -> Bool
(UpdateRuleResponse -> UpdateRuleResponse -> Bool)
-> (UpdateRuleResponse -> UpdateRuleResponse -> Bool)
-> Eq UpdateRuleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRuleResponse -> UpdateRuleResponse -> Bool
$c/= :: UpdateRuleResponse -> UpdateRuleResponse -> Bool
== :: UpdateRuleResponse -> UpdateRuleResponse -> Bool
$c== :: UpdateRuleResponse -> UpdateRuleResponse -> Bool
Prelude.Eq, ReadPrec [UpdateRuleResponse]
ReadPrec UpdateRuleResponse
Int -> ReadS UpdateRuleResponse
ReadS [UpdateRuleResponse]
(Int -> ReadS UpdateRuleResponse)
-> ReadS [UpdateRuleResponse]
-> ReadPrec UpdateRuleResponse
-> ReadPrec [UpdateRuleResponse]
-> Read UpdateRuleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRuleResponse]
$creadListPrec :: ReadPrec [UpdateRuleResponse]
readPrec :: ReadPrec UpdateRuleResponse
$creadPrec :: ReadPrec UpdateRuleResponse
readList :: ReadS [UpdateRuleResponse]
$creadList :: ReadS [UpdateRuleResponse]
readsPrec :: Int -> ReadS UpdateRuleResponse
$creadsPrec :: Int -> ReadS UpdateRuleResponse
Prelude.Read, Int -> UpdateRuleResponse -> ShowS
[UpdateRuleResponse] -> ShowS
UpdateRuleResponse -> String
(Int -> UpdateRuleResponse -> ShowS)
-> (UpdateRuleResponse -> String)
-> ([UpdateRuleResponse] -> ShowS)
-> Show UpdateRuleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRuleResponse] -> ShowS
$cshowList :: [UpdateRuleResponse] -> ShowS
show :: UpdateRuleResponse -> String
$cshow :: UpdateRuleResponse -> String
showsPrec :: Int -> UpdateRuleResponse -> ShowS
$cshowsPrec :: Int -> UpdateRuleResponse -> ShowS
Prelude.Show, (forall x. UpdateRuleResponse -> Rep UpdateRuleResponse x)
-> (forall x. Rep UpdateRuleResponse x -> UpdateRuleResponse)
-> Generic UpdateRuleResponse
forall x. Rep UpdateRuleResponse x -> UpdateRuleResponse
forall x. UpdateRuleResponse -> Rep UpdateRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateRuleResponse x -> UpdateRuleResponse
$cfrom :: forall x. UpdateRuleResponse -> Rep UpdateRuleResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRuleResponse' 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:
--
-- 'changeToken', 'updateRuleResponse_changeToken' - The @ChangeToken@ that you used to submit the @UpdateRule@ request. You
-- can also use this value to query the status of the request. For more
-- information, see GetChangeTokenStatus.
--
-- 'httpStatus', 'updateRuleResponse_httpStatus' - The response's http status code.
newUpdateRuleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateRuleResponse
newUpdateRuleResponse :: Int -> UpdateRuleResponse
newUpdateRuleResponse Int
pHttpStatus_ =
  UpdateRuleResponse' :: Maybe Text -> Int -> UpdateRuleResponse
UpdateRuleResponse'
    { $sel:changeToken:UpdateRuleResponse' :: Maybe Text
changeToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateRuleResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The @ChangeToken@ that you used to submit the @UpdateRule@ request. You
-- can also use this value to query the status of the request. For more
-- information, see GetChangeTokenStatus.
updateRuleResponse_changeToken :: Lens.Lens' UpdateRuleResponse (Prelude.Maybe Prelude.Text)
updateRuleResponse_changeToken :: (Maybe Text -> f (Maybe Text))
-> UpdateRuleResponse -> f UpdateRuleResponse
updateRuleResponse_changeToken = (UpdateRuleResponse -> Maybe Text)
-> (UpdateRuleResponse -> Maybe Text -> UpdateRuleResponse)
-> Lens
     UpdateRuleResponse UpdateRuleResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleResponse' {Maybe Text
changeToken :: Maybe Text
$sel:changeToken:UpdateRuleResponse' :: UpdateRuleResponse -> Maybe Text
changeToken} -> Maybe Text
changeToken) (\s :: UpdateRuleResponse
s@UpdateRuleResponse' {} Maybe Text
a -> UpdateRuleResponse
s {$sel:changeToken:UpdateRuleResponse' :: Maybe Text
changeToken = Maybe Text
a} :: UpdateRuleResponse)

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

instance Prelude.NFData UpdateRuleResponse