{-# 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.SESV2.GetImportJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Provides information about an import job.
module Amazonka.SESV2.GetImportJob
  ( -- * Creating a Request
    GetImportJob (..),
    newGetImportJob,

    -- * Request Lenses
    getImportJob_jobId,

    -- * Destructuring the Response
    GetImportJobResponse (..),
    newGetImportJobResponse,

    -- * Response Lenses
    getImportJobResponse_completedTimestamp,
    getImportJobResponse_createdTimestamp,
    getImportJobResponse_failedRecordsCount,
    getImportJobResponse_failureInfo,
    getImportJobResponse_importDataSource,
    getImportJobResponse_importDestination,
    getImportJobResponse_jobId,
    getImportJobResponse_jobStatus,
    getImportJobResponse_processedRecordsCount,
    getImportJobResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SESV2.Types

-- | Represents a request for information about an import job using the
-- import job ID.
--
-- /See:/ 'newGetImportJob' smart constructor.
data GetImportJob = GetImportJob'
  { -- | The ID of the import job.
    GetImportJob -> Text
jobId :: Prelude.Text
  }
  deriving (GetImportJob -> GetImportJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetImportJob -> GetImportJob -> Bool
$c/= :: GetImportJob -> GetImportJob -> Bool
== :: GetImportJob -> GetImportJob -> Bool
$c== :: GetImportJob -> GetImportJob -> Bool
Prelude.Eq, ReadPrec [GetImportJob]
ReadPrec GetImportJob
Int -> ReadS GetImportJob
ReadS [GetImportJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetImportJob]
$creadListPrec :: ReadPrec [GetImportJob]
readPrec :: ReadPrec GetImportJob
$creadPrec :: ReadPrec GetImportJob
readList :: ReadS [GetImportJob]
$creadList :: ReadS [GetImportJob]
readsPrec :: Int -> ReadS GetImportJob
$creadsPrec :: Int -> ReadS GetImportJob
Prelude.Read, Int -> GetImportJob -> ShowS
[GetImportJob] -> ShowS
GetImportJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetImportJob] -> ShowS
$cshowList :: [GetImportJob] -> ShowS
show :: GetImportJob -> String
$cshow :: GetImportJob -> String
showsPrec :: Int -> GetImportJob -> ShowS
$cshowsPrec :: Int -> GetImportJob -> ShowS
Prelude.Show, forall x. Rep GetImportJob x -> GetImportJob
forall x. GetImportJob -> Rep GetImportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetImportJob x -> GetImportJob
$cfrom :: forall x. GetImportJob -> Rep GetImportJob x
Prelude.Generic)

-- |
-- Create a value of 'GetImportJob' 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', 'getImportJob_jobId' - The ID of the import job.
newGetImportJob ::
  -- | 'jobId'
  Prelude.Text ->
  GetImportJob
newGetImportJob :: Text -> GetImportJob
newGetImportJob Text
pJobId_ =
  GetImportJob' {$sel:jobId:GetImportJob' :: Text
jobId = Text
pJobId_}

-- | The ID of the import job.
getImportJob_jobId :: Lens.Lens' GetImportJob Prelude.Text
getImportJob_jobId :: Lens' GetImportJob Text
getImportJob_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportJob' {Text
jobId :: Text
$sel:jobId:GetImportJob' :: GetImportJob -> Text
jobId} -> Text
jobId) (\s :: GetImportJob
s@GetImportJob' {} Text
a -> GetImportJob
s {$sel:jobId:GetImportJob' :: Text
jobId = Text
a} :: GetImportJob)

instance Core.AWSRequest GetImportJob where
  type AWSResponse GetImportJob = GetImportJobResponse
  request :: (Service -> Service) -> GetImportJob -> Request GetImportJob
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetImportJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetImportJob)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe POSIX
-> Maybe Int
-> Maybe FailureInfo
-> Maybe ImportDataSource
-> Maybe ImportDestination
-> Maybe Text
-> Maybe JobStatus
-> Maybe Int
-> Int
-> GetImportJobResponse
GetImportJobResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CompletedTimestamp")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreatedTimestamp")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"FailedRecordsCount")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"FailureInfo")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ImportDataSource")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ImportDestination")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ProcessedRecordsCount")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetImportJob where
  hashWithSalt :: Int -> GetImportJob -> Int
hashWithSalt Int
_salt GetImportJob' {Text
jobId :: Text
$sel:jobId:GetImportJob' :: GetImportJob -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobId

instance Prelude.NFData GetImportJob where
  rnf :: GetImportJob -> ()
rnf GetImportJob' {Text
jobId :: Text
$sel:jobId:GetImportJob' :: GetImportJob -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
jobId

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

instance Data.ToPath GetImportJob where
  toPath :: GetImportJob -> ByteString
toPath GetImportJob' {Text
jobId :: Text
$sel:jobId:GetImportJob' :: GetImportJob -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v2/email/import-jobs/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
jobId]

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

-- | An HTTP 200 response if the request succeeds, or an error message if the
-- request fails.
--
-- /See:/ 'newGetImportJobResponse' smart constructor.
data GetImportJobResponse = GetImportJobResponse'
  { -- | The time stamp of when the import job was completed.
    GetImportJobResponse -> Maybe POSIX
completedTimestamp :: Prelude.Maybe Data.POSIX,
    -- | The time stamp of when the import job was created.
    GetImportJobResponse -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Data.POSIX,
    -- | The number of records that failed processing because of invalid input or
    -- other reasons.
    GetImportJobResponse -> Maybe Int
failedRecordsCount :: Prelude.Maybe Prelude.Int,
    -- | The failure details about an import job.
    GetImportJobResponse -> Maybe FailureInfo
failureInfo :: Prelude.Maybe FailureInfo,
    -- | The data source of the import job.
    GetImportJobResponse -> Maybe ImportDataSource
importDataSource :: Prelude.Maybe ImportDataSource,
    -- | The destination of the import job.
    GetImportJobResponse -> Maybe ImportDestination
importDestination :: Prelude.Maybe ImportDestination,
    -- | A string that represents the import job ID.
    GetImportJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The status of the import job.
    GetImportJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
    -- | The current number of records processed.
    GetImportJobResponse -> Maybe Int
processedRecordsCount :: Prelude.Maybe Prelude.Int,
    -- | The response's http status code.
    GetImportJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetImportJobResponse -> GetImportJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetImportJobResponse -> GetImportJobResponse -> Bool
$c/= :: GetImportJobResponse -> GetImportJobResponse -> Bool
== :: GetImportJobResponse -> GetImportJobResponse -> Bool
$c== :: GetImportJobResponse -> GetImportJobResponse -> Bool
Prelude.Eq, ReadPrec [GetImportJobResponse]
ReadPrec GetImportJobResponse
Int -> ReadS GetImportJobResponse
ReadS [GetImportJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetImportJobResponse]
$creadListPrec :: ReadPrec [GetImportJobResponse]
readPrec :: ReadPrec GetImportJobResponse
$creadPrec :: ReadPrec GetImportJobResponse
readList :: ReadS [GetImportJobResponse]
$creadList :: ReadS [GetImportJobResponse]
readsPrec :: Int -> ReadS GetImportJobResponse
$creadsPrec :: Int -> ReadS GetImportJobResponse
Prelude.Read, Int -> GetImportJobResponse -> ShowS
[GetImportJobResponse] -> ShowS
GetImportJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetImportJobResponse] -> ShowS
$cshowList :: [GetImportJobResponse] -> ShowS
show :: GetImportJobResponse -> String
$cshow :: GetImportJobResponse -> String
showsPrec :: Int -> GetImportJobResponse -> ShowS
$cshowsPrec :: Int -> GetImportJobResponse -> ShowS
Prelude.Show, forall x. Rep GetImportJobResponse x -> GetImportJobResponse
forall x. GetImportJobResponse -> Rep GetImportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetImportJobResponse x -> GetImportJobResponse
$cfrom :: forall x. GetImportJobResponse -> Rep GetImportJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetImportJobResponse' 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:
--
-- 'completedTimestamp', 'getImportJobResponse_completedTimestamp' - The time stamp of when the import job was completed.
--
-- 'createdTimestamp', 'getImportJobResponse_createdTimestamp' - The time stamp of when the import job was created.
--
-- 'failedRecordsCount', 'getImportJobResponse_failedRecordsCount' - The number of records that failed processing because of invalid input or
-- other reasons.
--
-- 'failureInfo', 'getImportJobResponse_failureInfo' - The failure details about an import job.
--
-- 'importDataSource', 'getImportJobResponse_importDataSource' - The data source of the import job.
--
-- 'importDestination', 'getImportJobResponse_importDestination' - The destination of the import job.
--
-- 'jobId', 'getImportJobResponse_jobId' - A string that represents the import job ID.
--
-- 'jobStatus', 'getImportJobResponse_jobStatus' - The status of the import job.
--
-- 'processedRecordsCount', 'getImportJobResponse_processedRecordsCount' - The current number of records processed.
--
-- 'httpStatus', 'getImportJobResponse_httpStatus' - The response's http status code.
newGetImportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetImportJobResponse
newGetImportJobResponse :: Int -> GetImportJobResponse
newGetImportJobResponse Int
pHttpStatus_ =
  GetImportJobResponse'
    { $sel:completedTimestamp:GetImportJobResponse' :: Maybe POSIX
completedTimestamp =
        forall a. Maybe a
Prelude.Nothing,
      $sel:createdTimestamp:GetImportJobResponse' :: Maybe POSIX
createdTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:failedRecordsCount:GetImportJobResponse' :: Maybe Int
failedRecordsCount = forall a. Maybe a
Prelude.Nothing,
      $sel:failureInfo:GetImportJobResponse' :: Maybe FailureInfo
failureInfo = forall a. Maybe a
Prelude.Nothing,
      $sel:importDataSource:GetImportJobResponse' :: Maybe ImportDataSource
importDataSource = forall a. Maybe a
Prelude.Nothing,
      $sel:importDestination:GetImportJobResponse' :: Maybe ImportDestination
importDestination = forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:GetImportJobResponse' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:GetImportJobResponse' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:processedRecordsCount:GetImportJobResponse' :: Maybe Int
processedRecordsCount = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetImportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The time stamp of when the import job was completed.
getImportJobResponse_completedTimestamp :: Lens.Lens' GetImportJobResponse (Prelude.Maybe Prelude.UTCTime)
getImportJobResponse_completedTimestamp :: Lens' GetImportJobResponse (Maybe UTCTime)
getImportJobResponse_completedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportJobResponse' {Maybe POSIX
completedTimestamp :: Maybe POSIX
$sel:completedTimestamp:GetImportJobResponse' :: GetImportJobResponse -> Maybe POSIX
completedTimestamp} -> Maybe POSIX
completedTimestamp) (\s :: GetImportJobResponse
s@GetImportJobResponse' {} Maybe POSIX
a -> GetImportJobResponse
s {$sel:completedTimestamp:GetImportJobResponse' :: Maybe POSIX
completedTimestamp = Maybe POSIX
a} :: GetImportJobResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The time stamp of when the import job was created.
getImportJobResponse_createdTimestamp :: Lens.Lens' GetImportJobResponse (Prelude.Maybe Prelude.UTCTime)
getImportJobResponse_createdTimestamp :: Lens' GetImportJobResponse (Maybe UTCTime)
getImportJobResponse_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportJobResponse' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:GetImportJobResponse' :: GetImportJobResponse -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: GetImportJobResponse
s@GetImportJobResponse' {} Maybe POSIX
a -> GetImportJobResponse
s {$sel:createdTimestamp:GetImportJobResponse' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: GetImportJobResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The number of records that failed processing because of invalid input or
-- other reasons.
getImportJobResponse_failedRecordsCount :: Lens.Lens' GetImportJobResponse (Prelude.Maybe Prelude.Int)
getImportJobResponse_failedRecordsCount :: Lens' GetImportJobResponse (Maybe Int)
getImportJobResponse_failedRecordsCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportJobResponse' {Maybe Int
failedRecordsCount :: Maybe Int
$sel:failedRecordsCount:GetImportJobResponse' :: GetImportJobResponse -> Maybe Int
failedRecordsCount} -> Maybe Int
failedRecordsCount) (\s :: GetImportJobResponse
s@GetImportJobResponse' {} Maybe Int
a -> GetImportJobResponse
s {$sel:failedRecordsCount:GetImportJobResponse' :: Maybe Int
failedRecordsCount = Maybe Int
a} :: GetImportJobResponse)

-- | The failure details about an import job.
getImportJobResponse_failureInfo :: Lens.Lens' GetImportJobResponse (Prelude.Maybe FailureInfo)
getImportJobResponse_failureInfo :: Lens' GetImportJobResponse (Maybe FailureInfo)
getImportJobResponse_failureInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportJobResponse' {Maybe FailureInfo
failureInfo :: Maybe FailureInfo
$sel:failureInfo:GetImportJobResponse' :: GetImportJobResponse -> Maybe FailureInfo
failureInfo} -> Maybe FailureInfo
failureInfo) (\s :: GetImportJobResponse
s@GetImportJobResponse' {} Maybe FailureInfo
a -> GetImportJobResponse
s {$sel:failureInfo:GetImportJobResponse' :: Maybe FailureInfo
failureInfo = Maybe FailureInfo
a} :: GetImportJobResponse)

-- | The data source of the import job.
getImportJobResponse_importDataSource :: Lens.Lens' GetImportJobResponse (Prelude.Maybe ImportDataSource)
getImportJobResponse_importDataSource :: Lens' GetImportJobResponse (Maybe ImportDataSource)
getImportJobResponse_importDataSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportJobResponse' {Maybe ImportDataSource
importDataSource :: Maybe ImportDataSource
$sel:importDataSource:GetImportJobResponse' :: GetImportJobResponse -> Maybe ImportDataSource
importDataSource} -> Maybe ImportDataSource
importDataSource) (\s :: GetImportJobResponse
s@GetImportJobResponse' {} Maybe ImportDataSource
a -> GetImportJobResponse
s {$sel:importDataSource:GetImportJobResponse' :: Maybe ImportDataSource
importDataSource = Maybe ImportDataSource
a} :: GetImportJobResponse)

-- | The destination of the import job.
getImportJobResponse_importDestination :: Lens.Lens' GetImportJobResponse (Prelude.Maybe ImportDestination)
getImportJobResponse_importDestination :: Lens' GetImportJobResponse (Maybe ImportDestination)
getImportJobResponse_importDestination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportJobResponse' {Maybe ImportDestination
importDestination :: Maybe ImportDestination
$sel:importDestination:GetImportJobResponse' :: GetImportJobResponse -> Maybe ImportDestination
importDestination} -> Maybe ImportDestination
importDestination) (\s :: GetImportJobResponse
s@GetImportJobResponse' {} Maybe ImportDestination
a -> GetImportJobResponse
s {$sel:importDestination:GetImportJobResponse' :: Maybe ImportDestination
importDestination = Maybe ImportDestination
a} :: GetImportJobResponse)

-- | A string that represents the import job ID.
getImportJobResponse_jobId :: Lens.Lens' GetImportJobResponse (Prelude.Maybe Prelude.Text)
getImportJobResponse_jobId :: Lens' GetImportJobResponse (Maybe Text)
getImportJobResponse_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:GetImportJobResponse' :: GetImportJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: GetImportJobResponse
s@GetImportJobResponse' {} Maybe Text
a -> GetImportJobResponse
s {$sel:jobId:GetImportJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: GetImportJobResponse)

-- | The status of the import job.
getImportJobResponse_jobStatus :: Lens.Lens' GetImportJobResponse (Prelude.Maybe JobStatus)
getImportJobResponse_jobStatus :: Lens' GetImportJobResponse (Maybe JobStatus)
getImportJobResponse_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:GetImportJobResponse' :: GetImportJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: GetImportJobResponse
s@GetImportJobResponse' {} Maybe JobStatus
a -> GetImportJobResponse
s {$sel:jobStatus:GetImportJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: GetImportJobResponse)

-- | The current number of records processed.
getImportJobResponse_processedRecordsCount :: Lens.Lens' GetImportJobResponse (Prelude.Maybe Prelude.Int)
getImportJobResponse_processedRecordsCount :: Lens' GetImportJobResponse (Maybe Int)
getImportJobResponse_processedRecordsCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportJobResponse' {Maybe Int
processedRecordsCount :: Maybe Int
$sel:processedRecordsCount:GetImportJobResponse' :: GetImportJobResponse -> Maybe Int
processedRecordsCount} -> Maybe Int
processedRecordsCount) (\s :: GetImportJobResponse
s@GetImportJobResponse' {} Maybe Int
a -> GetImportJobResponse
s {$sel:processedRecordsCount:GetImportJobResponse' :: Maybe Int
processedRecordsCount = Maybe Int
a} :: GetImportJobResponse)

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

instance Prelude.NFData GetImportJobResponse where
  rnf :: GetImportJobResponse -> ()
rnf GetImportJobResponse' {Int
Maybe Int
Maybe Text
Maybe POSIX
Maybe FailureInfo
Maybe ImportDataSource
Maybe JobStatus
Maybe ImportDestination
httpStatus :: Int
processedRecordsCount :: Maybe Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
importDestination :: Maybe ImportDestination
importDataSource :: Maybe ImportDataSource
failureInfo :: Maybe FailureInfo
failedRecordsCount :: Maybe Int
createdTimestamp :: Maybe POSIX
completedTimestamp :: Maybe POSIX
$sel:httpStatus:GetImportJobResponse' :: GetImportJobResponse -> Int
$sel:processedRecordsCount:GetImportJobResponse' :: GetImportJobResponse -> Maybe Int
$sel:jobStatus:GetImportJobResponse' :: GetImportJobResponse -> Maybe JobStatus
$sel:jobId:GetImportJobResponse' :: GetImportJobResponse -> Maybe Text
$sel:importDestination:GetImportJobResponse' :: GetImportJobResponse -> Maybe ImportDestination
$sel:importDataSource:GetImportJobResponse' :: GetImportJobResponse -> Maybe ImportDataSource
$sel:failureInfo:GetImportJobResponse' :: GetImportJobResponse -> Maybe FailureInfo
$sel:failedRecordsCount:GetImportJobResponse' :: GetImportJobResponse -> Maybe Int
$sel:createdTimestamp:GetImportJobResponse' :: GetImportJobResponse -> Maybe POSIX
$sel:completedTimestamp:GetImportJobResponse' :: GetImportJobResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
completedTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
failedRecordsCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FailureInfo
failureInfo
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportDataSource
importDataSource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportDestination
importDestination
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobStatus
jobStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
processedRecordsCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus