{-# 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.Backup.ListReportJobs
-- 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 details about your report jobs.
module Amazonka.Backup.ListReportJobs
  ( -- * Creating a Request
    ListReportJobs (..),
    newListReportJobs,

    -- * Request Lenses
    listReportJobs_byStatus,
    listReportJobs_byReportPlanName,
    listReportJobs_nextToken,
    listReportJobs_byCreationBefore,
    listReportJobs_byCreationAfter,
    listReportJobs_maxResults,

    -- * Destructuring the Response
    ListReportJobsResponse (..),
    newListReportJobsResponse,

    -- * Response Lenses
    listReportJobsResponse_reportJobs,
    listReportJobsResponse_nextToken,
    listReportJobsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListReportJobs' smart constructor.
data ListReportJobs = ListReportJobs'
  { -- | Returns only report jobs that are in the specified status. The statuses
    -- are:
    --
    -- @CREATED | RUNNING | COMPLETED | FAILED@
    ListReportJobs -> Maybe Text
byStatus :: Prelude.Maybe Prelude.Text,
    -- | Returns only report jobs with the specified report plan name.
    ListReportJobs -> Maybe Text
byReportPlanName :: Prelude.Maybe Prelude.Text,
    -- | An identifier that was returned from the previous call to this
    -- operation, which can be used to return the next set of items in the
    -- list.
    ListReportJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Returns only report jobs that were created before the date and time
    -- specified in Unix format and Coordinated Universal Time (UTC). For
    -- example, the value 1516925490 represents Friday, January 26, 2018
    -- 12:11:30 AM.
    ListReportJobs -> Maybe POSIX
byCreationBefore :: Prelude.Maybe Core.POSIX,
    -- | Returns only report jobs that were created after the date and time
    -- specified in Unix format and Coordinated Universal Time (UTC). For
    -- example, the value 1516925490 represents Friday, January 26, 2018
    -- 12:11:30 AM.
    ListReportJobs -> Maybe POSIX
byCreationAfter :: Prelude.Maybe Core.POSIX,
    -- | The number of desired results from 1 to 1000. Optional. If unspecified,
    -- the query will return 1 MB of data.
    ListReportJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListReportJobs -> ListReportJobs -> Bool
(ListReportJobs -> ListReportJobs -> Bool)
-> (ListReportJobs -> ListReportJobs -> Bool) -> Eq ListReportJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReportJobs -> ListReportJobs -> Bool
$c/= :: ListReportJobs -> ListReportJobs -> Bool
== :: ListReportJobs -> ListReportJobs -> Bool
$c== :: ListReportJobs -> ListReportJobs -> Bool
Prelude.Eq, ReadPrec [ListReportJobs]
ReadPrec ListReportJobs
Int -> ReadS ListReportJobs
ReadS [ListReportJobs]
(Int -> ReadS ListReportJobs)
-> ReadS [ListReportJobs]
-> ReadPrec ListReportJobs
-> ReadPrec [ListReportJobs]
-> Read ListReportJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReportJobs]
$creadListPrec :: ReadPrec [ListReportJobs]
readPrec :: ReadPrec ListReportJobs
$creadPrec :: ReadPrec ListReportJobs
readList :: ReadS [ListReportJobs]
$creadList :: ReadS [ListReportJobs]
readsPrec :: Int -> ReadS ListReportJobs
$creadsPrec :: Int -> ReadS ListReportJobs
Prelude.Read, Int -> ListReportJobs -> ShowS
[ListReportJobs] -> ShowS
ListReportJobs -> String
(Int -> ListReportJobs -> ShowS)
-> (ListReportJobs -> String)
-> ([ListReportJobs] -> ShowS)
-> Show ListReportJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReportJobs] -> ShowS
$cshowList :: [ListReportJobs] -> ShowS
show :: ListReportJobs -> String
$cshow :: ListReportJobs -> String
showsPrec :: Int -> ListReportJobs -> ShowS
$cshowsPrec :: Int -> ListReportJobs -> ShowS
Prelude.Show, (forall x. ListReportJobs -> Rep ListReportJobs x)
-> (forall x. Rep ListReportJobs x -> ListReportJobs)
-> Generic ListReportJobs
forall x. Rep ListReportJobs x -> ListReportJobs
forall x. ListReportJobs -> Rep ListReportJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListReportJobs x -> ListReportJobs
$cfrom :: forall x. ListReportJobs -> Rep ListReportJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListReportJobs' 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:
--
-- 'byStatus', 'listReportJobs_byStatus' - Returns only report jobs that are in the specified status. The statuses
-- are:
--
-- @CREATED | RUNNING | COMPLETED | FAILED@
--
-- 'byReportPlanName', 'listReportJobs_byReportPlanName' - Returns only report jobs with the specified report plan name.
--
-- 'nextToken', 'listReportJobs_nextToken' - An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
--
-- 'byCreationBefore', 'listReportJobs_byCreationBefore' - Returns only report jobs that were created before the date and time
-- specified in Unix format and Coordinated Universal Time (UTC). For
-- example, the value 1516925490 represents Friday, January 26, 2018
-- 12:11:30 AM.
--
-- 'byCreationAfter', 'listReportJobs_byCreationAfter' - Returns only report jobs that were created after the date and time
-- specified in Unix format and Coordinated Universal Time (UTC). For
-- example, the value 1516925490 represents Friday, January 26, 2018
-- 12:11:30 AM.
--
-- 'maxResults', 'listReportJobs_maxResults' - The number of desired results from 1 to 1000. Optional. If unspecified,
-- the query will return 1 MB of data.
newListReportJobs ::
  ListReportJobs
newListReportJobs :: ListReportJobs
newListReportJobs =
  ListReportJobs' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Natural
-> ListReportJobs
ListReportJobs'
    { $sel:byStatus:ListReportJobs' :: Maybe Text
byStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:byReportPlanName:ListReportJobs' :: Maybe Text
byReportPlanName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReportJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:byCreationBefore:ListReportJobs' :: Maybe POSIX
byCreationBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:byCreationAfter:ListReportJobs' :: Maybe POSIX
byCreationAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListReportJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Returns only report jobs that are in the specified status. The statuses
-- are:
--
-- @CREATED | RUNNING | COMPLETED | FAILED@
listReportJobs_byStatus :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.Text)
listReportJobs_byStatus :: (Maybe Text -> f (Maybe Text))
-> ListReportJobs -> f ListReportJobs
listReportJobs_byStatus = (ListReportJobs -> Maybe Text)
-> (ListReportJobs -> Maybe Text -> ListReportJobs)
-> Lens ListReportJobs ListReportJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReportJobs' {Maybe Text
byStatus :: Maybe Text
$sel:byStatus:ListReportJobs' :: ListReportJobs -> Maybe Text
byStatus} -> Maybe Text
byStatus) (\s :: ListReportJobs
s@ListReportJobs' {} Maybe Text
a -> ListReportJobs
s {$sel:byStatus:ListReportJobs' :: Maybe Text
byStatus = Maybe Text
a} :: ListReportJobs)

-- | Returns only report jobs with the specified report plan name.
listReportJobs_byReportPlanName :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.Text)
listReportJobs_byReportPlanName :: (Maybe Text -> f (Maybe Text))
-> ListReportJobs -> f ListReportJobs
listReportJobs_byReportPlanName = (ListReportJobs -> Maybe Text)
-> (ListReportJobs -> Maybe Text -> ListReportJobs)
-> Lens ListReportJobs ListReportJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReportJobs' {Maybe Text
byReportPlanName :: Maybe Text
$sel:byReportPlanName:ListReportJobs' :: ListReportJobs -> Maybe Text
byReportPlanName} -> Maybe Text
byReportPlanName) (\s :: ListReportJobs
s@ListReportJobs' {} Maybe Text
a -> ListReportJobs
s {$sel:byReportPlanName:ListReportJobs' :: Maybe Text
byReportPlanName = Maybe Text
a} :: ListReportJobs)

-- | An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
listReportJobs_nextToken :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.Text)
listReportJobs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListReportJobs -> f ListReportJobs
listReportJobs_nextToken = (ListReportJobs -> Maybe Text)
-> (ListReportJobs -> Maybe Text -> ListReportJobs)
-> Lens ListReportJobs ListReportJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReportJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReportJobs' :: ListReportJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReportJobs
s@ListReportJobs' {} Maybe Text
a -> ListReportJobs
s {$sel:nextToken:ListReportJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListReportJobs)

-- | Returns only report jobs that were created before the date and time
-- specified in Unix format and Coordinated Universal Time (UTC). For
-- example, the value 1516925490 represents Friday, January 26, 2018
-- 12:11:30 AM.
listReportJobs_byCreationBefore :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.UTCTime)
listReportJobs_byCreationBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListReportJobs -> f ListReportJobs
listReportJobs_byCreationBefore = (ListReportJobs -> Maybe POSIX)
-> (ListReportJobs -> Maybe POSIX -> ListReportJobs)
-> Lens ListReportJobs ListReportJobs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReportJobs' {Maybe POSIX
byCreationBefore :: Maybe POSIX
$sel:byCreationBefore:ListReportJobs' :: ListReportJobs -> Maybe POSIX
byCreationBefore} -> Maybe POSIX
byCreationBefore) (\s :: ListReportJobs
s@ListReportJobs' {} Maybe POSIX
a -> ListReportJobs
s {$sel:byCreationBefore:ListReportJobs' :: Maybe POSIX
byCreationBefore = Maybe POSIX
a} :: ListReportJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListReportJobs -> f ListReportJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListReportJobs
-> f ListReportJobs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Returns only report jobs that were created after the date and time
-- specified in Unix format and Coordinated Universal Time (UTC). For
-- example, the value 1516925490 represents Friday, January 26, 2018
-- 12:11:30 AM.
listReportJobs_byCreationAfter :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.UTCTime)
listReportJobs_byCreationAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListReportJobs -> f ListReportJobs
listReportJobs_byCreationAfter = (ListReportJobs -> Maybe POSIX)
-> (ListReportJobs -> Maybe POSIX -> ListReportJobs)
-> Lens ListReportJobs ListReportJobs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReportJobs' {Maybe POSIX
byCreationAfter :: Maybe POSIX
$sel:byCreationAfter:ListReportJobs' :: ListReportJobs -> Maybe POSIX
byCreationAfter} -> Maybe POSIX
byCreationAfter) (\s :: ListReportJobs
s@ListReportJobs' {} Maybe POSIX
a -> ListReportJobs
s {$sel:byCreationAfter:ListReportJobs' :: Maybe POSIX
byCreationAfter = Maybe POSIX
a} :: ListReportJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListReportJobs -> f ListReportJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListReportJobs
-> f ListReportJobs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The number of desired results from 1 to 1000. Optional. If unspecified,
-- the query will return 1 MB of data.
listReportJobs_maxResults :: Lens.Lens' ListReportJobs (Prelude.Maybe Prelude.Natural)
listReportJobs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListReportJobs -> f ListReportJobs
listReportJobs_maxResults = (ListReportJobs -> Maybe Natural)
-> (ListReportJobs -> Maybe Natural -> ListReportJobs)
-> Lens
     ListReportJobs ListReportJobs (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReportJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListReportJobs' :: ListReportJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListReportJobs
s@ListReportJobs' {} Maybe Natural
a -> ListReportJobs
s {$sel:maxResults:ListReportJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListReportJobs)

instance Core.AWSRequest ListReportJobs where
  type
    AWSResponse ListReportJobs =
      ListReportJobsResponse
  request :: ListReportJobs -> Request ListReportJobs
request = Service -> ListReportJobs -> Request ListReportJobs
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListReportJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListReportJobs)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListReportJobs))
-> Logger
-> Service
-> Proxy ListReportJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListReportJobs)))
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 [ReportJob] -> Maybe Text -> Int -> ListReportJobsResponse
ListReportJobsResponse'
            (Maybe [ReportJob] -> Maybe Text -> Int -> ListReportJobsResponse)
-> Either String (Maybe [ReportJob])
-> Either String (Maybe Text -> Int -> ListReportJobsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [ReportJob]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReportJobs" Either String (Maybe (Maybe [ReportJob]))
-> Maybe [ReportJob] -> Either String (Maybe [ReportJob])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ReportJob]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListReportJobsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListReportJobsResponse)
forall (f :: * -> *) a b. Applicative f => 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 -> ListReportJobsResponse)
-> Either String Int -> Either String ListReportJobsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListReportJobs

instance Prelude.NFData ListReportJobs

instance Core.ToHeaders ListReportJobs where
  toHeaders :: ListReportJobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListReportJobs -> 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 ListReportJobs where
  toPath :: ListReportJobs -> ByteString
toPath = ByteString -> ListReportJobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/audit/report-jobs"

instance Core.ToQuery ListReportJobs where
  toQuery :: ListReportJobs -> QueryString
toQuery ListReportJobs' {Maybe Natural
Maybe Text
Maybe POSIX
maxResults :: Maybe Natural
byCreationAfter :: Maybe POSIX
byCreationBefore :: Maybe POSIX
nextToken :: Maybe Text
byReportPlanName :: Maybe Text
byStatus :: Maybe Text
$sel:maxResults:ListReportJobs' :: ListReportJobs -> Maybe Natural
$sel:byCreationAfter:ListReportJobs' :: ListReportJobs -> Maybe POSIX
$sel:byCreationBefore:ListReportJobs' :: ListReportJobs -> Maybe POSIX
$sel:nextToken:ListReportJobs' :: ListReportJobs -> Maybe Text
$sel:byReportPlanName:ListReportJobs' :: ListReportJobs -> Maybe Text
$sel:byStatus:ListReportJobs' :: ListReportJobs -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Status" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
byStatus,
        ByteString
"ReportPlanName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
byReportPlanName,
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"CreationBefore" ByteString -> Maybe POSIX -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe POSIX
byCreationBefore,
        ByteString
"CreationAfter" ByteString -> Maybe POSIX -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe POSIX
byCreationAfter,
        ByteString
"MaxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListReportJobsResponse' smart constructor.
data ListReportJobsResponse = ListReportJobsResponse'
  { -- | Details about your report jobs in JSON format.
    ListReportJobsResponse -> Maybe [ReportJob]
reportJobs :: Prelude.Maybe [ReportJob],
    -- | An identifier that was returned from the previous call to this
    -- operation, which can be used to return the next set of items in the
    -- list.
    ListReportJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListReportJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListReportJobsResponse -> ListReportJobsResponse -> Bool
(ListReportJobsResponse -> ListReportJobsResponse -> Bool)
-> (ListReportJobsResponse -> ListReportJobsResponse -> Bool)
-> Eq ListReportJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReportJobsResponse -> ListReportJobsResponse -> Bool
$c/= :: ListReportJobsResponse -> ListReportJobsResponse -> Bool
== :: ListReportJobsResponse -> ListReportJobsResponse -> Bool
$c== :: ListReportJobsResponse -> ListReportJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListReportJobsResponse]
ReadPrec ListReportJobsResponse
Int -> ReadS ListReportJobsResponse
ReadS [ListReportJobsResponse]
(Int -> ReadS ListReportJobsResponse)
-> ReadS [ListReportJobsResponse]
-> ReadPrec ListReportJobsResponse
-> ReadPrec [ListReportJobsResponse]
-> Read ListReportJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReportJobsResponse]
$creadListPrec :: ReadPrec [ListReportJobsResponse]
readPrec :: ReadPrec ListReportJobsResponse
$creadPrec :: ReadPrec ListReportJobsResponse
readList :: ReadS [ListReportJobsResponse]
$creadList :: ReadS [ListReportJobsResponse]
readsPrec :: Int -> ReadS ListReportJobsResponse
$creadsPrec :: Int -> ReadS ListReportJobsResponse
Prelude.Read, Int -> ListReportJobsResponse -> ShowS
[ListReportJobsResponse] -> ShowS
ListReportJobsResponse -> String
(Int -> ListReportJobsResponse -> ShowS)
-> (ListReportJobsResponse -> String)
-> ([ListReportJobsResponse] -> ShowS)
-> Show ListReportJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReportJobsResponse] -> ShowS
$cshowList :: [ListReportJobsResponse] -> ShowS
show :: ListReportJobsResponse -> String
$cshow :: ListReportJobsResponse -> String
showsPrec :: Int -> ListReportJobsResponse -> ShowS
$cshowsPrec :: Int -> ListReportJobsResponse -> ShowS
Prelude.Show, (forall x. ListReportJobsResponse -> Rep ListReportJobsResponse x)
-> (forall x.
    Rep ListReportJobsResponse x -> ListReportJobsResponse)
-> Generic ListReportJobsResponse
forall x. Rep ListReportJobsResponse x -> ListReportJobsResponse
forall x. ListReportJobsResponse -> Rep ListReportJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListReportJobsResponse x -> ListReportJobsResponse
$cfrom :: forall x. ListReportJobsResponse -> Rep ListReportJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListReportJobsResponse' 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:
--
-- 'reportJobs', 'listReportJobsResponse_reportJobs' - Details about your report jobs in JSON format.
--
-- 'nextToken', 'listReportJobsResponse_nextToken' - An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
--
-- 'httpStatus', 'listReportJobsResponse_httpStatus' - The response's http status code.
newListReportJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListReportJobsResponse
newListReportJobsResponse :: Int -> ListReportJobsResponse
newListReportJobsResponse Int
pHttpStatus_ =
  ListReportJobsResponse' :: Maybe [ReportJob] -> Maybe Text -> Int -> ListReportJobsResponse
ListReportJobsResponse'
    { $sel:reportJobs:ListReportJobsResponse' :: Maybe [ReportJob]
reportJobs =
        Maybe [ReportJob]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReportJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListReportJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Details about your report jobs in JSON format.
listReportJobsResponse_reportJobs :: Lens.Lens' ListReportJobsResponse (Prelude.Maybe [ReportJob])
listReportJobsResponse_reportJobs :: (Maybe [ReportJob] -> f (Maybe [ReportJob]))
-> ListReportJobsResponse -> f ListReportJobsResponse
listReportJobsResponse_reportJobs = (ListReportJobsResponse -> Maybe [ReportJob])
-> (ListReportJobsResponse
    -> Maybe [ReportJob] -> ListReportJobsResponse)
-> Lens
     ListReportJobsResponse
     ListReportJobsResponse
     (Maybe [ReportJob])
     (Maybe [ReportJob])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReportJobsResponse' {Maybe [ReportJob]
reportJobs :: Maybe [ReportJob]
$sel:reportJobs:ListReportJobsResponse' :: ListReportJobsResponse -> Maybe [ReportJob]
reportJobs} -> Maybe [ReportJob]
reportJobs) (\s :: ListReportJobsResponse
s@ListReportJobsResponse' {} Maybe [ReportJob]
a -> ListReportJobsResponse
s {$sel:reportJobs:ListReportJobsResponse' :: Maybe [ReportJob]
reportJobs = Maybe [ReportJob]
a} :: ListReportJobsResponse) ((Maybe [ReportJob] -> f (Maybe [ReportJob]))
 -> ListReportJobsResponse -> f ListReportJobsResponse)
-> ((Maybe [ReportJob] -> f (Maybe [ReportJob]))
    -> Maybe [ReportJob] -> f (Maybe [ReportJob]))
-> (Maybe [ReportJob] -> f (Maybe [ReportJob]))
-> ListReportJobsResponse
-> f ListReportJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ReportJob] [ReportJob] [ReportJob] [ReportJob]
-> Iso
     (Maybe [ReportJob])
     (Maybe [ReportJob])
     (Maybe [ReportJob])
     (Maybe [ReportJob])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [ReportJob] [ReportJob] [ReportJob] [ReportJob]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
listReportJobsResponse_nextToken :: Lens.Lens' ListReportJobsResponse (Prelude.Maybe Prelude.Text)
listReportJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListReportJobsResponse -> f ListReportJobsResponse
listReportJobsResponse_nextToken = (ListReportJobsResponse -> Maybe Text)
-> (ListReportJobsResponse -> Maybe Text -> ListReportJobsResponse)
-> Lens
     ListReportJobsResponse
     ListReportJobsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReportJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReportJobsResponse' :: ListReportJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReportJobsResponse
s@ListReportJobsResponse' {} Maybe Text
a -> ListReportJobsResponse
s {$sel:nextToken:ListReportJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListReportJobsResponse)

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

instance Prelude.NFData ListReportJobsResponse