{-# 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.GetBatchImportJobs
-- 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 import jobs or a specific job of the specified 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
-- @GetBatchImportJobsResponse@ as part of your request. A null pagination
-- token fetches the records from the beginning.
module Amazonka.FraudDetector.GetBatchImportJobs
  ( -- * Creating a Request
    GetBatchImportJobs (..),
    newGetBatchImportJobs,

    -- * Request Lenses
    getBatchImportJobs_jobId,
    getBatchImportJobs_nextToken,
    getBatchImportJobs_maxResults,

    -- * Destructuring the Response
    GetBatchImportJobsResponse (..),
    newGetBatchImportJobsResponse,

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

-- |
-- Create a value of 'GetBatchImportJobs' 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', 'getBatchImportJobs_jobId' - The ID of the batch import job to get.
--
-- 'nextToken', 'getBatchImportJobs_nextToken' - The next token from the previous request.
--
-- 'maxResults', 'getBatchImportJobs_maxResults' - The maximum number of objects to return for request.
newGetBatchImportJobs ::
  GetBatchImportJobs
newGetBatchImportJobs :: GetBatchImportJobs
newGetBatchImportJobs =
  GetBatchImportJobs' :: Maybe Text -> Maybe Text -> Maybe Natural -> GetBatchImportJobs
GetBatchImportJobs'
    { $sel:jobId:GetBatchImportJobs' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetBatchImportJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetBatchImportJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the batch import job to get.
getBatchImportJobs_jobId :: Lens.Lens' GetBatchImportJobs (Prelude.Maybe Prelude.Text)
getBatchImportJobs_jobId :: (Maybe Text -> f (Maybe Text))
-> GetBatchImportJobs -> f GetBatchImportJobs
getBatchImportJobs_jobId = (GetBatchImportJobs -> Maybe Text)
-> (GetBatchImportJobs -> Maybe Text -> GetBatchImportJobs)
-> Lens
     GetBatchImportJobs GetBatchImportJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBatchImportJobs' {Maybe Text
jobId :: Maybe Text
$sel:jobId:GetBatchImportJobs' :: GetBatchImportJobs -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: GetBatchImportJobs
s@GetBatchImportJobs' {} Maybe Text
a -> GetBatchImportJobs
s {$sel:jobId:GetBatchImportJobs' :: Maybe Text
jobId = Maybe Text
a} :: GetBatchImportJobs)

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

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

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

instance Prelude.NFData GetBatchImportJobs

instance Core.ToHeaders GetBatchImportJobs where
  toHeaders :: GetBatchImportJobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetBatchImportJobs -> 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.GetBatchImportJobs" ::
                          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 GetBatchImportJobs where
  toJSON :: GetBatchImportJobs -> Value
toJSON GetBatchImportJobs' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
jobId :: Maybe Text
$sel:maxResults:GetBatchImportJobs' :: GetBatchImportJobs -> Maybe Natural
$sel:nextToken:GetBatchImportJobs' :: GetBatchImportJobs -> Maybe Text
$sel:jobId:GetBatchImportJobs' :: GetBatchImportJobs -> 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 GetBatchImportJobs where
  toPath :: GetBatchImportJobs -> ByteString
toPath = ByteString -> GetBatchImportJobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'GetBatchImportJobsResponse' 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', 'getBatchImportJobsResponse_nextToken' - The next token for the subsequent resquest.
--
-- 'batchImports', 'getBatchImportJobsResponse_batchImports' - An array containing the details of each batch import job.
--
-- 'httpStatus', 'getBatchImportJobsResponse_httpStatus' - The response's http status code.
newGetBatchImportJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBatchImportJobsResponse
newGetBatchImportJobsResponse :: Int -> GetBatchImportJobsResponse
newGetBatchImportJobsResponse Int
pHttpStatus_ =
  GetBatchImportJobsResponse' :: Maybe Text
-> Maybe [BatchImport] -> Int -> GetBatchImportJobsResponse
GetBatchImportJobsResponse'
    { $sel:nextToken:GetBatchImportJobsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:batchImports:GetBatchImportJobsResponse' :: Maybe [BatchImport]
batchImports = Maybe [BatchImport]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBatchImportJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

instance Prelude.NFData GetBatchImportJobsResponse