{-# 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.FraudDetector.GetBatchPredictionJobs
-- 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)
--
-- Gets all batch prediction jobs or a specific job if you specify a job
-- ID. This is a paginated API. If you provide a null maxResults, this
-- action retrieves a maximum of 50 records per page. If you provide a
-- maxResults, the value must be between 1 and 50. To get the next page
-- results, provide the pagination token from the
-- GetBatchPredictionJobsResponse as part of your request. A null
-- pagination token fetches the records from the beginning.
module Amazonka.FraudDetector.GetBatchPredictionJobs
  ( -- * Creating a Request
    GetBatchPredictionJobs (..),
    newGetBatchPredictionJobs,

    -- * Request Lenses
    getBatchPredictionJobs_jobId,
    getBatchPredictionJobs_nextToken,
    getBatchPredictionJobs_maxResults,

    -- * Destructuring the Response
    GetBatchPredictionJobsResponse (..),
    newGetBatchPredictionJobsResponse,

    -- * Response Lenses
    getBatchPredictionJobsResponse_batchPredictions,
    getBatchPredictionJobsResponse_nextToken,
    getBatchPredictionJobsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.Types
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:/ 'newGetBatchPredictionJobs' smart constructor.
data GetBatchPredictionJobs = GetBatchPredictionJobs'
  { -- | The batch prediction job for which to get the details.
    GetBatchPredictionJobs -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The next token from the previous request.
    GetBatchPredictionJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of objects to return for the request.
    GetBatchPredictionJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (GetBatchPredictionJobs -> GetBatchPredictionJobs -> Bool
(GetBatchPredictionJobs -> GetBatchPredictionJobs -> Bool)
-> (GetBatchPredictionJobs -> GetBatchPredictionJobs -> Bool)
-> Eq GetBatchPredictionJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBatchPredictionJobs -> GetBatchPredictionJobs -> Bool
$c/= :: GetBatchPredictionJobs -> GetBatchPredictionJobs -> Bool
== :: GetBatchPredictionJobs -> GetBatchPredictionJobs -> Bool
$c== :: GetBatchPredictionJobs -> GetBatchPredictionJobs -> Bool
Prelude.Eq, ReadPrec [GetBatchPredictionJobs]
ReadPrec GetBatchPredictionJobs
Int -> ReadS GetBatchPredictionJobs
ReadS [GetBatchPredictionJobs]
(Int -> ReadS GetBatchPredictionJobs)
-> ReadS [GetBatchPredictionJobs]
-> ReadPrec GetBatchPredictionJobs
-> ReadPrec [GetBatchPredictionJobs]
-> Read GetBatchPredictionJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBatchPredictionJobs]
$creadListPrec :: ReadPrec [GetBatchPredictionJobs]
readPrec :: ReadPrec GetBatchPredictionJobs
$creadPrec :: ReadPrec GetBatchPredictionJobs
readList :: ReadS [GetBatchPredictionJobs]
$creadList :: ReadS [GetBatchPredictionJobs]
readsPrec :: Int -> ReadS GetBatchPredictionJobs
$creadsPrec :: Int -> ReadS GetBatchPredictionJobs
Prelude.Read, Int -> GetBatchPredictionJobs -> ShowS
[GetBatchPredictionJobs] -> ShowS
GetBatchPredictionJobs -> String
(Int -> GetBatchPredictionJobs -> ShowS)
-> (GetBatchPredictionJobs -> String)
-> ([GetBatchPredictionJobs] -> ShowS)
-> Show GetBatchPredictionJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBatchPredictionJobs] -> ShowS
$cshowList :: [GetBatchPredictionJobs] -> ShowS
show :: GetBatchPredictionJobs -> String
$cshow :: GetBatchPredictionJobs -> String
showsPrec :: Int -> GetBatchPredictionJobs -> ShowS
$cshowsPrec :: Int -> GetBatchPredictionJobs -> ShowS
Prelude.Show, (forall x. GetBatchPredictionJobs -> Rep GetBatchPredictionJobs x)
-> (forall x.
    Rep GetBatchPredictionJobs x -> GetBatchPredictionJobs)
-> Generic GetBatchPredictionJobs
forall x. Rep GetBatchPredictionJobs x -> GetBatchPredictionJobs
forall x. GetBatchPredictionJobs -> Rep GetBatchPredictionJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBatchPredictionJobs x -> GetBatchPredictionJobs
$cfrom :: forall x. GetBatchPredictionJobs -> Rep GetBatchPredictionJobs x
Prelude.Generic)

-- |
-- Create a value of 'GetBatchPredictionJobs' 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:
--
-- 'jobId', 'getBatchPredictionJobs_jobId' - The batch prediction job for which to get the details.
--
-- 'nextToken', 'getBatchPredictionJobs_nextToken' - The next token from the previous request.
--
-- 'maxResults', 'getBatchPredictionJobs_maxResults' - The maximum number of objects to return for the request.
newGetBatchPredictionJobs ::
  GetBatchPredictionJobs
newGetBatchPredictionJobs :: GetBatchPredictionJobs
newGetBatchPredictionJobs =
  GetBatchPredictionJobs' :: Maybe Text -> Maybe Text -> Maybe Natural -> GetBatchPredictionJobs
GetBatchPredictionJobs'
    { $sel:jobId:GetBatchPredictionJobs' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetBatchPredictionJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetBatchPredictionJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The batch prediction job for which to get the details.
getBatchPredictionJobs_jobId :: Lens.Lens' GetBatchPredictionJobs (Prelude.Maybe Prelude.Text)
getBatchPredictionJobs_jobId :: (Maybe Text -> f (Maybe Text))
-> GetBatchPredictionJobs -> f GetBatchPredictionJobs
getBatchPredictionJobs_jobId = (GetBatchPredictionJobs -> Maybe Text)
-> (GetBatchPredictionJobs -> Maybe Text -> GetBatchPredictionJobs)
-> Lens
     GetBatchPredictionJobs
     GetBatchPredictionJobs
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBatchPredictionJobs' {Maybe Text
jobId :: Maybe Text
$sel:jobId:GetBatchPredictionJobs' :: GetBatchPredictionJobs -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: GetBatchPredictionJobs
s@GetBatchPredictionJobs' {} Maybe Text
a -> GetBatchPredictionJobs
s {$sel:jobId:GetBatchPredictionJobs' :: Maybe Text
jobId = Maybe Text
a} :: GetBatchPredictionJobs)

-- | The next token from the previous request.
getBatchPredictionJobs_nextToken :: Lens.Lens' GetBatchPredictionJobs (Prelude.Maybe Prelude.Text)
getBatchPredictionJobs_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetBatchPredictionJobs -> f GetBatchPredictionJobs
getBatchPredictionJobs_nextToken = (GetBatchPredictionJobs -> Maybe Text)
-> (GetBatchPredictionJobs -> Maybe Text -> GetBatchPredictionJobs)
-> Lens
     GetBatchPredictionJobs
     GetBatchPredictionJobs
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBatchPredictionJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetBatchPredictionJobs' :: GetBatchPredictionJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetBatchPredictionJobs
s@GetBatchPredictionJobs' {} Maybe Text
a -> GetBatchPredictionJobs
s {$sel:nextToken:GetBatchPredictionJobs' :: Maybe Text
nextToken = Maybe Text
a} :: GetBatchPredictionJobs)

-- | The maximum number of objects to return for the request.
getBatchPredictionJobs_maxResults :: Lens.Lens' GetBatchPredictionJobs (Prelude.Maybe Prelude.Natural)
getBatchPredictionJobs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetBatchPredictionJobs -> f GetBatchPredictionJobs
getBatchPredictionJobs_maxResults = (GetBatchPredictionJobs -> Maybe Natural)
-> (GetBatchPredictionJobs
    -> Maybe Natural -> GetBatchPredictionJobs)
-> Lens
     GetBatchPredictionJobs
     GetBatchPredictionJobs
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBatchPredictionJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetBatchPredictionJobs' :: GetBatchPredictionJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetBatchPredictionJobs
s@GetBatchPredictionJobs' {} Maybe Natural
a -> GetBatchPredictionJobs
s {$sel:maxResults:GetBatchPredictionJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetBatchPredictionJobs)

instance Core.AWSRequest GetBatchPredictionJobs where
  type
    AWSResponse GetBatchPredictionJobs =
      GetBatchPredictionJobsResponse
  request :: GetBatchPredictionJobs -> Request GetBatchPredictionJobs
request = Service -> GetBatchPredictionJobs -> Request GetBatchPredictionJobs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetBatchPredictionJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBatchPredictionJobs)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetBatchPredictionJobs))
-> Logger
-> Service
-> Proxy GetBatchPredictionJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBatchPredictionJobs)))
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 [BatchPrediction]
-> Maybe Text -> Int -> GetBatchPredictionJobsResponse
GetBatchPredictionJobsResponse'
            (Maybe [BatchPrediction]
 -> Maybe Text -> Int -> GetBatchPredictionJobsResponse)
-> Either String (Maybe [BatchPrediction])
-> Either
     String (Maybe Text -> Int -> GetBatchPredictionJobsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [BatchPrediction]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"batchPredictions"
                            Either String (Maybe (Maybe [BatchPrediction]))
-> Maybe [BatchPrediction]
-> Either String (Maybe [BatchPrediction])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [BatchPrediction]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> GetBatchPredictionJobsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetBatchPredictionJobsResponse)
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 -> GetBatchPredictionJobsResponse)
-> Either String Int
-> Either String GetBatchPredictionJobsResponse
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 GetBatchPredictionJobs

instance Prelude.NFData GetBatchPredictionJobs

instance Core.ToHeaders GetBatchPredictionJobs where
  toHeaders :: GetBatchPredictionJobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetBatchPredictionJobs -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSHawksNestServiceFacade.GetBatchPredictionJobs" ::
                          Prelude.ByteString
                      ),
            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.ToJSON GetBatchPredictionJobs where
  toJSON :: GetBatchPredictionJobs -> Value
toJSON GetBatchPredictionJobs' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
jobId :: Maybe Text
$sel:maxResults:GetBatchPredictionJobs' :: GetBatchPredictionJobs -> Maybe Natural
$sel:nextToken:GetBatchPredictionJobs' :: GetBatchPredictionJobs -> Maybe Text
$sel:jobId:GetBatchPredictionJobs' :: GetBatchPredictionJobs -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"jobId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
jobId,
            (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

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

-- | /See:/ 'newGetBatchPredictionJobsResponse' smart constructor.
data GetBatchPredictionJobsResponse = GetBatchPredictionJobsResponse'
  { -- | An array containing the details of each batch prediction job.
    GetBatchPredictionJobsResponse -> Maybe [BatchPrediction]
batchPredictions :: Prelude.Maybe [BatchPrediction],
    -- | The next token for the subsequent request.
    GetBatchPredictionJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetBatchPredictionJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBatchPredictionJobsResponse
-> GetBatchPredictionJobsResponse -> Bool
(GetBatchPredictionJobsResponse
 -> GetBatchPredictionJobsResponse -> Bool)
-> (GetBatchPredictionJobsResponse
    -> GetBatchPredictionJobsResponse -> Bool)
-> Eq GetBatchPredictionJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBatchPredictionJobsResponse
-> GetBatchPredictionJobsResponse -> Bool
$c/= :: GetBatchPredictionJobsResponse
-> GetBatchPredictionJobsResponse -> Bool
== :: GetBatchPredictionJobsResponse
-> GetBatchPredictionJobsResponse -> Bool
$c== :: GetBatchPredictionJobsResponse
-> GetBatchPredictionJobsResponse -> Bool
Prelude.Eq, ReadPrec [GetBatchPredictionJobsResponse]
ReadPrec GetBatchPredictionJobsResponse
Int -> ReadS GetBatchPredictionJobsResponse
ReadS [GetBatchPredictionJobsResponse]
(Int -> ReadS GetBatchPredictionJobsResponse)
-> ReadS [GetBatchPredictionJobsResponse]
-> ReadPrec GetBatchPredictionJobsResponse
-> ReadPrec [GetBatchPredictionJobsResponse]
-> Read GetBatchPredictionJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBatchPredictionJobsResponse]
$creadListPrec :: ReadPrec [GetBatchPredictionJobsResponse]
readPrec :: ReadPrec GetBatchPredictionJobsResponse
$creadPrec :: ReadPrec GetBatchPredictionJobsResponse
readList :: ReadS [GetBatchPredictionJobsResponse]
$creadList :: ReadS [GetBatchPredictionJobsResponse]
readsPrec :: Int -> ReadS GetBatchPredictionJobsResponse
$creadsPrec :: Int -> ReadS GetBatchPredictionJobsResponse
Prelude.Read, Int -> GetBatchPredictionJobsResponse -> ShowS
[GetBatchPredictionJobsResponse] -> ShowS
GetBatchPredictionJobsResponse -> String
(Int -> GetBatchPredictionJobsResponse -> ShowS)
-> (GetBatchPredictionJobsResponse -> String)
-> ([GetBatchPredictionJobsResponse] -> ShowS)
-> Show GetBatchPredictionJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBatchPredictionJobsResponse] -> ShowS
$cshowList :: [GetBatchPredictionJobsResponse] -> ShowS
show :: GetBatchPredictionJobsResponse -> String
$cshow :: GetBatchPredictionJobsResponse -> String
showsPrec :: Int -> GetBatchPredictionJobsResponse -> ShowS
$cshowsPrec :: Int -> GetBatchPredictionJobsResponse -> ShowS
Prelude.Show, (forall x.
 GetBatchPredictionJobsResponse
 -> Rep GetBatchPredictionJobsResponse x)
-> (forall x.
    Rep GetBatchPredictionJobsResponse x
    -> GetBatchPredictionJobsResponse)
-> Generic GetBatchPredictionJobsResponse
forall x.
Rep GetBatchPredictionJobsResponse x
-> GetBatchPredictionJobsResponse
forall x.
GetBatchPredictionJobsResponse
-> Rep GetBatchPredictionJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBatchPredictionJobsResponse x
-> GetBatchPredictionJobsResponse
$cfrom :: forall x.
GetBatchPredictionJobsResponse
-> Rep GetBatchPredictionJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBatchPredictionJobsResponse' 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:
--
-- 'batchPredictions', 'getBatchPredictionJobsResponse_batchPredictions' - An array containing the details of each batch prediction job.
--
-- 'nextToken', 'getBatchPredictionJobsResponse_nextToken' - The next token for the subsequent request.
--
-- 'httpStatus', 'getBatchPredictionJobsResponse_httpStatus' - The response's http status code.
newGetBatchPredictionJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBatchPredictionJobsResponse
newGetBatchPredictionJobsResponse :: Int -> GetBatchPredictionJobsResponse
newGetBatchPredictionJobsResponse Int
pHttpStatus_ =
  GetBatchPredictionJobsResponse' :: Maybe [BatchPrediction]
-> Maybe Text -> Int -> GetBatchPredictionJobsResponse
GetBatchPredictionJobsResponse'
    { $sel:batchPredictions:GetBatchPredictionJobsResponse' :: Maybe [BatchPrediction]
batchPredictions =
        Maybe [BatchPrediction]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetBatchPredictionJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBatchPredictionJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array containing the details of each batch prediction job.
getBatchPredictionJobsResponse_batchPredictions :: Lens.Lens' GetBatchPredictionJobsResponse (Prelude.Maybe [BatchPrediction])
getBatchPredictionJobsResponse_batchPredictions :: (Maybe [BatchPrediction] -> f (Maybe [BatchPrediction]))
-> GetBatchPredictionJobsResponse
-> f GetBatchPredictionJobsResponse
getBatchPredictionJobsResponse_batchPredictions = (GetBatchPredictionJobsResponse -> Maybe [BatchPrediction])
-> (GetBatchPredictionJobsResponse
    -> Maybe [BatchPrediction] -> GetBatchPredictionJobsResponse)
-> Lens
     GetBatchPredictionJobsResponse
     GetBatchPredictionJobsResponse
     (Maybe [BatchPrediction])
     (Maybe [BatchPrediction])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBatchPredictionJobsResponse' {Maybe [BatchPrediction]
batchPredictions :: Maybe [BatchPrediction]
$sel:batchPredictions:GetBatchPredictionJobsResponse' :: GetBatchPredictionJobsResponse -> Maybe [BatchPrediction]
batchPredictions} -> Maybe [BatchPrediction]
batchPredictions) (\s :: GetBatchPredictionJobsResponse
s@GetBatchPredictionJobsResponse' {} Maybe [BatchPrediction]
a -> GetBatchPredictionJobsResponse
s {$sel:batchPredictions:GetBatchPredictionJobsResponse' :: Maybe [BatchPrediction]
batchPredictions = Maybe [BatchPrediction]
a} :: GetBatchPredictionJobsResponse) ((Maybe [BatchPrediction] -> f (Maybe [BatchPrediction]))
 -> GetBatchPredictionJobsResponse
 -> f GetBatchPredictionJobsResponse)
-> ((Maybe [BatchPrediction] -> f (Maybe [BatchPrediction]))
    -> Maybe [BatchPrediction] -> f (Maybe [BatchPrediction]))
-> (Maybe [BatchPrediction] -> f (Maybe [BatchPrediction]))
-> GetBatchPredictionJobsResponse
-> f GetBatchPredictionJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BatchPrediction]
  [BatchPrediction]
  [BatchPrediction]
  [BatchPrediction]
-> Iso
     (Maybe [BatchPrediction])
     (Maybe [BatchPrediction])
     (Maybe [BatchPrediction])
     (Maybe [BatchPrediction])
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
  [BatchPrediction]
  [BatchPrediction]
  [BatchPrediction]
  [BatchPrediction]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The next token for the subsequent request.
getBatchPredictionJobsResponse_nextToken :: Lens.Lens' GetBatchPredictionJobsResponse (Prelude.Maybe Prelude.Text)
getBatchPredictionJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetBatchPredictionJobsResponse
-> f GetBatchPredictionJobsResponse
getBatchPredictionJobsResponse_nextToken = (GetBatchPredictionJobsResponse -> Maybe Text)
-> (GetBatchPredictionJobsResponse
    -> Maybe Text -> GetBatchPredictionJobsResponse)
-> Lens
     GetBatchPredictionJobsResponse
     GetBatchPredictionJobsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBatchPredictionJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetBatchPredictionJobsResponse' :: GetBatchPredictionJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetBatchPredictionJobsResponse
s@GetBatchPredictionJobsResponse' {} Maybe Text
a -> GetBatchPredictionJobsResponse
s {$sel:nextToken:GetBatchPredictionJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetBatchPredictionJobsResponse)

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

instance
  Prelude.NFData
    GetBatchPredictionJobsResponse