{-# 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 #-}
module Amazonka.CloudWatch.GetInsightRuleReport
(
GetInsightRuleReport (..),
newGetInsightRuleReport,
getInsightRuleReport_maxContributorCount,
getInsightRuleReport_metrics,
getInsightRuleReport_orderBy,
getInsightRuleReport_ruleName,
getInsightRuleReport_startTime,
getInsightRuleReport_endTime,
getInsightRuleReport_period,
GetInsightRuleReportResponse (..),
newGetInsightRuleReportResponse,
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
data GetInsightRuleReport = GetInsightRuleReport'
{
GetInsightRuleReport -> Maybe Int
maxContributorCount :: Prelude.Maybe Prelude.Int,
GetInsightRuleReport -> Maybe [Text]
metrics :: Prelude.Maybe [Prelude.Text],
GetInsightRuleReport -> Maybe Text
orderBy :: Prelude.Maybe Prelude.Text,
GetInsightRuleReport -> Text
ruleName :: Prelude.Text,
GetInsightRuleReport -> ISO8601
startTime :: Data.ISO8601,
GetInsightRuleReport -> ISO8601
endTime :: Data.ISO8601,
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)
newGetInsightRuleReport ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
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_
}
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)
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
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)
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)
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
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
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
]
data GetInsightRuleReportResponse = GetInsightRuleReportResponse'
{
GetInsightRuleReportResponse -> Maybe Double
aggregateValue :: Prelude.Maybe Prelude.Double,
GetInsightRuleReportResponse -> Maybe Text
aggregationStatistic :: Prelude.Maybe Prelude.Text,
GetInsightRuleReportResponse -> Maybe Integer
approximateUniqueCount :: Prelude.Maybe Prelude.Integer,
GetInsightRuleReportResponse -> Maybe [InsightRuleContributor]
contributors :: Prelude.Maybe [InsightRuleContributor],
GetInsightRuleReportResponse -> Maybe [Text]
keyLabels :: Prelude.Maybe [Prelude.Text],
GetInsightRuleReportResponse -> Maybe [InsightRuleMetricDatapoint]
metricDatapoints :: Prelude.Maybe [InsightRuleMetricDatapoint],
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)
newGetInsightRuleReportResponse ::
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_
}
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)
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)
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)
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
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
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
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