{-# 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.CloudWatch.DescribeInsightRules
-- 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)
--
-- Returns a list of all the Contributor Insights rules in your account.
--
-- For more information about Contributor Insights, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights.html Using Contributor Insights to Analyze High-Cardinality Data>.
module Amazonka.CloudWatch.DescribeInsightRules
  ( -- * Creating a Request
    DescribeInsightRules (..),
    newDescribeInsightRules,

    -- * Request Lenses
    describeInsightRules_nextToken,
    describeInsightRules_maxResults,

    -- * Destructuring the Response
    DescribeInsightRulesResponse (..),
    newDescribeInsightRulesResponse,

    -- * Response Lenses
    describeInsightRulesResponse_nextToken,
    describeInsightRulesResponse_insightRules,
    describeInsightRulesResponse_httpStatus,
  )
where

import Amazonka.CloudWatch.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:/ 'newDescribeInsightRules' smart constructor.
data DescribeInsightRules = DescribeInsightRules'
  { -- | Include this value, if it was returned by the previous operation, to get
    -- the next set of rules.
    DescribeInsightRules -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in one operation. If you omit
    -- this parameter, the default of 500 is used.
    DescribeInsightRules -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (DescribeInsightRules -> DescribeInsightRules -> Bool
(DescribeInsightRules -> DescribeInsightRules -> Bool)
-> (DescribeInsightRules -> DescribeInsightRules -> Bool)
-> Eq DescribeInsightRules
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInsightRules -> DescribeInsightRules -> Bool
$c/= :: DescribeInsightRules -> DescribeInsightRules -> Bool
== :: DescribeInsightRules -> DescribeInsightRules -> Bool
$c== :: DescribeInsightRules -> DescribeInsightRules -> Bool
Prelude.Eq, ReadPrec [DescribeInsightRules]
ReadPrec DescribeInsightRules
Int -> ReadS DescribeInsightRules
ReadS [DescribeInsightRules]
(Int -> ReadS DescribeInsightRules)
-> ReadS [DescribeInsightRules]
-> ReadPrec DescribeInsightRules
-> ReadPrec [DescribeInsightRules]
-> Read DescribeInsightRules
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInsightRules]
$creadListPrec :: ReadPrec [DescribeInsightRules]
readPrec :: ReadPrec DescribeInsightRules
$creadPrec :: ReadPrec DescribeInsightRules
readList :: ReadS [DescribeInsightRules]
$creadList :: ReadS [DescribeInsightRules]
readsPrec :: Int -> ReadS DescribeInsightRules
$creadsPrec :: Int -> ReadS DescribeInsightRules
Prelude.Read, Int -> DescribeInsightRules -> ShowS
[DescribeInsightRules] -> ShowS
DescribeInsightRules -> String
(Int -> DescribeInsightRules -> ShowS)
-> (DescribeInsightRules -> String)
-> ([DescribeInsightRules] -> ShowS)
-> Show DescribeInsightRules
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInsightRules] -> ShowS
$cshowList :: [DescribeInsightRules] -> ShowS
show :: DescribeInsightRules -> String
$cshow :: DescribeInsightRules -> String
showsPrec :: Int -> DescribeInsightRules -> ShowS
$cshowsPrec :: Int -> DescribeInsightRules -> ShowS
Prelude.Show, (forall x. DescribeInsightRules -> Rep DescribeInsightRules x)
-> (forall x. Rep DescribeInsightRules x -> DescribeInsightRules)
-> Generic DescribeInsightRules
forall x. Rep DescribeInsightRules x -> DescribeInsightRules
forall x. DescribeInsightRules -> Rep DescribeInsightRules x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeInsightRules x -> DescribeInsightRules
$cfrom :: forall x. DescribeInsightRules -> Rep DescribeInsightRules x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInsightRules' 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:
--
-- 'nextToken', 'describeInsightRules_nextToken' - Include this value, if it was returned by the previous operation, to get
-- the next set of rules.
--
-- 'maxResults', 'describeInsightRules_maxResults' - The maximum number of results to return in one operation. If you omit
-- this parameter, the default of 500 is used.
newDescribeInsightRules ::
  DescribeInsightRules
newDescribeInsightRules :: DescribeInsightRules
newDescribeInsightRules =
  DescribeInsightRules' :: Maybe Text -> Maybe Natural -> DescribeInsightRules
DescribeInsightRules'
    { $sel:nextToken:DescribeInsightRules' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeInsightRules' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Include this value, if it was returned by the previous operation, to get
-- the next set of rules.
describeInsightRules_nextToken :: Lens.Lens' DescribeInsightRules (Prelude.Maybe Prelude.Text)
describeInsightRules_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeInsightRules -> f DescribeInsightRules
describeInsightRules_nextToken = (DescribeInsightRules -> Maybe Text)
-> (DescribeInsightRules -> Maybe Text -> DescribeInsightRules)
-> Lens
     DescribeInsightRules DescribeInsightRules (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInsightRules' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeInsightRules' :: DescribeInsightRules -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeInsightRules
s@DescribeInsightRules' {} Maybe Text
a -> DescribeInsightRules
s {$sel:nextToken:DescribeInsightRules' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeInsightRules)

-- | The maximum number of results to return in one operation. If you omit
-- this parameter, the default of 500 is used.
describeInsightRules_maxResults :: Lens.Lens' DescribeInsightRules (Prelude.Maybe Prelude.Natural)
describeInsightRules_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeInsightRules -> f DescribeInsightRules
describeInsightRules_maxResults = (DescribeInsightRules -> Maybe Natural)
-> (DescribeInsightRules -> Maybe Natural -> DescribeInsightRules)
-> Lens
     DescribeInsightRules
     DescribeInsightRules
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInsightRules' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeInsightRules' :: DescribeInsightRules -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeInsightRules
s@DescribeInsightRules' {} Maybe Natural
a -> DescribeInsightRules
s {$sel:maxResults:DescribeInsightRules' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeInsightRules)

instance Core.AWSRequest DescribeInsightRules where
  type
    AWSResponse DescribeInsightRules =
      DescribeInsightRulesResponse
  request :: DescribeInsightRules -> Request DescribeInsightRules
request = Service -> DescribeInsightRules -> Request DescribeInsightRules
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeInsightRules
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeInsightRules)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeInsightRules))
-> Logger
-> Service
-> Proxy DescribeInsightRules
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeInsightRules)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeInsightRulesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [InsightRule] -> Int -> DescribeInsightRulesResponse
DescribeInsightRulesResponse'
            (Maybe Text
 -> Maybe [InsightRule] -> Int -> DescribeInsightRulesResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [InsightRule] -> Int -> DescribeInsightRulesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextToken")
            Either
  String (Maybe [InsightRule] -> Int -> DescribeInsightRulesResponse)
-> Either String (Maybe [InsightRule])
-> Either String (Int -> DescribeInsightRulesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"InsightRules" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [InsightRule]))
-> Either String (Maybe [InsightRule])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [InsightRule])
-> [Node] -> Either String (Maybe [InsightRule])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [InsightRule]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> DescribeInsightRulesResponse)
-> Either String Int -> Either String DescribeInsightRulesResponse
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 DescribeInsightRules

instance Prelude.NFData DescribeInsightRules

instance Core.ToHeaders DescribeInsightRules where
  toHeaders :: DescribeInsightRules -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeInsightRules -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery DescribeInsightRules where
  toQuery :: DescribeInsightRules -> QueryString
toQuery DescribeInsightRules' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:DescribeInsightRules' :: DescribeInsightRules -> Maybe Natural
$sel:nextToken:DescribeInsightRules' :: DescribeInsightRules -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeInsightRules" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-08-01" :: Prelude.ByteString),
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"MaxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newDescribeInsightRulesResponse' smart constructor.
data DescribeInsightRulesResponse = DescribeInsightRulesResponse'
  { -- | If this parameter is present, it is a token that marks the start of the
    -- next batch of returned results.
    DescribeInsightRulesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The rules returned by the operation.
    DescribeInsightRulesResponse -> Maybe [InsightRule]
insightRules :: Prelude.Maybe [InsightRule],
    -- | The response's http status code.
    DescribeInsightRulesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeInsightRulesResponse
-> DescribeInsightRulesResponse -> Bool
(DescribeInsightRulesResponse
 -> DescribeInsightRulesResponse -> Bool)
-> (DescribeInsightRulesResponse
    -> DescribeInsightRulesResponse -> Bool)
-> Eq DescribeInsightRulesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInsightRulesResponse
-> DescribeInsightRulesResponse -> Bool
$c/= :: DescribeInsightRulesResponse
-> DescribeInsightRulesResponse -> Bool
== :: DescribeInsightRulesResponse
-> DescribeInsightRulesResponse -> Bool
$c== :: DescribeInsightRulesResponse
-> DescribeInsightRulesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeInsightRulesResponse]
ReadPrec DescribeInsightRulesResponse
Int -> ReadS DescribeInsightRulesResponse
ReadS [DescribeInsightRulesResponse]
(Int -> ReadS DescribeInsightRulesResponse)
-> ReadS [DescribeInsightRulesResponse]
-> ReadPrec DescribeInsightRulesResponse
-> ReadPrec [DescribeInsightRulesResponse]
-> Read DescribeInsightRulesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInsightRulesResponse]
$creadListPrec :: ReadPrec [DescribeInsightRulesResponse]
readPrec :: ReadPrec DescribeInsightRulesResponse
$creadPrec :: ReadPrec DescribeInsightRulesResponse
readList :: ReadS [DescribeInsightRulesResponse]
$creadList :: ReadS [DescribeInsightRulesResponse]
readsPrec :: Int -> ReadS DescribeInsightRulesResponse
$creadsPrec :: Int -> ReadS DescribeInsightRulesResponse
Prelude.Read, Int -> DescribeInsightRulesResponse -> ShowS
[DescribeInsightRulesResponse] -> ShowS
DescribeInsightRulesResponse -> String
(Int -> DescribeInsightRulesResponse -> ShowS)
-> (DescribeInsightRulesResponse -> String)
-> ([DescribeInsightRulesResponse] -> ShowS)
-> Show DescribeInsightRulesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInsightRulesResponse] -> ShowS
$cshowList :: [DescribeInsightRulesResponse] -> ShowS
show :: DescribeInsightRulesResponse -> String
$cshow :: DescribeInsightRulesResponse -> String
showsPrec :: Int -> DescribeInsightRulesResponse -> ShowS
$cshowsPrec :: Int -> DescribeInsightRulesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeInsightRulesResponse -> Rep DescribeInsightRulesResponse x)
-> (forall x.
    Rep DescribeInsightRulesResponse x -> DescribeInsightRulesResponse)
-> Generic DescribeInsightRulesResponse
forall x.
Rep DescribeInsightRulesResponse x -> DescribeInsightRulesResponse
forall x.
DescribeInsightRulesResponse -> Rep DescribeInsightRulesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeInsightRulesResponse x -> DescribeInsightRulesResponse
$cfrom :: forall x.
DescribeInsightRulesResponse -> Rep DescribeInsightRulesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInsightRulesResponse' 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:
--
-- 'nextToken', 'describeInsightRulesResponse_nextToken' - If this parameter is present, it is a token that marks the start of the
-- next batch of returned results.
--
-- 'insightRules', 'describeInsightRulesResponse_insightRules' - The rules returned by the operation.
--
-- 'httpStatus', 'describeInsightRulesResponse_httpStatus' - The response's http status code.
newDescribeInsightRulesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeInsightRulesResponse
newDescribeInsightRulesResponse :: Int -> DescribeInsightRulesResponse
newDescribeInsightRulesResponse Int
pHttpStatus_ =
  DescribeInsightRulesResponse' :: Maybe Text
-> Maybe [InsightRule] -> Int -> DescribeInsightRulesResponse
DescribeInsightRulesResponse'
    { $sel:nextToken:DescribeInsightRulesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:insightRules:DescribeInsightRulesResponse' :: Maybe [InsightRule]
insightRules = Maybe [InsightRule]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeInsightRulesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If this parameter is present, it is a token that marks the start of the
-- next batch of returned results.
describeInsightRulesResponse_nextToken :: Lens.Lens' DescribeInsightRulesResponse (Prelude.Maybe Prelude.Text)
describeInsightRulesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeInsightRulesResponse -> f DescribeInsightRulesResponse
describeInsightRulesResponse_nextToken = (DescribeInsightRulesResponse -> Maybe Text)
-> (DescribeInsightRulesResponse
    -> Maybe Text -> DescribeInsightRulesResponse)
-> Lens
     DescribeInsightRulesResponse
     DescribeInsightRulesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInsightRulesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeInsightRulesResponse' :: DescribeInsightRulesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeInsightRulesResponse
s@DescribeInsightRulesResponse' {} Maybe Text
a -> DescribeInsightRulesResponse
s {$sel:nextToken:DescribeInsightRulesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeInsightRulesResponse)

-- | The rules returned by the operation.
describeInsightRulesResponse_insightRules :: Lens.Lens' DescribeInsightRulesResponse (Prelude.Maybe [InsightRule])
describeInsightRulesResponse_insightRules :: (Maybe [InsightRule] -> f (Maybe [InsightRule]))
-> DescribeInsightRulesResponse -> f DescribeInsightRulesResponse
describeInsightRulesResponse_insightRules = (DescribeInsightRulesResponse -> Maybe [InsightRule])
-> (DescribeInsightRulesResponse
    -> Maybe [InsightRule] -> DescribeInsightRulesResponse)
-> Lens
     DescribeInsightRulesResponse
     DescribeInsightRulesResponse
     (Maybe [InsightRule])
     (Maybe [InsightRule])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInsightRulesResponse' {Maybe [InsightRule]
insightRules :: Maybe [InsightRule]
$sel:insightRules:DescribeInsightRulesResponse' :: DescribeInsightRulesResponse -> Maybe [InsightRule]
insightRules} -> Maybe [InsightRule]
insightRules) (\s :: DescribeInsightRulesResponse
s@DescribeInsightRulesResponse' {} Maybe [InsightRule]
a -> DescribeInsightRulesResponse
s {$sel:insightRules:DescribeInsightRulesResponse' :: Maybe [InsightRule]
insightRules = Maybe [InsightRule]
a} :: DescribeInsightRulesResponse) ((Maybe [InsightRule] -> f (Maybe [InsightRule]))
 -> DescribeInsightRulesResponse -> f DescribeInsightRulesResponse)
-> ((Maybe [InsightRule] -> f (Maybe [InsightRule]))
    -> Maybe [InsightRule] -> f (Maybe [InsightRule]))
-> (Maybe [InsightRule] -> f (Maybe [InsightRule]))
-> DescribeInsightRulesResponse
-> f DescribeInsightRulesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [InsightRule] [InsightRule] [InsightRule] [InsightRule]
-> Iso
     (Maybe [InsightRule])
     (Maybe [InsightRule])
     (Maybe [InsightRule])
     (Maybe [InsightRule])
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 AnIso [InsightRule] [InsightRule] [InsightRule] [InsightRule]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeInsightRulesResponse