{-# 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.CodeBuild.GetReportGroupTrend
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Analyzes and accumulates test report values for the specified test
-- reports.
module Amazonka.CodeBuild.GetReportGroupTrend
  ( -- * Creating a Request
    GetReportGroupTrend (..),
    newGetReportGroupTrend,

    -- * Request Lenses
    getReportGroupTrend_numOfReports,
    getReportGroupTrend_reportGroupArn,
    getReportGroupTrend_trendField,

    -- * Destructuring the Response
    GetReportGroupTrendResponse (..),
    newGetReportGroupTrendResponse,

    -- * Response Lenses
    getReportGroupTrendResponse_rawData,
    getReportGroupTrendResponse_stats,
    getReportGroupTrendResponse_httpStatus,
  )
where

import Amazonka.CodeBuild.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:/ 'newGetReportGroupTrend' smart constructor.
data GetReportGroupTrend = GetReportGroupTrend'
  { -- | The number of reports to analyze. This operation always retrieves the
    -- most recent reports.
    --
    -- If this parameter is omitted, the most recent 100 reports are analyzed.
    GetReportGroupTrend -> Maybe Natural
numOfReports :: Prelude.Maybe Prelude.Natural,
    -- | The ARN of the report group that contains the reports to analyze.
    GetReportGroupTrend -> Text
reportGroupArn :: Prelude.Text,
    -- | The test report value to accumulate. This must be one of the following
    -- values:
    --
    -- [Test reports:]
    --     [DURATION]
    --         Accumulate the test run times for the specified reports.
    --
    --     [PASS_RATE]
    --         Accumulate the percentage of tests that passed for the specified
    --         test reports.
    --
    --     [TOTAL]
    --         Accumulate the total number of tests for the specified test
    --         reports.
    --
    -- [Code coverage reports:]
    --     [BRANCH_COVERAGE]
    --         Accumulate the branch coverage percentages for the specified
    --         test reports.
    --
    --     [BRANCHES_COVERED]
    --         Accumulate the branches covered values for the specified test
    --         reports.
    --
    --     [BRANCHES_MISSED]
    --         Accumulate the branches missed values for the specified test
    --         reports.
    --
    --     [LINE_COVERAGE]
    --         Accumulate the line coverage percentages for the specified test
    --         reports.
    --
    --     [LINES_COVERED]
    --         Accumulate the lines covered values for the specified test
    --         reports.
    --
    --     [LINES_MISSED]
    --         Accumulate the lines not covered values for the specified test
    --         reports.
    GetReportGroupTrend -> ReportGroupTrendFieldType
trendField :: ReportGroupTrendFieldType
  }
  deriving (GetReportGroupTrend -> GetReportGroupTrend -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReportGroupTrend -> GetReportGroupTrend -> Bool
$c/= :: GetReportGroupTrend -> GetReportGroupTrend -> Bool
== :: GetReportGroupTrend -> GetReportGroupTrend -> Bool
$c== :: GetReportGroupTrend -> GetReportGroupTrend -> Bool
Prelude.Eq, ReadPrec [GetReportGroupTrend]
ReadPrec GetReportGroupTrend
Int -> ReadS GetReportGroupTrend
ReadS [GetReportGroupTrend]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetReportGroupTrend]
$creadListPrec :: ReadPrec [GetReportGroupTrend]
readPrec :: ReadPrec GetReportGroupTrend
$creadPrec :: ReadPrec GetReportGroupTrend
readList :: ReadS [GetReportGroupTrend]
$creadList :: ReadS [GetReportGroupTrend]
readsPrec :: Int -> ReadS GetReportGroupTrend
$creadsPrec :: Int -> ReadS GetReportGroupTrend
Prelude.Read, Int -> GetReportGroupTrend -> ShowS
[GetReportGroupTrend] -> ShowS
GetReportGroupTrend -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReportGroupTrend] -> ShowS
$cshowList :: [GetReportGroupTrend] -> ShowS
show :: GetReportGroupTrend -> String
$cshow :: GetReportGroupTrend -> String
showsPrec :: Int -> GetReportGroupTrend -> ShowS
$cshowsPrec :: Int -> GetReportGroupTrend -> ShowS
Prelude.Show, forall x. Rep GetReportGroupTrend x -> GetReportGroupTrend
forall x. GetReportGroupTrend -> Rep GetReportGroupTrend x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetReportGroupTrend x -> GetReportGroupTrend
$cfrom :: forall x. GetReportGroupTrend -> Rep GetReportGroupTrend x
Prelude.Generic)

-- |
-- Create a value of 'GetReportGroupTrend' 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:
--
-- 'numOfReports', 'getReportGroupTrend_numOfReports' - The number of reports to analyze. This operation always retrieves the
-- most recent reports.
--
-- If this parameter is omitted, the most recent 100 reports are analyzed.
--
-- 'reportGroupArn', 'getReportGroupTrend_reportGroupArn' - The ARN of the report group that contains the reports to analyze.
--
-- 'trendField', 'getReportGroupTrend_trendField' - The test report value to accumulate. This must be one of the following
-- values:
--
-- [Test reports:]
--     [DURATION]
--         Accumulate the test run times for the specified reports.
--
--     [PASS_RATE]
--         Accumulate the percentage of tests that passed for the specified
--         test reports.
--
--     [TOTAL]
--         Accumulate the total number of tests for the specified test
--         reports.
--
-- [Code coverage reports:]
--     [BRANCH_COVERAGE]
--         Accumulate the branch coverage percentages for the specified
--         test reports.
--
--     [BRANCHES_COVERED]
--         Accumulate the branches covered values for the specified test
--         reports.
--
--     [BRANCHES_MISSED]
--         Accumulate the branches missed values for the specified test
--         reports.
--
--     [LINE_COVERAGE]
--         Accumulate the line coverage percentages for the specified test
--         reports.
--
--     [LINES_COVERED]
--         Accumulate the lines covered values for the specified test
--         reports.
--
--     [LINES_MISSED]
--         Accumulate the lines not covered values for the specified test
--         reports.
newGetReportGroupTrend ::
  -- | 'reportGroupArn'
  Prelude.Text ->
  -- | 'trendField'
  ReportGroupTrendFieldType ->
  GetReportGroupTrend
newGetReportGroupTrend :: Text -> ReportGroupTrendFieldType -> GetReportGroupTrend
newGetReportGroupTrend Text
pReportGroupArn_ ReportGroupTrendFieldType
pTrendField_ =
  GetReportGroupTrend'
    { $sel:numOfReports:GetReportGroupTrend' :: Maybe Natural
numOfReports =
        forall a. Maybe a
Prelude.Nothing,
      $sel:reportGroupArn:GetReportGroupTrend' :: Text
reportGroupArn = Text
pReportGroupArn_,
      $sel:trendField:GetReportGroupTrend' :: ReportGroupTrendFieldType
trendField = ReportGroupTrendFieldType
pTrendField_
    }

-- | The number of reports to analyze. This operation always retrieves the
-- most recent reports.
--
-- If this parameter is omitted, the most recent 100 reports are analyzed.
getReportGroupTrend_numOfReports :: Lens.Lens' GetReportGroupTrend (Prelude.Maybe Prelude.Natural)
getReportGroupTrend_numOfReports :: Lens' GetReportGroupTrend (Maybe Natural)
getReportGroupTrend_numOfReports = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReportGroupTrend' {Maybe Natural
numOfReports :: Maybe Natural
$sel:numOfReports:GetReportGroupTrend' :: GetReportGroupTrend -> Maybe Natural
numOfReports} -> Maybe Natural
numOfReports) (\s :: GetReportGroupTrend
s@GetReportGroupTrend' {} Maybe Natural
a -> GetReportGroupTrend
s {$sel:numOfReports:GetReportGroupTrend' :: Maybe Natural
numOfReports = Maybe Natural
a} :: GetReportGroupTrend)

-- | The ARN of the report group that contains the reports to analyze.
getReportGroupTrend_reportGroupArn :: Lens.Lens' GetReportGroupTrend Prelude.Text
getReportGroupTrend_reportGroupArn :: Lens' GetReportGroupTrend Text
getReportGroupTrend_reportGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReportGroupTrend' {Text
reportGroupArn :: Text
$sel:reportGroupArn:GetReportGroupTrend' :: GetReportGroupTrend -> Text
reportGroupArn} -> Text
reportGroupArn) (\s :: GetReportGroupTrend
s@GetReportGroupTrend' {} Text
a -> GetReportGroupTrend
s {$sel:reportGroupArn:GetReportGroupTrend' :: Text
reportGroupArn = Text
a} :: GetReportGroupTrend)

-- | The test report value to accumulate. This must be one of the following
-- values:
--
-- [Test reports:]
--     [DURATION]
--         Accumulate the test run times for the specified reports.
--
--     [PASS_RATE]
--         Accumulate the percentage of tests that passed for the specified
--         test reports.
--
--     [TOTAL]
--         Accumulate the total number of tests for the specified test
--         reports.
--
-- [Code coverage reports:]
--     [BRANCH_COVERAGE]
--         Accumulate the branch coverage percentages for the specified
--         test reports.
--
--     [BRANCHES_COVERED]
--         Accumulate the branches covered values for the specified test
--         reports.
--
--     [BRANCHES_MISSED]
--         Accumulate the branches missed values for the specified test
--         reports.
--
--     [LINE_COVERAGE]
--         Accumulate the line coverage percentages for the specified test
--         reports.
--
--     [LINES_COVERED]
--         Accumulate the lines covered values for the specified test
--         reports.
--
--     [LINES_MISSED]
--         Accumulate the lines not covered values for the specified test
--         reports.
getReportGroupTrend_trendField :: Lens.Lens' GetReportGroupTrend ReportGroupTrendFieldType
getReportGroupTrend_trendField :: Lens' GetReportGroupTrend ReportGroupTrendFieldType
getReportGroupTrend_trendField = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReportGroupTrend' {ReportGroupTrendFieldType
trendField :: ReportGroupTrendFieldType
$sel:trendField:GetReportGroupTrend' :: GetReportGroupTrend -> ReportGroupTrendFieldType
trendField} -> ReportGroupTrendFieldType
trendField) (\s :: GetReportGroupTrend
s@GetReportGroupTrend' {} ReportGroupTrendFieldType
a -> GetReportGroupTrend
s {$sel:trendField:GetReportGroupTrend' :: ReportGroupTrendFieldType
trendField = ReportGroupTrendFieldType
a} :: GetReportGroupTrend)

instance Core.AWSRequest GetReportGroupTrend where
  type
    AWSResponse GetReportGroupTrend =
      GetReportGroupTrendResponse
  request :: (Service -> Service)
-> GetReportGroupTrend -> Request GetReportGroupTrend
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetReportGroupTrend
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetReportGroupTrend)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ReportWithRawData]
-> Maybe ReportGroupTrendStats
-> Int
-> GetReportGroupTrendResponse
GetReportGroupTrendResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"rawData" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"stats")
            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 GetReportGroupTrend where
  hashWithSalt :: Int -> GetReportGroupTrend -> Int
hashWithSalt Int
_salt GetReportGroupTrend' {Maybe Natural
Text
ReportGroupTrendFieldType
trendField :: ReportGroupTrendFieldType
reportGroupArn :: Text
numOfReports :: Maybe Natural
$sel:trendField:GetReportGroupTrend' :: GetReportGroupTrend -> ReportGroupTrendFieldType
$sel:reportGroupArn:GetReportGroupTrend' :: GetReportGroupTrend -> Text
$sel:numOfReports:GetReportGroupTrend' :: GetReportGroupTrend -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
numOfReports
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
reportGroupArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ReportGroupTrendFieldType
trendField

instance Prelude.NFData GetReportGroupTrend where
  rnf :: GetReportGroupTrend -> ()
rnf GetReportGroupTrend' {Maybe Natural
Text
ReportGroupTrendFieldType
trendField :: ReportGroupTrendFieldType
reportGroupArn :: Text
numOfReports :: Maybe Natural
$sel:trendField:GetReportGroupTrend' :: GetReportGroupTrend -> ReportGroupTrendFieldType
$sel:reportGroupArn:GetReportGroupTrend' :: GetReportGroupTrend -> Text
$sel:numOfReports:GetReportGroupTrend' :: GetReportGroupTrend -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
numOfReports
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
reportGroupArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ReportGroupTrendFieldType
trendField

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

instance Data.ToJSON GetReportGroupTrend where
  toJSON :: GetReportGroupTrend -> Value
toJSON GetReportGroupTrend' {Maybe Natural
Text
ReportGroupTrendFieldType
trendField :: ReportGroupTrendFieldType
reportGroupArn :: Text
numOfReports :: Maybe Natural
$sel:trendField:GetReportGroupTrend' :: GetReportGroupTrend -> ReportGroupTrendFieldType
$sel:reportGroupArn:GetReportGroupTrend' :: GetReportGroupTrend -> Text
$sel:numOfReports:GetReportGroupTrend' :: GetReportGroupTrend -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"numOfReports" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
numOfReports,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"reportGroupArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
reportGroupArn),
            forall a. a -> Maybe a
Prelude.Just (Key
"trendField" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ReportGroupTrendFieldType
trendField)
          ]
      )

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

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

-- | /See:/ 'newGetReportGroupTrendResponse' smart constructor.
data GetReportGroupTrendResponse = GetReportGroupTrendResponse'
  { -- | An array that contains the raw data for each report.
    GetReportGroupTrendResponse -> Maybe [ReportWithRawData]
rawData :: Prelude.Maybe [ReportWithRawData],
    -- | Contains the accumulated trend data.
    GetReportGroupTrendResponse -> Maybe ReportGroupTrendStats
stats :: Prelude.Maybe ReportGroupTrendStats,
    -- | The response's http status code.
    GetReportGroupTrendResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetReportGroupTrendResponse -> GetReportGroupTrendResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReportGroupTrendResponse -> GetReportGroupTrendResponse -> Bool
$c/= :: GetReportGroupTrendResponse -> GetReportGroupTrendResponse -> Bool
== :: GetReportGroupTrendResponse -> GetReportGroupTrendResponse -> Bool
$c== :: GetReportGroupTrendResponse -> GetReportGroupTrendResponse -> Bool
Prelude.Eq, ReadPrec [GetReportGroupTrendResponse]
ReadPrec GetReportGroupTrendResponse
Int -> ReadS GetReportGroupTrendResponse
ReadS [GetReportGroupTrendResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetReportGroupTrendResponse]
$creadListPrec :: ReadPrec [GetReportGroupTrendResponse]
readPrec :: ReadPrec GetReportGroupTrendResponse
$creadPrec :: ReadPrec GetReportGroupTrendResponse
readList :: ReadS [GetReportGroupTrendResponse]
$creadList :: ReadS [GetReportGroupTrendResponse]
readsPrec :: Int -> ReadS GetReportGroupTrendResponse
$creadsPrec :: Int -> ReadS GetReportGroupTrendResponse
Prelude.Read, Int -> GetReportGroupTrendResponse -> ShowS
[GetReportGroupTrendResponse] -> ShowS
GetReportGroupTrendResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReportGroupTrendResponse] -> ShowS
$cshowList :: [GetReportGroupTrendResponse] -> ShowS
show :: GetReportGroupTrendResponse -> String
$cshow :: GetReportGroupTrendResponse -> String
showsPrec :: Int -> GetReportGroupTrendResponse -> ShowS
$cshowsPrec :: Int -> GetReportGroupTrendResponse -> ShowS
Prelude.Show, forall x.
Rep GetReportGroupTrendResponse x -> GetReportGroupTrendResponse
forall x.
GetReportGroupTrendResponse -> Rep GetReportGroupTrendResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetReportGroupTrendResponse x -> GetReportGroupTrendResponse
$cfrom :: forall x.
GetReportGroupTrendResponse -> Rep GetReportGroupTrendResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetReportGroupTrendResponse' 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:
--
-- 'rawData', 'getReportGroupTrendResponse_rawData' - An array that contains the raw data for each report.
--
-- 'stats', 'getReportGroupTrendResponse_stats' - Contains the accumulated trend data.
--
-- 'httpStatus', 'getReportGroupTrendResponse_httpStatus' - The response's http status code.
newGetReportGroupTrendResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetReportGroupTrendResponse
newGetReportGroupTrendResponse :: Int -> GetReportGroupTrendResponse
newGetReportGroupTrendResponse Int
pHttpStatus_ =
  GetReportGroupTrendResponse'
    { $sel:rawData:GetReportGroupTrendResponse' :: Maybe [ReportWithRawData]
rawData =
        forall a. Maybe a
Prelude.Nothing,
      $sel:stats:GetReportGroupTrendResponse' :: Maybe ReportGroupTrendStats
stats = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetReportGroupTrendResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array that contains the raw data for each report.
getReportGroupTrendResponse_rawData :: Lens.Lens' GetReportGroupTrendResponse (Prelude.Maybe [ReportWithRawData])
getReportGroupTrendResponse_rawData :: Lens' GetReportGroupTrendResponse (Maybe [ReportWithRawData])
getReportGroupTrendResponse_rawData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReportGroupTrendResponse' {Maybe [ReportWithRawData]
rawData :: Maybe [ReportWithRawData]
$sel:rawData:GetReportGroupTrendResponse' :: GetReportGroupTrendResponse -> Maybe [ReportWithRawData]
rawData} -> Maybe [ReportWithRawData]
rawData) (\s :: GetReportGroupTrendResponse
s@GetReportGroupTrendResponse' {} Maybe [ReportWithRawData]
a -> GetReportGroupTrendResponse
s {$sel:rawData:GetReportGroupTrendResponse' :: Maybe [ReportWithRawData]
rawData = Maybe [ReportWithRawData]
a} :: GetReportGroupTrendResponse) 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

-- | Contains the accumulated trend data.
getReportGroupTrendResponse_stats :: Lens.Lens' GetReportGroupTrendResponse (Prelude.Maybe ReportGroupTrendStats)
getReportGroupTrendResponse_stats :: Lens' GetReportGroupTrendResponse (Maybe ReportGroupTrendStats)
getReportGroupTrendResponse_stats = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReportGroupTrendResponse' {Maybe ReportGroupTrendStats
stats :: Maybe ReportGroupTrendStats
$sel:stats:GetReportGroupTrendResponse' :: GetReportGroupTrendResponse -> Maybe ReportGroupTrendStats
stats} -> Maybe ReportGroupTrendStats
stats) (\s :: GetReportGroupTrendResponse
s@GetReportGroupTrendResponse' {} Maybe ReportGroupTrendStats
a -> GetReportGroupTrendResponse
s {$sel:stats:GetReportGroupTrendResponse' :: Maybe ReportGroupTrendStats
stats = Maybe ReportGroupTrendStats
a} :: GetReportGroupTrendResponse)

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

instance Prelude.NFData GetReportGroupTrendResponse where
  rnf :: GetReportGroupTrendResponse -> ()
rnf GetReportGroupTrendResponse' {Int
Maybe [ReportWithRawData]
Maybe ReportGroupTrendStats
httpStatus :: Int
stats :: Maybe ReportGroupTrendStats
rawData :: Maybe [ReportWithRawData]
$sel:httpStatus:GetReportGroupTrendResponse' :: GetReportGroupTrendResponse -> Int
$sel:stats:GetReportGroupTrendResponse' :: GetReportGroupTrendResponse -> Maybe ReportGroupTrendStats
$sel:rawData:GetReportGroupTrendResponse' :: GetReportGroupTrendResponse -> Maybe [ReportWithRawData]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ReportWithRawData]
rawData
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReportGroupTrendStats
stats
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus