{-# 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.WAFRegional.ListActivatedRulesInRuleGroup
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.
--
-- Returns an array of ActivatedRule objects.
module Amazonka.WAFRegional.ListActivatedRulesInRuleGroup
  ( -- * Creating a Request
    ListActivatedRulesInRuleGroup (..),
    newListActivatedRulesInRuleGroup,

    -- * Request Lenses
    listActivatedRulesInRuleGroup_limit,
    listActivatedRulesInRuleGroup_nextMarker,
    listActivatedRulesInRuleGroup_ruleGroupId,

    -- * Destructuring the Response
    ListActivatedRulesInRuleGroupResponse (..),
    newListActivatedRulesInRuleGroupResponse,

    -- * Response Lenses
    listActivatedRulesInRuleGroupResponse_activatedRules,
    listActivatedRulesInRuleGroupResponse_nextMarker,
    listActivatedRulesInRuleGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WAFRegional.Types

-- | /See:/ 'newListActivatedRulesInRuleGroup' smart constructor.
data ListActivatedRulesInRuleGroup = ListActivatedRulesInRuleGroup'
  { -- | Specifies the number of @ActivatedRules@ that you want AWS WAF to return
    -- for this request. If you have more @ActivatedRules@ than the number that
    -- you specify for @Limit@, the response includes a @NextMarker@ value that
    -- you can use to get another batch of @ActivatedRules@.
    ListActivatedRulesInRuleGroup -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | If you specify a value for @Limit@ and you have more @ActivatedRules@
    -- than the value of @Limit@, AWS WAF returns a @NextMarker@ value in the
    -- response that allows you to list another group of @ActivatedRules@. For
    -- the second and subsequent @ListActivatedRulesInRuleGroup@ requests,
    -- specify the value of @NextMarker@ from the previous response to get
    -- information about another batch of @ActivatedRules@.
    ListActivatedRulesInRuleGroup -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The @RuleGroupId@ of the RuleGroup for which you want to get a list of
    -- ActivatedRule objects.
    ListActivatedRulesInRuleGroup -> Maybe Text
ruleGroupId :: Prelude.Maybe Prelude.Text
  }
  deriving (ListActivatedRulesInRuleGroup
-> ListActivatedRulesInRuleGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListActivatedRulesInRuleGroup
-> ListActivatedRulesInRuleGroup -> Bool
$c/= :: ListActivatedRulesInRuleGroup
-> ListActivatedRulesInRuleGroup -> Bool
== :: ListActivatedRulesInRuleGroup
-> ListActivatedRulesInRuleGroup -> Bool
$c== :: ListActivatedRulesInRuleGroup
-> ListActivatedRulesInRuleGroup -> Bool
Prelude.Eq, ReadPrec [ListActivatedRulesInRuleGroup]
ReadPrec ListActivatedRulesInRuleGroup
Int -> ReadS ListActivatedRulesInRuleGroup
ReadS [ListActivatedRulesInRuleGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListActivatedRulesInRuleGroup]
$creadListPrec :: ReadPrec [ListActivatedRulesInRuleGroup]
readPrec :: ReadPrec ListActivatedRulesInRuleGroup
$creadPrec :: ReadPrec ListActivatedRulesInRuleGroup
readList :: ReadS [ListActivatedRulesInRuleGroup]
$creadList :: ReadS [ListActivatedRulesInRuleGroup]
readsPrec :: Int -> ReadS ListActivatedRulesInRuleGroup
$creadsPrec :: Int -> ReadS ListActivatedRulesInRuleGroup
Prelude.Read, Int -> ListActivatedRulesInRuleGroup -> ShowS
[ListActivatedRulesInRuleGroup] -> ShowS
ListActivatedRulesInRuleGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListActivatedRulesInRuleGroup] -> ShowS
$cshowList :: [ListActivatedRulesInRuleGroup] -> ShowS
show :: ListActivatedRulesInRuleGroup -> String
$cshow :: ListActivatedRulesInRuleGroup -> String
showsPrec :: Int -> ListActivatedRulesInRuleGroup -> ShowS
$cshowsPrec :: Int -> ListActivatedRulesInRuleGroup -> ShowS
Prelude.Show, forall x.
Rep ListActivatedRulesInRuleGroup x
-> ListActivatedRulesInRuleGroup
forall x.
ListActivatedRulesInRuleGroup
-> Rep ListActivatedRulesInRuleGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListActivatedRulesInRuleGroup x
-> ListActivatedRulesInRuleGroup
$cfrom :: forall x.
ListActivatedRulesInRuleGroup
-> Rep ListActivatedRulesInRuleGroup x
Prelude.Generic)

-- |
-- Create a value of 'ListActivatedRulesInRuleGroup' 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:
--
-- 'limit', 'listActivatedRulesInRuleGroup_limit' - Specifies the number of @ActivatedRules@ that you want AWS WAF to return
-- for this request. If you have more @ActivatedRules@ than the number that
-- you specify for @Limit@, the response includes a @NextMarker@ value that
-- you can use to get another batch of @ActivatedRules@.
--
-- 'nextMarker', 'listActivatedRulesInRuleGroup_nextMarker' - If you specify a value for @Limit@ and you have more @ActivatedRules@
-- than the value of @Limit@, AWS WAF returns a @NextMarker@ value in the
-- response that allows you to list another group of @ActivatedRules@. For
-- the second and subsequent @ListActivatedRulesInRuleGroup@ requests,
-- specify the value of @NextMarker@ from the previous response to get
-- information about another batch of @ActivatedRules@.
--
-- 'ruleGroupId', 'listActivatedRulesInRuleGroup_ruleGroupId' - The @RuleGroupId@ of the RuleGroup for which you want to get a list of
-- ActivatedRule objects.
newListActivatedRulesInRuleGroup ::
  ListActivatedRulesInRuleGroup
newListActivatedRulesInRuleGroup :: ListActivatedRulesInRuleGroup
newListActivatedRulesInRuleGroup =
  ListActivatedRulesInRuleGroup'
    { $sel:limit:ListActivatedRulesInRuleGroup' :: Maybe Natural
limit =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListActivatedRulesInRuleGroup' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing,
      $sel:ruleGroupId:ListActivatedRulesInRuleGroup' :: Maybe Text
ruleGroupId = forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies the number of @ActivatedRules@ that you want AWS WAF to return
-- for this request. If you have more @ActivatedRules@ than the number that
-- you specify for @Limit@, the response includes a @NextMarker@ value that
-- you can use to get another batch of @ActivatedRules@.
listActivatedRulesInRuleGroup_limit :: Lens.Lens' ListActivatedRulesInRuleGroup (Prelude.Maybe Prelude.Natural)
listActivatedRulesInRuleGroup_limit :: Lens' ListActivatedRulesInRuleGroup (Maybe Natural)
listActivatedRulesInRuleGroup_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActivatedRulesInRuleGroup' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListActivatedRulesInRuleGroup
s@ListActivatedRulesInRuleGroup' {} Maybe Natural
a -> ListActivatedRulesInRuleGroup
s {$sel:limit:ListActivatedRulesInRuleGroup' :: Maybe Natural
limit = Maybe Natural
a} :: ListActivatedRulesInRuleGroup)

-- | If you specify a value for @Limit@ and you have more @ActivatedRules@
-- than the value of @Limit@, AWS WAF returns a @NextMarker@ value in the
-- response that allows you to list another group of @ActivatedRules@. For
-- the second and subsequent @ListActivatedRulesInRuleGroup@ requests,
-- specify the value of @NextMarker@ from the previous response to get
-- information about another batch of @ActivatedRules@.
listActivatedRulesInRuleGroup_nextMarker :: Lens.Lens' ListActivatedRulesInRuleGroup (Prelude.Maybe Prelude.Text)
listActivatedRulesInRuleGroup_nextMarker :: Lens' ListActivatedRulesInRuleGroup (Maybe Text)
listActivatedRulesInRuleGroup_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActivatedRulesInRuleGroup' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListActivatedRulesInRuleGroup
s@ListActivatedRulesInRuleGroup' {} Maybe Text
a -> ListActivatedRulesInRuleGroup
s {$sel:nextMarker:ListActivatedRulesInRuleGroup' :: Maybe Text
nextMarker = Maybe Text
a} :: ListActivatedRulesInRuleGroup)

-- | The @RuleGroupId@ of the RuleGroup for which you want to get a list of
-- ActivatedRule objects.
listActivatedRulesInRuleGroup_ruleGroupId :: Lens.Lens' ListActivatedRulesInRuleGroup (Prelude.Maybe Prelude.Text)
listActivatedRulesInRuleGroup_ruleGroupId :: Lens' ListActivatedRulesInRuleGroup (Maybe Text)
listActivatedRulesInRuleGroup_ruleGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActivatedRulesInRuleGroup' {Maybe Text
ruleGroupId :: Maybe Text
$sel:ruleGroupId:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Text
ruleGroupId} -> Maybe Text
ruleGroupId) (\s :: ListActivatedRulesInRuleGroup
s@ListActivatedRulesInRuleGroup' {} Maybe Text
a -> ListActivatedRulesInRuleGroup
s {$sel:ruleGroupId:ListActivatedRulesInRuleGroup' :: Maybe Text
ruleGroupId = Maybe Text
a} :: ListActivatedRulesInRuleGroup)

instance
  Core.AWSRequest
    ListActivatedRulesInRuleGroup
  where
  type
    AWSResponse ListActivatedRulesInRuleGroup =
      ListActivatedRulesInRuleGroupResponse
  request :: (Service -> Service)
-> ListActivatedRulesInRuleGroup
-> Request ListActivatedRulesInRuleGroup
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListActivatedRulesInRuleGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListActivatedRulesInRuleGroup)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ActivatedRule]
-> Maybe Text -> Int -> ListActivatedRulesInRuleGroupResponse
ListActivatedRulesInRuleGroupResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ActivatedRules" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextMarker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListActivatedRulesInRuleGroup
  where
  hashWithSalt :: Int -> ListActivatedRulesInRuleGroup -> Int
hashWithSalt Int
_salt ListActivatedRulesInRuleGroup' {Maybe Natural
Maybe Text
ruleGroupId :: Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:ruleGroupId:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Text
$sel:nextMarker:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Text
$sel:limit:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
limit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextMarker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ruleGroupId

instance Prelude.NFData ListActivatedRulesInRuleGroup where
  rnf :: ListActivatedRulesInRuleGroup -> ()
rnf ListActivatedRulesInRuleGroup' {Maybe Natural
Maybe Text
ruleGroupId :: Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:ruleGroupId:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Text
$sel:nextMarker:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Text
$sel:limit:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
limit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ruleGroupId

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

instance Data.ToJSON ListActivatedRulesInRuleGroup where
  toJSON :: ListActivatedRulesInRuleGroup -> Value
toJSON ListActivatedRulesInRuleGroup' {Maybe Natural
Maybe Text
ruleGroupId :: Maybe Text
nextMarker :: Maybe Text
limit :: Maybe Natural
$sel:ruleGroupId:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Text
$sel:nextMarker:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Text
$sel:limit:ListActivatedRulesInRuleGroup' :: ListActivatedRulesInRuleGroup -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Limit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            (Key
"NextMarker" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextMarker,
            (Key
"RuleGroupId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ruleGroupId
          ]
      )

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

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

-- | /See:/ 'newListActivatedRulesInRuleGroupResponse' smart constructor.
data ListActivatedRulesInRuleGroupResponse = ListActivatedRulesInRuleGroupResponse'
  { -- | An array of @ActivatedRules@ objects.
    ListActivatedRulesInRuleGroupResponse -> Maybe [ActivatedRule]
activatedRules :: Prelude.Maybe [ActivatedRule],
    -- | If you have more @ActivatedRules@ than the number that you specified for
    -- @Limit@ in the request, the response includes a @NextMarker@ value. To
    -- list more @ActivatedRules@, submit another
    -- @ListActivatedRulesInRuleGroup@ request, and specify the @NextMarker@
    -- value from the response in the @NextMarker@ value in the next request.
    ListActivatedRulesInRuleGroupResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListActivatedRulesInRuleGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListActivatedRulesInRuleGroupResponse
-> ListActivatedRulesInRuleGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListActivatedRulesInRuleGroupResponse
-> ListActivatedRulesInRuleGroupResponse -> Bool
$c/= :: ListActivatedRulesInRuleGroupResponse
-> ListActivatedRulesInRuleGroupResponse -> Bool
== :: ListActivatedRulesInRuleGroupResponse
-> ListActivatedRulesInRuleGroupResponse -> Bool
$c== :: ListActivatedRulesInRuleGroupResponse
-> ListActivatedRulesInRuleGroupResponse -> Bool
Prelude.Eq, ReadPrec [ListActivatedRulesInRuleGroupResponse]
ReadPrec ListActivatedRulesInRuleGroupResponse
Int -> ReadS ListActivatedRulesInRuleGroupResponse
ReadS [ListActivatedRulesInRuleGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListActivatedRulesInRuleGroupResponse]
$creadListPrec :: ReadPrec [ListActivatedRulesInRuleGroupResponse]
readPrec :: ReadPrec ListActivatedRulesInRuleGroupResponse
$creadPrec :: ReadPrec ListActivatedRulesInRuleGroupResponse
readList :: ReadS [ListActivatedRulesInRuleGroupResponse]
$creadList :: ReadS [ListActivatedRulesInRuleGroupResponse]
readsPrec :: Int -> ReadS ListActivatedRulesInRuleGroupResponse
$creadsPrec :: Int -> ReadS ListActivatedRulesInRuleGroupResponse
Prelude.Read, Int -> ListActivatedRulesInRuleGroupResponse -> ShowS
[ListActivatedRulesInRuleGroupResponse] -> ShowS
ListActivatedRulesInRuleGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListActivatedRulesInRuleGroupResponse] -> ShowS
$cshowList :: [ListActivatedRulesInRuleGroupResponse] -> ShowS
show :: ListActivatedRulesInRuleGroupResponse -> String
$cshow :: ListActivatedRulesInRuleGroupResponse -> String
showsPrec :: Int -> ListActivatedRulesInRuleGroupResponse -> ShowS
$cshowsPrec :: Int -> ListActivatedRulesInRuleGroupResponse -> ShowS
Prelude.Show, forall x.
Rep ListActivatedRulesInRuleGroupResponse x
-> ListActivatedRulesInRuleGroupResponse
forall x.
ListActivatedRulesInRuleGroupResponse
-> Rep ListActivatedRulesInRuleGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListActivatedRulesInRuleGroupResponse x
-> ListActivatedRulesInRuleGroupResponse
$cfrom :: forall x.
ListActivatedRulesInRuleGroupResponse
-> Rep ListActivatedRulesInRuleGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListActivatedRulesInRuleGroupResponse' 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:
--
-- 'activatedRules', 'listActivatedRulesInRuleGroupResponse_activatedRules' - An array of @ActivatedRules@ objects.
--
-- 'nextMarker', 'listActivatedRulesInRuleGroupResponse_nextMarker' - If you have more @ActivatedRules@ than the number that you specified for
-- @Limit@ in the request, the response includes a @NextMarker@ value. To
-- list more @ActivatedRules@, submit another
-- @ListActivatedRulesInRuleGroup@ request, and specify the @NextMarker@
-- value from the response in the @NextMarker@ value in the next request.
--
-- 'httpStatus', 'listActivatedRulesInRuleGroupResponse_httpStatus' - The response's http status code.
newListActivatedRulesInRuleGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListActivatedRulesInRuleGroupResponse
newListActivatedRulesInRuleGroupResponse :: Int -> ListActivatedRulesInRuleGroupResponse
newListActivatedRulesInRuleGroupResponse Int
pHttpStatus_ =
  ListActivatedRulesInRuleGroupResponse'
    { $sel:activatedRules:ListActivatedRulesInRuleGroupResponse' :: Maybe [ActivatedRule]
activatedRules =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListActivatedRulesInRuleGroupResponse' :: Maybe Text
nextMarker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListActivatedRulesInRuleGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of @ActivatedRules@ objects.
listActivatedRulesInRuleGroupResponse_activatedRules :: Lens.Lens' ListActivatedRulesInRuleGroupResponse (Prelude.Maybe [ActivatedRule])
listActivatedRulesInRuleGroupResponse_activatedRules :: Lens' ListActivatedRulesInRuleGroupResponse (Maybe [ActivatedRule])
listActivatedRulesInRuleGroupResponse_activatedRules = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActivatedRulesInRuleGroupResponse' {Maybe [ActivatedRule]
activatedRules :: Maybe [ActivatedRule]
$sel:activatedRules:ListActivatedRulesInRuleGroupResponse' :: ListActivatedRulesInRuleGroupResponse -> Maybe [ActivatedRule]
activatedRules} -> Maybe [ActivatedRule]
activatedRules) (\s :: ListActivatedRulesInRuleGroupResponse
s@ListActivatedRulesInRuleGroupResponse' {} Maybe [ActivatedRule]
a -> ListActivatedRulesInRuleGroupResponse
s {$sel:activatedRules:ListActivatedRulesInRuleGroupResponse' :: Maybe [ActivatedRule]
activatedRules = Maybe [ActivatedRule]
a} :: ListActivatedRulesInRuleGroupResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If you have more @ActivatedRules@ than the number that you specified for
-- @Limit@ in the request, the response includes a @NextMarker@ value. To
-- list more @ActivatedRules@, submit another
-- @ListActivatedRulesInRuleGroup@ request, and specify the @NextMarker@
-- value from the response in the @NextMarker@ value in the next request.
listActivatedRulesInRuleGroupResponse_nextMarker :: Lens.Lens' ListActivatedRulesInRuleGroupResponse (Prelude.Maybe Prelude.Text)
listActivatedRulesInRuleGroupResponse_nextMarker :: Lens' ListActivatedRulesInRuleGroupResponse (Maybe Text)
listActivatedRulesInRuleGroupResponse_nextMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActivatedRulesInRuleGroupResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListActivatedRulesInRuleGroupResponse' :: ListActivatedRulesInRuleGroupResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListActivatedRulesInRuleGroupResponse
s@ListActivatedRulesInRuleGroupResponse' {} Maybe Text
a -> ListActivatedRulesInRuleGroupResponse
s {$sel:nextMarker:ListActivatedRulesInRuleGroupResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListActivatedRulesInRuleGroupResponse)

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

instance
  Prelude.NFData
    ListActivatedRulesInRuleGroupResponse
  where
  rnf :: ListActivatedRulesInRuleGroupResponse -> ()
rnf ListActivatedRulesInRuleGroupResponse' {Int
Maybe [ActivatedRule]
Maybe Text
httpStatus :: Int
nextMarker :: Maybe Text
activatedRules :: Maybe [ActivatedRule]
$sel:httpStatus:ListActivatedRulesInRuleGroupResponse' :: ListActivatedRulesInRuleGroupResponse -> Int
$sel:nextMarker:ListActivatedRulesInRuleGroupResponse' :: ListActivatedRulesInRuleGroupResponse -> Maybe Text
$sel:activatedRules:ListActivatedRulesInRuleGroupResponse' :: ListActivatedRulesInRuleGroupResponse -> Maybe [ActivatedRule]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ActivatedRule]
activatedRules
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus