{-# 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.GetInsightRuleReport
-- 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 operation returns the time series data collected by a Contributor
-- Insights rule. The data includes the identity and number of contributors
-- to the log group.
--
-- You can also optionally return one or more statistics about each data
-- point in the time series. These statistics can include the following:
--
-- -   @UniqueContributors@ -- the number of unique contributors for each
--     data point.
--
-- -   @MaxContributorValue@ -- the value of the top contributor for each
--     data point. The identity of the contributor might change for each
--     data point in the graph.
--
--     If this rule aggregates by COUNT, the top contributor for each data
--     point is the contributor with the most occurrences in that period.
--     If the rule aggregates by SUM, the top contributor is the
--     contributor with the highest sum in the log field specified by the
--     rule\'s @Value@, during that period.
--
-- -   @SampleCount@ -- the number of data points matched by the rule.
--
-- -   @Sum@ -- the sum of the values from all contributors during the time
--     period represented by that data point.
--
-- -   @Minimum@ -- the minimum value from a single observation during the
--     time period represented by that data point.
--
-- -   @Maximum@ -- the maximum value from a single observation during the
--     time period represented by that data point.
--
-- -   @Average@ -- the average value from all contributors during the time
--     period represented by that data point.
module Amazonka.CloudWatch.GetInsightRuleReport
  ( -- * Creating a Request
    GetInsightRuleReport (..),
    newGetInsightRuleReport,

    -- * Request Lenses
    getInsightRuleReport_maxContributorCount,
    getInsightRuleReport_metrics,
    getInsightRuleReport_orderBy,
    getInsightRuleReport_ruleName,
    getInsightRuleReport_startTime,
    getInsightRuleReport_endTime,
    getInsightRuleReport_period,

    -- * Destructuring the Response
    GetInsightRuleReportResponse (..),
    newGetInsightRuleReportResponse,

    -- * Response Lenses
    getInsightRuleReportResponse_aggregateValue,
    getInsightRuleReportResponse_aggregationStatistic,
    getInsightRuleReportResponse_approximateUniqueCount,
    getInsightRuleReportResponse_contributors,
    getInsightRuleReportResponse_keyLabels,
    getInsightRuleReportResponse_metricDatapoints,
    getInsightRuleReportResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetInsightRuleReport' smart constructor.
data GetInsightRuleReport = GetInsightRuleReport'
  { -- | The maximum number of contributors to include in the report. The range
    -- is 1 to 100. If you omit this, the default of 10 is used.
    GetInsightRuleReport -> Maybe Int
maxContributorCount :: Prelude.Maybe Prelude.Int,
    -- | Specifies which metrics to use for aggregation of contributor values for
    -- the report. You can specify one or more of the following metrics:
    --
    -- -   @UniqueContributors@ -- the number of unique contributors for each
    --     data point.
    --
    -- -   @MaxContributorValue@ -- the value of the top contributor for each
    --     data point. The identity of the contributor might change for each
    --     data point in the graph.
    --
    --     If this rule aggregates by COUNT, the top contributor for each data
    --     point is the contributor with the most occurrences in that period.
    --     If the rule aggregates by SUM, the top contributor is the
    --     contributor with the highest sum in the log field specified by the
    --     rule\'s @Value@, during that period.
    --
    -- -   @SampleCount@ -- the number of data points matched by the rule.
    --
    -- -   @Sum@ -- the sum of the values from all contributors during the time
    --     period represented by that data point.
    --
    -- -   @Minimum@ -- the minimum value from a single observation during the
    --     time period represented by that data point.
    --
    -- -   @Maximum@ -- the maximum value from a single observation during the
    --     time period represented by that data point.
    --
    -- -   @Average@ -- the average value from all contributors during the time
    --     period represented by that data point.
    GetInsightRuleReport -> Maybe [Text]
metrics :: Prelude.Maybe [Prelude.Text],
    -- | Determines what statistic to use to rank the contributors. Valid values
    -- are SUM and MAXIMUM.
    GetInsightRuleReport -> Maybe Text
orderBy :: Prelude.Maybe Prelude.Text,
    -- | The name of the rule that you want to see data from.
    GetInsightRuleReport -> Text
ruleName :: Prelude.Text,
    -- | The start time of the data to use in the report. When used in a raw HTTP
    -- Query API, it is formatted as @yyyy-MM-dd\'T\'HH:mm:ss@. For example,
    -- @2019-07-01T23:59:59@.
    GetInsightRuleReport -> ISO8601
startTime :: Data.ISO8601,
    -- | The end time of the data to use in the report. When used in a raw HTTP
    -- Query API, it is formatted as @yyyy-MM-dd\'T\'HH:mm:ss@. For example,
    -- @2019-07-01T23:59:59@.
    GetInsightRuleReport -> ISO8601
endTime :: Data.ISO8601,
    -- | The period, in seconds, to use for the statistics in the
    -- @InsightRuleMetricDatapoint@ results.
    GetInsightRuleReport -> Natural
period :: Prelude.Natural
  }
  deriving (GetInsightRuleReport -> GetInsightRuleReport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetInsightRuleReport -> GetInsightRuleReport -> Bool
$c/= :: GetInsightRuleReport -> GetInsightRuleReport -> Bool
== :: GetInsightRuleReport -> GetInsightRuleReport -> Bool
$c== :: GetInsightRuleReport -> GetInsightRuleReport -> Bool
Prelude.Eq, ReadPrec [GetInsightRuleReport]
ReadPrec GetInsightRuleReport
Int -> ReadS GetInsightRuleReport
ReadS [GetInsightRuleReport]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetInsightRuleReport]
$creadListPrec :: ReadPrec [GetInsightRuleReport]
readPrec :: ReadPrec GetInsightRuleReport
$creadPrec :: ReadPrec GetInsightRuleReport
readList :: ReadS [GetInsightRuleReport]
$creadList :: ReadS [GetInsightRuleReport]
readsPrec :: Int -> ReadS GetInsightRuleReport
$creadsPrec :: Int -> ReadS GetInsightRuleReport
Prelude.Read, Int -> GetInsightRuleReport -> ShowS
[GetInsightRuleReport] -> ShowS
GetInsightRuleReport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetInsightRuleReport] -> ShowS
$cshowList :: [GetInsightRuleReport] -> ShowS
show :: GetInsightRuleReport -> String
$cshow :: GetInsightRuleReport -> String
showsPrec :: Int -> GetInsightRuleReport -> ShowS
$cshowsPrec :: Int -> GetInsightRuleReport -> ShowS
Prelude.Show, forall x. Rep GetInsightRuleReport x -> GetInsightRuleReport
forall x. GetInsightRuleReport -> Rep GetInsightRuleReport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetInsightRuleReport x -> GetInsightRuleReport
$cfrom :: forall x. GetInsightRuleReport -> Rep GetInsightRuleReport x
Prelude.Generic)

-- |
-- Create a value of 'GetInsightRuleReport' 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:
--
-- 'maxContributorCount', 'getInsightRuleReport_maxContributorCount' - The maximum number of contributors to include in the report. The range
-- is 1 to 100. If you omit this, the default of 10 is used.
--
-- 'metrics', 'getInsightRuleReport_metrics' - Specifies which metrics to use for aggregation of contributor values for
-- the report. You can specify one or more of the following metrics:
--
-- -   @UniqueContributors@ -- the number of unique contributors for each
--     data point.
--
-- -   @MaxContributorValue@ -- the value of the top contributor for each
--     data point. The identity of the contributor might change for each
--     data point in the graph.
--
--     If this rule aggregates by COUNT, the top contributor for each data
--     point is the contributor with the most occurrences in that period.
--     If the rule aggregates by SUM, the top contributor is the
--     contributor with the highest sum in the log field specified by the
--     rule\'s @Value@, during that period.
--
-- -   @SampleCount@ -- the number of data points matched by the rule.
--
-- -   @Sum@ -- the sum of the values from all contributors during the time
--     period represented by that data point.
--
-- -   @Minimum@ -- the minimum value from a single observation during the
--     time period represented by that data point.
--
-- -   @Maximum@ -- the maximum value from a single observation during the
--     time period represented by that data point.
--
-- -   @Average@ -- the average value from all contributors during the time
--     period represented by that data point.
--
-- 'orderBy', 'getInsightRuleReport_orderBy' - Determines what statistic to use to rank the contributors. Valid values
-- are SUM and MAXIMUM.
--
-- 'ruleName', 'getInsightRuleReport_ruleName' - The name of the rule that you want to see data from.
--
-- 'startTime', 'getInsightRuleReport_startTime' - The start time of the data to use in the report. When used in a raw HTTP
-- Query API, it is formatted as @yyyy-MM-dd\'T\'HH:mm:ss@. For example,
-- @2019-07-01T23:59:59@.
--
-- 'endTime', 'getInsightRuleReport_endTime' - The end time of the data to use in the report. When used in a raw HTTP
-- Query API, it is formatted as @yyyy-MM-dd\'T\'HH:mm:ss@. For example,
-- @2019-07-01T23:59:59@.
--
-- 'period', 'getInsightRuleReport_period' - The period, in seconds, to use for the statistics in the
-- @InsightRuleMetricDatapoint@ results.
newGetInsightRuleReport ::
  -- | 'ruleName'
  Prelude.Text ->
  -- | 'startTime'
  Prelude.UTCTime ->
  -- | 'endTime'
  Prelude.UTCTime ->
  -- | 'period'
  Prelude.Natural ->
  GetInsightRuleReport
newGetInsightRuleReport :: Text -> UTCTime -> UTCTime -> Natural -> GetInsightRuleReport
newGetInsightRuleReport
  Text
pRuleName_
  UTCTime
pStartTime_
  UTCTime
pEndTime_
  Natural
pPeriod_ =
    GetInsightRuleReport'
      { $sel:maxContributorCount:GetInsightRuleReport' :: Maybe Int
maxContributorCount =
          forall a. Maybe a
Prelude.Nothing,
        $sel:metrics:GetInsightRuleReport' :: Maybe [Text]
metrics = forall a. Maybe a
Prelude.Nothing,
        $sel:orderBy:GetInsightRuleReport' :: Maybe Text
orderBy = forall a. Maybe a
Prelude.Nothing,
        $sel:ruleName:GetInsightRuleReport' :: Text
ruleName = Text
pRuleName_,
        $sel:startTime:GetInsightRuleReport' :: ISO8601
startTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
        $sel:endTime:GetInsightRuleReport' :: ISO8601
endTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndTime_,
        $sel:period:GetInsightRuleReport' :: Natural
period = Natural
pPeriod_
      }

-- | The maximum number of contributors to include in the report. The range
-- is 1 to 100. If you omit this, the default of 10 is used.
getInsightRuleReport_maxContributorCount :: Lens.Lens' GetInsightRuleReport (Prelude.Maybe Prelude.Int)
getInsightRuleReport_maxContributorCount :: Lens' GetInsightRuleReport (Maybe Int)
getInsightRuleReport_maxContributorCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReport' {Maybe Int
maxContributorCount :: Maybe Int
$sel:maxContributorCount:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe Int
maxContributorCount} -> Maybe Int
maxContributorCount) (\s :: GetInsightRuleReport
s@GetInsightRuleReport' {} Maybe Int
a -> GetInsightRuleReport
s {$sel:maxContributorCount:GetInsightRuleReport' :: Maybe Int
maxContributorCount = Maybe Int
a} :: GetInsightRuleReport)

-- | Specifies which metrics to use for aggregation of contributor values for
-- the report. You can specify one or more of the following metrics:
--
-- -   @UniqueContributors@ -- the number of unique contributors for each
--     data point.
--
-- -   @MaxContributorValue@ -- the value of the top contributor for each
--     data point. The identity of the contributor might change for each
--     data point in the graph.
--
--     If this rule aggregates by COUNT, the top contributor for each data
--     point is the contributor with the most occurrences in that period.
--     If the rule aggregates by SUM, the top contributor is the
--     contributor with the highest sum in the log field specified by the
--     rule\'s @Value@, during that period.
--
-- -   @SampleCount@ -- the number of data points matched by the rule.
--
-- -   @Sum@ -- the sum of the values from all contributors during the time
--     period represented by that data point.
--
-- -   @Minimum@ -- the minimum value from a single observation during the
--     time period represented by that data point.
--
-- -   @Maximum@ -- the maximum value from a single observation during the
--     time period represented by that data point.
--
-- -   @Average@ -- the average value from all contributors during the time
--     period represented by that data point.
getInsightRuleReport_metrics :: Lens.Lens' GetInsightRuleReport (Prelude.Maybe [Prelude.Text])
getInsightRuleReport_metrics :: Lens' GetInsightRuleReport (Maybe [Text])
getInsightRuleReport_metrics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReport' {Maybe [Text]
metrics :: Maybe [Text]
$sel:metrics:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe [Text]
metrics} -> Maybe [Text]
metrics) (\s :: GetInsightRuleReport
s@GetInsightRuleReport' {} Maybe [Text]
a -> GetInsightRuleReport
s {$sel:metrics:GetInsightRuleReport' :: Maybe [Text]
metrics = Maybe [Text]
a} :: GetInsightRuleReport) 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

-- | Determines what statistic to use to rank the contributors. Valid values
-- are SUM and MAXIMUM.
getInsightRuleReport_orderBy :: Lens.Lens' GetInsightRuleReport (Prelude.Maybe Prelude.Text)
getInsightRuleReport_orderBy :: Lens' GetInsightRuleReport (Maybe Text)
getInsightRuleReport_orderBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReport' {Maybe Text
orderBy :: Maybe Text
$sel:orderBy:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe Text
orderBy} -> Maybe Text
orderBy) (\s :: GetInsightRuleReport
s@GetInsightRuleReport' {} Maybe Text
a -> GetInsightRuleReport
s {$sel:orderBy:GetInsightRuleReport' :: Maybe Text
orderBy = Maybe Text
a} :: GetInsightRuleReport)

-- | The name of the rule that you want to see data from.
getInsightRuleReport_ruleName :: Lens.Lens' GetInsightRuleReport Prelude.Text
getInsightRuleReport_ruleName :: Lens' GetInsightRuleReport Text
getInsightRuleReport_ruleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReport' {Text
ruleName :: Text
$sel:ruleName:GetInsightRuleReport' :: GetInsightRuleReport -> Text
ruleName} -> Text
ruleName) (\s :: GetInsightRuleReport
s@GetInsightRuleReport' {} Text
a -> GetInsightRuleReport
s {$sel:ruleName:GetInsightRuleReport' :: Text
ruleName = Text
a} :: GetInsightRuleReport)

-- | The start time of the data to use in the report. When used in a raw HTTP
-- Query API, it is formatted as @yyyy-MM-dd\'T\'HH:mm:ss@. For example,
-- @2019-07-01T23:59:59@.
getInsightRuleReport_startTime :: Lens.Lens' GetInsightRuleReport Prelude.UTCTime
getInsightRuleReport_startTime :: Lens' GetInsightRuleReport UTCTime
getInsightRuleReport_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReport' {ISO8601
startTime :: ISO8601
$sel:startTime:GetInsightRuleReport' :: GetInsightRuleReport -> ISO8601
startTime} -> ISO8601
startTime) (\s :: GetInsightRuleReport
s@GetInsightRuleReport' {} ISO8601
a -> GetInsightRuleReport
s {$sel:startTime:GetInsightRuleReport' :: ISO8601
startTime = ISO8601
a} :: GetInsightRuleReport) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The end time of the data to use in the report. When used in a raw HTTP
-- Query API, it is formatted as @yyyy-MM-dd\'T\'HH:mm:ss@. For example,
-- @2019-07-01T23:59:59@.
getInsightRuleReport_endTime :: Lens.Lens' GetInsightRuleReport Prelude.UTCTime
getInsightRuleReport_endTime :: Lens' GetInsightRuleReport UTCTime
getInsightRuleReport_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReport' {ISO8601
endTime :: ISO8601
$sel:endTime:GetInsightRuleReport' :: GetInsightRuleReport -> ISO8601
endTime} -> ISO8601
endTime) (\s :: GetInsightRuleReport
s@GetInsightRuleReport' {} ISO8601
a -> GetInsightRuleReport
s {$sel:endTime:GetInsightRuleReport' :: ISO8601
endTime = ISO8601
a} :: GetInsightRuleReport) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The period, in seconds, to use for the statistics in the
-- @InsightRuleMetricDatapoint@ results.
getInsightRuleReport_period :: Lens.Lens' GetInsightRuleReport Prelude.Natural
getInsightRuleReport_period :: Lens' GetInsightRuleReport Natural
getInsightRuleReport_period = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReport' {Natural
period :: Natural
$sel:period:GetInsightRuleReport' :: GetInsightRuleReport -> Natural
period} -> Natural
period) (\s :: GetInsightRuleReport
s@GetInsightRuleReport' {} Natural
a -> GetInsightRuleReport
s {$sel:period:GetInsightRuleReport' :: Natural
period = Natural
a} :: GetInsightRuleReport)

instance Core.AWSRequest GetInsightRuleReport where
  type
    AWSResponse GetInsightRuleReport =
      GetInsightRuleReportResponse
  request :: (Service -> Service)
-> GetInsightRuleReport -> Request GetInsightRuleReport
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetInsightRuleReport
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetInsightRuleReport)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"GetInsightRuleReportResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Double
-> Maybe Text
-> Maybe Integer
-> Maybe [InsightRuleContributor]
-> Maybe [Text]
-> Maybe [InsightRuleMetricDatapoint]
-> Int
-> GetInsightRuleReportResponse
GetInsightRuleReportResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"AggregateValue")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"AggregationStatistic")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ApproximateUniqueCount")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Contributors"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"KeyLabels"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"MetricDatapoints"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            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 GetInsightRuleReport where
  hashWithSalt :: Int -> GetInsightRuleReport -> Int
hashWithSalt Int
_salt GetInsightRuleReport' {Natural
Maybe Int
Maybe [Text]
Maybe Text
Text
ISO8601
period :: Natural
endTime :: ISO8601
startTime :: ISO8601
ruleName :: Text
orderBy :: Maybe Text
metrics :: Maybe [Text]
maxContributorCount :: Maybe Int
$sel:period:GetInsightRuleReport' :: GetInsightRuleReport -> Natural
$sel:endTime:GetInsightRuleReport' :: GetInsightRuleReport -> ISO8601
$sel:startTime:GetInsightRuleReport' :: GetInsightRuleReport -> ISO8601
$sel:ruleName:GetInsightRuleReport' :: GetInsightRuleReport -> Text
$sel:orderBy:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe Text
$sel:metrics:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe [Text]
$sel:maxContributorCount:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxContributorCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
metrics
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
orderBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ruleName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
startTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
endTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
period

instance Prelude.NFData GetInsightRuleReport where
  rnf :: GetInsightRuleReport -> ()
rnf GetInsightRuleReport' {Natural
Maybe Int
Maybe [Text]
Maybe Text
Text
ISO8601
period :: Natural
endTime :: ISO8601
startTime :: ISO8601
ruleName :: Text
orderBy :: Maybe Text
metrics :: Maybe [Text]
maxContributorCount :: Maybe Int
$sel:period:GetInsightRuleReport' :: GetInsightRuleReport -> Natural
$sel:endTime:GetInsightRuleReport' :: GetInsightRuleReport -> ISO8601
$sel:startTime:GetInsightRuleReport' :: GetInsightRuleReport -> ISO8601
$sel:ruleName:GetInsightRuleReport' :: GetInsightRuleReport -> Text
$sel:orderBy:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe Text
$sel:metrics:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe [Text]
$sel:maxContributorCount:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxContributorCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
metrics
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
orderBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
ruleName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
startTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
endTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
period

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

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

instance Data.ToQuery GetInsightRuleReport where
  toQuery :: GetInsightRuleReport -> QueryString
toQuery GetInsightRuleReport' {Natural
Maybe Int
Maybe [Text]
Maybe Text
Text
ISO8601
period :: Natural
endTime :: ISO8601
startTime :: ISO8601
ruleName :: Text
orderBy :: Maybe Text
metrics :: Maybe [Text]
maxContributorCount :: Maybe Int
$sel:period:GetInsightRuleReport' :: GetInsightRuleReport -> Natural
$sel:endTime:GetInsightRuleReport' :: GetInsightRuleReport -> ISO8601
$sel:startTime:GetInsightRuleReport' :: GetInsightRuleReport -> ISO8601
$sel:ruleName:GetInsightRuleReport' :: GetInsightRuleReport -> Text
$sel:orderBy:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe Text
$sel:metrics:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe [Text]
$sel:maxContributorCount:GetInsightRuleReport' :: GetInsightRuleReport -> Maybe Int
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"GetInsightRuleReport" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-08-01" :: Prelude.ByteString),
        ByteString
"MaxContributorCount" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxContributorCount,
        ByteString
"Metrics"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
metrics),
        ByteString
"OrderBy" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
orderBy,
        ByteString
"RuleName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
ruleName,
        ByteString
"StartTime" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ISO8601
startTime,
        ByteString
"EndTime" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ISO8601
endTime,
        ByteString
"Period" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Natural
period
      ]

-- | /See:/ 'newGetInsightRuleReportResponse' smart constructor.
data GetInsightRuleReportResponse = GetInsightRuleReportResponse'
  { -- | The sum of the values from all individual contributors that match the
    -- rule.
    GetInsightRuleReportResponse -> Maybe Double
aggregateValue :: Prelude.Maybe Prelude.Double,
    -- | Specifies whether this rule aggregates contributor data by COUNT or SUM.
    GetInsightRuleReportResponse -> Maybe Text
aggregationStatistic :: Prelude.Maybe Prelude.Text,
    -- | An approximate count of the unique contributors found by this rule in
    -- this time period.
    GetInsightRuleReportResponse -> Maybe Integer
approximateUniqueCount :: Prelude.Maybe Prelude.Integer,
    -- | An array of the unique contributors found by this rule in this time
    -- period. If the rule contains multiple keys, each combination of values
    -- for the keys counts as a unique contributor.
    GetInsightRuleReportResponse -> Maybe [InsightRuleContributor]
contributors :: Prelude.Maybe [InsightRuleContributor],
    -- | An array of the strings used as the keys for this rule. The keys are the
    -- dimensions used to classify contributors. If the rule contains more than
    -- one key, then each unique combination of values for the keys is counted
    -- as a unique contributor.
    GetInsightRuleReportResponse -> Maybe [Text]
keyLabels :: Prelude.Maybe [Prelude.Text],
    -- | A time series of metric data points that matches the time period in the
    -- rule request.
    GetInsightRuleReportResponse -> Maybe [InsightRuleMetricDatapoint]
metricDatapoints :: Prelude.Maybe [InsightRuleMetricDatapoint],
    -- | The response's http status code.
    GetInsightRuleReportResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetInsightRuleReportResponse
-> GetInsightRuleReportResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetInsightRuleReportResponse
-> GetInsightRuleReportResponse -> Bool
$c/= :: GetInsightRuleReportResponse
-> GetInsightRuleReportResponse -> Bool
== :: GetInsightRuleReportResponse
-> GetInsightRuleReportResponse -> Bool
$c== :: GetInsightRuleReportResponse
-> GetInsightRuleReportResponse -> Bool
Prelude.Eq, ReadPrec [GetInsightRuleReportResponse]
ReadPrec GetInsightRuleReportResponse
Int -> ReadS GetInsightRuleReportResponse
ReadS [GetInsightRuleReportResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetInsightRuleReportResponse]
$creadListPrec :: ReadPrec [GetInsightRuleReportResponse]
readPrec :: ReadPrec GetInsightRuleReportResponse
$creadPrec :: ReadPrec GetInsightRuleReportResponse
readList :: ReadS [GetInsightRuleReportResponse]
$creadList :: ReadS [GetInsightRuleReportResponse]
readsPrec :: Int -> ReadS GetInsightRuleReportResponse
$creadsPrec :: Int -> ReadS GetInsightRuleReportResponse
Prelude.Read, Int -> GetInsightRuleReportResponse -> ShowS
[GetInsightRuleReportResponse] -> ShowS
GetInsightRuleReportResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetInsightRuleReportResponse] -> ShowS
$cshowList :: [GetInsightRuleReportResponse] -> ShowS
show :: GetInsightRuleReportResponse -> String
$cshow :: GetInsightRuleReportResponse -> String
showsPrec :: Int -> GetInsightRuleReportResponse -> ShowS
$cshowsPrec :: Int -> GetInsightRuleReportResponse -> ShowS
Prelude.Show, forall x.
Rep GetInsightRuleReportResponse x -> GetInsightRuleReportResponse
forall x.
GetInsightRuleReportResponse -> Rep GetInsightRuleReportResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetInsightRuleReportResponse x -> GetInsightRuleReportResponse
$cfrom :: forall x.
GetInsightRuleReportResponse -> Rep GetInsightRuleReportResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetInsightRuleReportResponse' 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:
--
-- 'aggregateValue', 'getInsightRuleReportResponse_aggregateValue' - The sum of the values from all individual contributors that match the
-- rule.
--
-- 'aggregationStatistic', 'getInsightRuleReportResponse_aggregationStatistic' - Specifies whether this rule aggregates contributor data by COUNT or SUM.
--
-- 'approximateUniqueCount', 'getInsightRuleReportResponse_approximateUniqueCount' - An approximate count of the unique contributors found by this rule in
-- this time period.
--
-- 'contributors', 'getInsightRuleReportResponse_contributors' - An array of the unique contributors found by this rule in this time
-- period. If the rule contains multiple keys, each combination of values
-- for the keys counts as a unique contributor.
--
-- 'keyLabels', 'getInsightRuleReportResponse_keyLabels' - An array of the strings used as the keys for this rule. The keys are the
-- dimensions used to classify contributors. If the rule contains more than
-- one key, then each unique combination of values for the keys is counted
-- as a unique contributor.
--
-- 'metricDatapoints', 'getInsightRuleReportResponse_metricDatapoints' - A time series of metric data points that matches the time period in the
-- rule request.
--
-- 'httpStatus', 'getInsightRuleReportResponse_httpStatus' - The response's http status code.
newGetInsightRuleReportResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetInsightRuleReportResponse
newGetInsightRuleReportResponse :: Int -> GetInsightRuleReportResponse
newGetInsightRuleReportResponse Int
pHttpStatus_ =
  GetInsightRuleReportResponse'
    { $sel:aggregateValue:GetInsightRuleReportResponse' :: Maybe Double
aggregateValue =
        forall a. Maybe a
Prelude.Nothing,
      $sel:aggregationStatistic:GetInsightRuleReportResponse' :: Maybe Text
aggregationStatistic = forall a. Maybe a
Prelude.Nothing,
      $sel:approximateUniqueCount:GetInsightRuleReportResponse' :: Maybe Integer
approximateUniqueCount = forall a. Maybe a
Prelude.Nothing,
      $sel:contributors:GetInsightRuleReportResponse' :: Maybe [InsightRuleContributor]
contributors = forall a. Maybe a
Prelude.Nothing,
      $sel:keyLabels:GetInsightRuleReportResponse' :: Maybe [Text]
keyLabels = forall a. Maybe a
Prelude.Nothing,
      $sel:metricDatapoints:GetInsightRuleReportResponse' :: Maybe [InsightRuleMetricDatapoint]
metricDatapoints = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetInsightRuleReportResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The sum of the values from all individual contributors that match the
-- rule.
getInsightRuleReportResponse_aggregateValue :: Lens.Lens' GetInsightRuleReportResponse (Prelude.Maybe Prelude.Double)
getInsightRuleReportResponse_aggregateValue :: Lens' GetInsightRuleReportResponse (Maybe Double)
getInsightRuleReportResponse_aggregateValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReportResponse' {Maybe Double
aggregateValue :: Maybe Double
$sel:aggregateValue:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe Double
aggregateValue} -> Maybe Double
aggregateValue) (\s :: GetInsightRuleReportResponse
s@GetInsightRuleReportResponse' {} Maybe Double
a -> GetInsightRuleReportResponse
s {$sel:aggregateValue:GetInsightRuleReportResponse' :: Maybe Double
aggregateValue = Maybe Double
a} :: GetInsightRuleReportResponse)

-- | Specifies whether this rule aggregates contributor data by COUNT or SUM.
getInsightRuleReportResponse_aggregationStatistic :: Lens.Lens' GetInsightRuleReportResponse (Prelude.Maybe Prelude.Text)
getInsightRuleReportResponse_aggregationStatistic :: Lens' GetInsightRuleReportResponse (Maybe Text)
getInsightRuleReportResponse_aggregationStatistic = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReportResponse' {Maybe Text
aggregationStatistic :: Maybe Text
$sel:aggregationStatistic:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe Text
aggregationStatistic} -> Maybe Text
aggregationStatistic) (\s :: GetInsightRuleReportResponse
s@GetInsightRuleReportResponse' {} Maybe Text
a -> GetInsightRuleReportResponse
s {$sel:aggregationStatistic:GetInsightRuleReportResponse' :: Maybe Text
aggregationStatistic = Maybe Text
a} :: GetInsightRuleReportResponse)

-- | An approximate count of the unique contributors found by this rule in
-- this time period.
getInsightRuleReportResponse_approximateUniqueCount :: Lens.Lens' GetInsightRuleReportResponse (Prelude.Maybe Prelude.Integer)
getInsightRuleReportResponse_approximateUniqueCount :: Lens' GetInsightRuleReportResponse (Maybe Integer)
getInsightRuleReportResponse_approximateUniqueCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReportResponse' {Maybe Integer
approximateUniqueCount :: Maybe Integer
$sel:approximateUniqueCount:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe Integer
approximateUniqueCount} -> Maybe Integer
approximateUniqueCount) (\s :: GetInsightRuleReportResponse
s@GetInsightRuleReportResponse' {} Maybe Integer
a -> GetInsightRuleReportResponse
s {$sel:approximateUniqueCount:GetInsightRuleReportResponse' :: Maybe Integer
approximateUniqueCount = Maybe Integer
a} :: GetInsightRuleReportResponse)

-- | An array of the unique contributors found by this rule in this time
-- period. If the rule contains multiple keys, each combination of values
-- for the keys counts as a unique contributor.
getInsightRuleReportResponse_contributors :: Lens.Lens' GetInsightRuleReportResponse (Prelude.Maybe [InsightRuleContributor])
getInsightRuleReportResponse_contributors :: Lens' GetInsightRuleReportResponse (Maybe [InsightRuleContributor])
getInsightRuleReportResponse_contributors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReportResponse' {Maybe [InsightRuleContributor]
contributors :: Maybe [InsightRuleContributor]
$sel:contributors:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe [InsightRuleContributor]
contributors} -> Maybe [InsightRuleContributor]
contributors) (\s :: GetInsightRuleReportResponse
s@GetInsightRuleReportResponse' {} Maybe [InsightRuleContributor]
a -> GetInsightRuleReportResponse
s {$sel:contributors:GetInsightRuleReportResponse' :: Maybe [InsightRuleContributor]
contributors = Maybe [InsightRuleContributor]
a} :: GetInsightRuleReportResponse) 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

-- | An array of the strings used as the keys for this rule. The keys are the
-- dimensions used to classify contributors. If the rule contains more than
-- one key, then each unique combination of values for the keys is counted
-- as a unique contributor.
getInsightRuleReportResponse_keyLabels :: Lens.Lens' GetInsightRuleReportResponse (Prelude.Maybe [Prelude.Text])
getInsightRuleReportResponse_keyLabels :: Lens' GetInsightRuleReportResponse (Maybe [Text])
getInsightRuleReportResponse_keyLabels = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReportResponse' {Maybe [Text]
keyLabels :: Maybe [Text]
$sel:keyLabels:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe [Text]
keyLabels} -> Maybe [Text]
keyLabels) (\s :: GetInsightRuleReportResponse
s@GetInsightRuleReportResponse' {} Maybe [Text]
a -> GetInsightRuleReportResponse
s {$sel:keyLabels:GetInsightRuleReportResponse' :: Maybe [Text]
keyLabels = Maybe [Text]
a} :: GetInsightRuleReportResponse) 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

-- | A time series of metric data points that matches the time period in the
-- rule request.
getInsightRuleReportResponse_metricDatapoints :: Lens.Lens' GetInsightRuleReportResponse (Prelude.Maybe [InsightRuleMetricDatapoint])
getInsightRuleReportResponse_metricDatapoints :: Lens'
  GetInsightRuleReportResponse (Maybe [InsightRuleMetricDatapoint])
getInsightRuleReportResponse_metricDatapoints = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInsightRuleReportResponse' {Maybe [InsightRuleMetricDatapoint]
metricDatapoints :: Maybe [InsightRuleMetricDatapoint]
$sel:metricDatapoints:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe [InsightRuleMetricDatapoint]
metricDatapoints} -> Maybe [InsightRuleMetricDatapoint]
metricDatapoints) (\s :: GetInsightRuleReportResponse
s@GetInsightRuleReportResponse' {} Maybe [InsightRuleMetricDatapoint]
a -> GetInsightRuleReportResponse
s {$sel:metricDatapoints:GetInsightRuleReportResponse' :: Maybe [InsightRuleMetricDatapoint]
metricDatapoints = Maybe [InsightRuleMetricDatapoint]
a} :: GetInsightRuleReportResponse) 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

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

instance Prelude.NFData GetInsightRuleReportResponse where
  rnf :: GetInsightRuleReportResponse -> ()
rnf GetInsightRuleReportResponse' {Int
Maybe Double
Maybe Integer
Maybe [Text]
Maybe [InsightRuleContributor]
Maybe [InsightRuleMetricDatapoint]
Maybe Text
httpStatus :: Int
metricDatapoints :: Maybe [InsightRuleMetricDatapoint]
keyLabels :: Maybe [Text]
contributors :: Maybe [InsightRuleContributor]
approximateUniqueCount :: Maybe Integer
aggregationStatistic :: Maybe Text
aggregateValue :: Maybe Double
$sel:httpStatus:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Int
$sel:metricDatapoints:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe [InsightRuleMetricDatapoint]
$sel:keyLabels:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe [Text]
$sel:contributors:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe [InsightRuleContributor]
$sel:approximateUniqueCount:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe Integer
$sel:aggregationStatistic:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe Text
$sel:aggregateValue:GetInsightRuleReportResponse' :: GetInsightRuleReportResponse -> Maybe Double
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
aggregateValue
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
aggregationStatistic
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
approximateUniqueCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InsightRuleContributor]
contributors
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
keyLabels
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InsightRuleMetricDatapoint]
metricDatapoints
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus