{-# 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.CodeGuruProfiler.GetFindingsReportAccountSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of
-- <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_FindingsReportSummary.html FindingsReportSummary>
-- objects that contain analysis results for all profiling groups in your
-- AWS account.
module Amazonka.CodeGuruProfiler.GetFindingsReportAccountSummary
  ( -- * Creating a Request
    GetFindingsReportAccountSummary (..),
    newGetFindingsReportAccountSummary,

    -- * Request Lenses
    getFindingsReportAccountSummary_nextToken,
    getFindingsReportAccountSummary_dailyReportsOnly,
    getFindingsReportAccountSummary_maxResults,

    -- * Destructuring the Response
    GetFindingsReportAccountSummaryResponse (..),
    newGetFindingsReportAccountSummaryResponse,

    -- * Response Lenses
    getFindingsReportAccountSummaryResponse_nextToken,
    getFindingsReportAccountSummaryResponse_httpStatus,
    getFindingsReportAccountSummaryResponse_reportSummaries,
  )
where

import Amazonka.CodeGuruProfiler.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | The structure representing the GetFindingsReportAccountSummaryRequest.
--
-- /See:/ 'newGetFindingsReportAccountSummary' smart constructor.
data GetFindingsReportAccountSummary = GetFindingsReportAccountSummary'
  { -- | The @nextToken@ value returned from a previous paginated
    -- @GetFindingsReportAccountSummary@ request where @maxResults@ was used
    -- and the results exceeded the value of that parameter. Pagination
    -- continues from the end of the previous results that returned the
    -- @nextToken@ value.
    --
    -- This token should be treated as an opaque identifier that is only used
    -- to retrieve the next items in a list and not for other programmatic
    -- purposes.
    GetFindingsReportAccountSummary -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A @Boolean@ value indicating whether to only return reports from daily
    -- profiles. If set to @True@, only analysis data from daily profiles is
    -- returned. If set to @False@, analysis data is returned from smaller time
    -- windows (for example, one hour).
    GetFindingsReportAccountSummary -> Maybe Bool
dailyReportsOnly :: Prelude.Maybe Prelude.Bool,
    -- | The maximum number of results returned by
    -- @ GetFindingsReportAccountSummary@ in paginated output. When this
    -- parameter is used, @GetFindingsReportAccountSummary@ only returns
    -- @maxResults@ results in a single page along with a @nextToken@ response
    -- element. The remaining results of the initial request can be seen by
    -- sending another @GetFindingsReportAccountSummary@ request with the
    -- returned @nextToken@ value.
    GetFindingsReportAccountSummary -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (GetFindingsReportAccountSummary
-> GetFindingsReportAccountSummary -> Bool
(GetFindingsReportAccountSummary
 -> GetFindingsReportAccountSummary -> Bool)
-> (GetFindingsReportAccountSummary
    -> GetFindingsReportAccountSummary -> Bool)
-> Eq GetFindingsReportAccountSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFindingsReportAccountSummary
-> GetFindingsReportAccountSummary -> Bool
$c/= :: GetFindingsReportAccountSummary
-> GetFindingsReportAccountSummary -> Bool
== :: GetFindingsReportAccountSummary
-> GetFindingsReportAccountSummary -> Bool
$c== :: GetFindingsReportAccountSummary
-> GetFindingsReportAccountSummary -> Bool
Prelude.Eq, ReadPrec [GetFindingsReportAccountSummary]
ReadPrec GetFindingsReportAccountSummary
Int -> ReadS GetFindingsReportAccountSummary
ReadS [GetFindingsReportAccountSummary]
(Int -> ReadS GetFindingsReportAccountSummary)
-> ReadS [GetFindingsReportAccountSummary]
-> ReadPrec GetFindingsReportAccountSummary
-> ReadPrec [GetFindingsReportAccountSummary]
-> Read GetFindingsReportAccountSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFindingsReportAccountSummary]
$creadListPrec :: ReadPrec [GetFindingsReportAccountSummary]
readPrec :: ReadPrec GetFindingsReportAccountSummary
$creadPrec :: ReadPrec GetFindingsReportAccountSummary
readList :: ReadS [GetFindingsReportAccountSummary]
$creadList :: ReadS [GetFindingsReportAccountSummary]
readsPrec :: Int -> ReadS GetFindingsReportAccountSummary
$creadsPrec :: Int -> ReadS GetFindingsReportAccountSummary
Prelude.Read, Int -> GetFindingsReportAccountSummary -> ShowS
[GetFindingsReportAccountSummary] -> ShowS
GetFindingsReportAccountSummary -> String
(Int -> GetFindingsReportAccountSummary -> ShowS)
-> (GetFindingsReportAccountSummary -> String)
-> ([GetFindingsReportAccountSummary] -> ShowS)
-> Show GetFindingsReportAccountSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFindingsReportAccountSummary] -> ShowS
$cshowList :: [GetFindingsReportAccountSummary] -> ShowS
show :: GetFindingsReportAccountSummary -> String
$cshow :: GetFindingsReportAccountSummary -> String
showsPrec :: Int -> GetFindingsReportAccountSummary -> ShowS
$cshowsPrec :: Int -> GetFindingsReportAccountSummary -> ShowS
Prelude.Show, (forall x.
 GetFindingsReportAccountSummary
 -> Rep GetFindingsReportAccountSummary x)
-> (forall x.
    Rep GetFindingsReportAccountSummary x
    -> GetFindingsReportAccountSummary)
-> Generic GetFindingsReportAccountSummary
forall x.
Rep GetFindingsReportAccountSummary x
-> GetFindingsReportAccountSummary
forall x.
GetFindingsReportAccountSummary
-> Rep GetFindingsReportAccountSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFindingsReportAccountSummary x
-> GetFindingsReportAccountSummary
$cfrom :: forall x.
GetFindingsReportAccountSummary
-> Rep GetFindingsReportAccountSummary x
Prelude.Generic)

-- |
-- Create a value of 'GetFindingsReportAccountSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'getFindingsReportAccountSummary_nextToken' - The @nextToken@ value returned from a previous paginated
-- @GetFindingsReportAccountSummary@ request where @maxResults@ was used
-- and the results exceeded the value of that parameter. Pagination
-- continues from the end of the previous results that returned the
-- @nextToken@ value.
--
-- This token should be treated as an opaque identifier that is only used
-- to retrieve the next items in a list and not for other programmatic
-- purposes.
--
-- 'dailyReportsOnly', 'getFindingsReportAccountSummary_dailyReportsOnly' - A @Boolean@ value indicating whether to only return reports from daily
-- profiles. If set to @True@, only analysis data from daily profiles is
-- returned. If set to @False@, analysis data is returned from smaller time
-- windows (for example, one hour).
--
-- 'maxResults', 'getFindingsReportAccountSummary_maxResults' - The maximum number of results returned by
-- @ GetFindingsReportAccountSummary@ in paginated output. When this
-- parameter is used, @GetFindingsReportAccountSummary@ only returns
-- @maxResults@ results in a single page along with a @nextToken@ response
-- element. The remaining results of the initial request can be seen by
-- sending another @GetFindingsReportAccountSummary@ request with the
-- returned @nextToken@ value.
newGetFindingsReportAccountSummary ::
  GetFindingsReportAccountSummary
newGetFindingsReportAccountSummary :: GetFindingsReportAccountSummary
newGetFindingsReportAccountSummary =
  GetFindingsReportAccountSummary' :: Maybe Text
-> Maybe Bool -> Maybe Natural -> GetFindingsReportAccountSummary
GetFindingsReportAccountSummary'
    { $sel:nextToken:GetFindingsReportAccountSummary' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dailyReportsOnly:GetFindingsReportAccountSummary' :: Maybe Bool
dailyReportsOnly = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetFindingsReportAccountSummary' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The @nextToken@ value returned from a previous paginated
-- @GetFindingsReportAccountSummary@ request where @maxResults@ was used
-- and the results exceeded the value of that parameter. Pagination
-- continues from the end of the previous results that returned the
-- @nextToken@ value.
--
-- This token should be treated as an opaque identifier that is only used
-- to retrieve the next items in a list and not for other programmatic
-- purposes.
getFindingsReportAccountSummary_nextToken :: Lens.Lens' GetFindingsReportAccountSummary (Prelude.Maybe Prelude.Text)
getFindingsReportAccountSummary_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetFindingsReportAccountSummary
-> f GetFindingsReportAccountSummary
getFindingsReportAccountSummary_nextToken = (GetFindingsReportAccountSummary -> Maybe Text)
-> (GetFindingsReportAccountSummary
    -> Maybe Text -> GetFindingsReportAccountSummary)
-> Lens
     GetFindingsReportAccountSummary
     GetFindingsReportAccountSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsReportAccountSummary' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetFindingsReportAccountSummary' :: GetFindingsReportAccountSummary -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetFindingsReportAccountSummary
s@GetFindingsReportAccountSummary' {} Maybe Text
a -> GetFindingsReportAccountSummary
s {$sel:nextToken:GetFindingsReportAccountSummary' :: Maybe Text
nextToken = Maybe Text
a} :: GetFindingsReportAccountSummary)

-- | A @Boolean@ value indicating whether to only return reports from daily
-- profiles. If set to @True@, only analysis data from daily profiles is
-- returned. If set to @False@, analysis data is returned from smaller time
-- windows (for example, one hour).
getFindingsReportAccountSummary_dailyReportsOnly :: Lens.Lens' GetFindingsReportAccountSummary (Prelude.Maybe Prelude.Bool)
getFindingsReportAccountSummary_dailyReportsOnly :: (Maybe Bool -> f (Maybe Bool))
-> GetFindingsReportAccountSummary
-> f GetFindingsReportAccountSummary
getFindingsReportAccountSummary_dailyReportsOnly = (GetFindingsReportAccountSummary -> Maybe Bool)
-> (GetFindingsReportAccountSummary
    -> Maybe Bool -> GetFindingsReportAccountSummary)
-> Lens
     GetFindingsReportAccountSummary
     GetFindingsReportAccountSummary
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsReportAccountSummary' {Maybe Bool
dailyReportsOnly :: Maybe Bool
$sel:dailyReportsOnly:GetFindingsReportAccountSummary' :: GetFindingsReportAccountSummary -> Maybe Bool
dailyReportsOnly} -> Maybe Bool
dailyReportsOnly) (\s :: GetFindingsReportAccountSummary
s@GetFindingsReportAccountSummary' {} Maybe Bool
a -> GetFindingsReportAccountSummary
s {$sel:dailyReportsOnly:GetFindingsReportAccountSummary' :: Maybe Bool
dailyReportsOnly = Maybe Bool
a} :: GetFindingsReportAccountSummary)

-- | The maximum number of results returned by
-- @ GetFindingsReportAccountSummary@ in paginated output. When this
-- parameter is used, @GetFindingsReportAccountSummary@ only returns
-- @maxResults@ results in a single page along with a @nextToken@ response
-- element. The remaining results of the initial request can be seen by
-- sending another @GetFindingsReportAccountSummary@ request with the
-- returned @nextToken@ value.
getFindingsReportAccountSummary_maxResults :: Lens.Lens' GetFindingsReportAccountSummary (Prelude.Maybe Prelude.Natural)
getFindingsReportAccountSummary_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetFindingsReportAccountSummary
-> f GetFindingsReportAccountSummary
getFindingsReportAccountSummary_maxResults = (GetFindingsReportAccountSummary -> Maybe Natural)
-> (GetFindingsReportAccountSummary
    -> Maybe Natural -> GetFindingsReportAccountSummary)
-> Lens
     GetFindingsReportAccountSummary
     GetFindingsReportAccountSummary
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsReportAccountSummary' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetFindingsReportAccountSummary' :: GetFindingsReportAccountSummary -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetFindingsReportAccountSummary
s@GetFindingsReportAccountSummary' {} Maybe Natural
a -> GetFindingsReportAccountSummary
s {$sel:maxResults:GetFindingsReportAccountSummary' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetFindingsReportAccountSummary)

instance
  Core.AWSRequest
    GetFindingsReportAccountSummary
  where
  type
    AWSResponse GetFindingsReportAccountSummary =
      GetFindingsReportAccountSummaryResponse
  request :: GetFindingsReportAccountSummary
-> Request GetFindingsReportAccountSummary
request = Service
-> GetFindingsReportAccountSummary
-> Request GetFindingsReportAccountSummary
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetFindingsReportAccountSummary
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetFindingsReportAccountSummary)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetFindingsReportAccountSummary))
-> Logger
-> Service
-> Proxy GetFindingsReportAccountSummary
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetFindingsReportAccountSummary)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Int
-> [FindingsReportSummary]
-> GetFindingsReportAccountSummaryResponse
GetFindingsReportAccountSummaryResponse'
            (Maybe Text
 -> Int
 -> [FindingsReportSummary]
 -> GetFindingsReportAccountSummaryResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> [FindingsReportSummary]
      -> GetFindingsReportAccountSummaryResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
            Either
  String
  (Int
   -> [FindingsReportSummary]
   -> GetFindingsReportAccountSummaryResponse)
-> Either String Int
-> Either
     String
     ([FindingsReportSummary]
      -> GetFindingsReportAccountSummaryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  ([FindingsReportSummary]
   -> GetFindingsReportAccountSummaryResponse)
-> Either String [FindingsReportSummary]
-> Either String GetFindingsReportAccountSummaryResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [FindingsReportSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"reportSummaries"
                            Either String (Maybe [FindingsReportSummary])
-> [FindingsReportSummary] -> Either String [FindingsReportSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [FindingsReportSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    GetFindingsReportAccountSummary

instance
  Prelude.NFData
    GetFindingsReportAccountSummary

instance
  Core.ToHeaders
    GetFindingsReportAccountSummary
  where
  toHeaders :: GetFindingsReportAccountSummary -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> GetFindingsReportAccountSummary -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

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

instance Core.ToQuery GetFindingsReportAccountSummary where
  toQuery :: GetFindingsReportAccountSummary -> QueryString
toQuery GetFindingsReportAccountSummary' {Maybe Bool
Maybe Natural
Maybe Text
maxResults :: Maybe Natural
dailyReportsOnly :: Maybe Bool
nextToken :: Maybe Text
$sel:maxResults:GetFindingsReportAccountSummary' :: GetFindingsReportAccountSummary -> Maybe Natural
$sel:dailyReportsOnly:GetFindingsReportAccountSummary' :: GetFindingsReportAccountSummary -> Maybe Bool
$sel:nextToken:GetFindingsReportAccountSummary' :: GetFindingsReportAccountSummary -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"dailyReportsOnly" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
dailyReportsOnly,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | The structure representing the GetFindingsReportAccountSummaryResponse.
--
-- /See:/ 'newGetFindingsReportAccountSummaryResponse' smart constructor.
data GetFindingsReportAccountSummaryResponse = GetFindingsReportAccountSummaryResponse'
  { -- | The @nextToken@ value to include in a future
    -- @GetFindingsReportAccountSummary@ request. When the results of a
    -- @GetFindingsReportAccountSummary@ request exceed @maxResults@, this
    -- value can be used to retrieve the next page of results. This value is
    -- @null@ when there are no more results to return.
    GetFindingsReportAccountSummaryResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetFindingsReportAccountSummaryResponse -> Int
httpStatus :: Prelude.Int,
    -- | The return list of
    -- <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_FindingsReportSummary.html FindingsReportSummary>
    -- objects taht contain summaries of analysis results for all profiling
    -- groups in your AWS account.
    GetFindingsReportAccountSummaryResponse -> [FindingsReportSummary]
reportSummaries :: [FindingsReportSummary]
  }
  deriving (GetFindingsReportAccountSummaryResponse
-> GetFindingsReportAccountSummaryResponse -> Bool
(GetFindingsReportAccountSummaryResponse
 -> GetFindingsReportAccountSummaryResponse -> Bool)
-> (GetFindingsReportAccountSummaryResponse
    -> GetFindingsReportAccountSummaryResponse -> Bool)
-> Eq GetFindingsReportAccountSummaryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFindingsReportAccountSummaryResponse
-> GetFindingsReportAccountSummaryResponse -> Bool
$c/= :: GetFindingsReportAccountSummaryResponse
-> GetFindingsReportAccountSummaryResponse -> Bool
== :: GetFindingsReportAccountSummaryResponse
-> GetFindingsReportAccountSummaryResponse -> Bool
$c== :: GetFindingsReportAccountSummaryResponse
-> GetFindingsReportAccountSummaryResponse -> Bool
Prelude.Eq, ReadPrec [GetFindingsReportAccountSummaryResponse]
ReadPrec GetFindingsReportAccountSummaryResponse
Int -> ReadS GetFindingsReportAccountSummaryResponse
ReadS [GetFindingsReportAccountSummaryResponse]
(Int -> ReadS GetFindingsReportAccountSummaryResponse)
-> ReadS [GetFindingsReportAccountSummaryResponse]
-> ReadPrec GetFindingsReportAccountSummaryResponse
-> ReadPrec [GetFindingsReportAccountSummaryResponse]
-> Read GetFindingsReportAccountSummaryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFindingsReportAccountSummaryResponse]
$creadListPrec :: ReadPrec [GetFindingsReportAccountSummaryResponse]
readPrec :: ReadPrec GetFindingsReportAccountSummaryResponse
$creadPrec :: ReadPrec GetFindingsReportAccountSummaryResponse
readList :: ReadS [GetFindingsReportAccountSummaryResponse]
$creadList :: ReadS [GetFindingsReportAccountSummaryResponse]
readsPrec :: Int -> ReadS GetFindingsReportAccountSummaryResponse
$creadsPrec :: Int -> ReadS GetFindingsReportAccountSummaryResponse
Prelude.Read, Int -> GetFindingsReportAccountSummaryResponse -> ShowS
[GetFindingsReportAccountSummaryResponse] -> ShowS
GetFindingsReportAccountSummaryResponse -> String
(Int -> GetFindingsReportAccountSummaryResponse -> ShowS)
-> (GetFindingsReportAccountSummaryResponse -> String)
-> ([GetFindingsReportAccountSummaryResponse] -> ShowS)
-> Show GetFindingsReportAccountSummaryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFindingsReportAccountSummaryResponse] -> ShowS
$cshowList :: [GetFindingsReportAccountSummaryResponse] -> ShowS
show :: GetFindingsReportAccountSummaryResponse -> String
$cshow :: GetFindingsReportAccountSummaryResponse -> String
showsPrec :: Int -> GetFindingsReportAccountSummaryResponse -> ShowS
$cshowsPrec :: Int -> GetFindingsReportAccountSummaryResponse -> ShowS
Prelude.Show, (forall x.
 GetFindingsReportAccountSummaryResponse
 -> Rep GetFindingsReportAccountSummaryResponse x)
-> (forall x.
    Rep GetFindingsReportAccountSummaryResponse x
    -> GetFindingsReportAccountSummaryResponse)
-> Generic GetFindingsReportAccountSummaryResponse
forall x.
Rep GetFindingsReportAccountSummaryResponse x
-> GetFindingsReportAccountSummaryResponse
forall x.
GetFindingsReportAccountSummaryResponse
-> Rep GetFindingsReportAccountSummaryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFindingsReportAccountSummaryResponse x
-> GetFindingsReportAccountSummaryResponse
$cfrom :: forall x.
GetFindingsReportAccountSummaryResponse
-> Rep GetFindingsReportAccountSummaryResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetFindingsReportAccountSummaryResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'getFindingsReportAccountSummaryResponse_nextToken' - The @nextToken@ value to include in a future
-- @GetFindingsReportAccountSummary@ request. When the results of a
-- @GetFindingsReportAccountSummary@ request exceed @maxResults@, this
-- value can be used to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'httpStatus', 'getFindingsReportAccountSummaryResponse_httpStatus' - The response's http status code.
--
-- 'reportSummaries', 'getFindingsReportAccountSummaryResponse_reportSummaries' - The return list of
-- <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_FindingsReportSummary.html FindingsReportSummary>
-- objects taht contain summaries of analysis results for all profiling
-- groups in your AWS account.
newGetFindingsReportAccountSummaryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetFindingsReportAccountSummaryResponse
newGetFindingsReportAccountSummaryResponse :: Int -> GetFindingsReportAccountSummaryResponse
newGetFindingsReportAccountSummaryResponse
  Int
pHttpStatus_ =
    GetFindingsReportAccountSummaryResponse' :: Maybe Text
-> Int
-> [FindingsReportSummary]
-> GetFindingsReportAccountSummaryResponse
GetFindingsReportAccountSummaryResponse'
      { $sel:nextToken:GetFindingsReportAccountSummaryResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetFindingsReportAccountSummaryResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:reportSummaries:GetFindingsReportAccountSummaryResponse' :: [FindingsReportSummary]
reportSummaries = [FindingsReportSummary]
forall a. Monoid a => a
Prelude.mempty
      }

-- | The @nextToken@ value to include in a future
-- @GetFindingsReportAccountSummary@ request. When the results of a
-- @GetFindingsReportAccountSummary@ request exceed @maxResults@, this
-- value can be used to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
getFindingsReportAccountSummaryResponse_nextToken :: Lens.Lens' GetFindingsReportAccountSummaryResponse (Prelude.Maybe Prelude.Text)
getFindingsReportAccountSummaryResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetFindingsReportAccountSummaryResponse
-> f GetFindingsReportAccountSummaryResponse
getFindingsReportAccountSummaryResponse_nextToken = (GetFindingsReportAccountSummaryResponse -> Maybe Text)
-> (GetFindingsReportAccountSummaryResponse
    -> Maybe Text -> GetFindingsReportAccountSummaryResponse)
-> Lens
     GetFindingsReportAccountSummaryResponse
     GetFindingsReportAccountSummaryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsReportAccountSummaryResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetFindingsReportAccountSummaryResponse' :: GetFindingsReportAccountSummaryResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetFindingsReportAccountSummaryResponse
s@GetFindingsReportAccountSummaryResponse' {} Maybe Text
a -> GetFindingsReportAccountSummaryResponse
s {$sel:nextToken:GetFindingsReportAccountSummaryResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetFindingsReportAccountSummaryResponse)

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

-- | The return list of
-- <https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_FindingsReportSummary.html FindingsReportSummary>
-- objects taht contain summaries of analysis results for all profiling
-- groups in your AWS account.
getFindingsReportAccountSummaryResponse_reportSummaries :: Lens.Lens' GetFindingsReportAccountSummaryResponse [FindingsReportSummary]
getFindingsReportAccountSummaryResponse_reportSummaries :: ([FindingsReportSummary] -> f [FindingsReportSummary])
-> GetFindingsReportAccountSummaryResponse
-> f GetFindingsReportAccountSummaryResponse
getFindingsReportAccountSummaryResponse_reportSummaries = (GetFindingsReportAccountSummaryResponse
 -> [FindingsReportSummary])
-> (GetFindingsReportAccountSummaryResponse
    -> [FindingsReportSummary]
    -> GetFindingsReportAccountSummaryResponse)
-> Lens
     GetFindingsReportAccountSummaryResponse
     GetFindingsReportAccountSummaryResponse
     [FindingsReportSummary]
     [FindingsReportSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsReportAccountSummaryResponse' {[FindingsReportSummary]
reportSummaries :: [FindingsReportSummary]
$sel:reportSummaries:GetFindingsReportAccountSummaryResponse' :: GetFindingsReportAccountSummaryResponse -> [FindingsReportSummary]
reportSummaries} -> [FindingsReportSummary]
reportSummaries) (\s :: GetFindingsReportAccountSummaryResponse
s@GetFindingsReportAccountSummaryResponse' {} [FindingsReportSummary]
a -> GetFindingsReportAccountSummaryResponse
s {$sel:reportSummaries:GetFindingsReportAccountSummaryResponse' :: [FindingsReportSummary]
reportSummaries = [FindingsReportSummary]
a} :: GetFindingsReportAccountSummaryResponse) (([FindingsReportSummary] -> f [FindingsReportSummary])
 -> GetFindingsReportAccountSummaryResponse
 -> f GetFindingsReportAccountSummaryResponse)
-> (([FindingsReportSummary] -> f [FindingsReportSummary])
    -> [FindingsReportSummary] -> f [FindingsReportSummary])
-> ([FindingsReportSummary] -> f [FindingsReportSummary])
-> GetFindingsReportAccountSummaryResponse
-> f GetFindingsReportAccountSummaryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([FindingsReportSummary] -> f [FindingsReportSummary])
-> [FindingsReportSummary] -> f [FindingsReportSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    GetFindingsReportAccountSummaryResponse