{-# 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.MigrationHubStrategy.GetImportFileTask
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the details about a specific import task.
module Amazonka.MigrationHubStrategy.GetImportFileTask
  ( -- * Creating a Request
    GetImportFileTask (..),
    newGetImportFileTask,

    -- * Request Lenses
    getImportFileTask_id,

    -- * Destructuring the Response
    GetImportFileTaskResponse (..),
    newGetImportFileTaskResponse,

    -- * Response Lenses
    getImportFileTaskResponse_completionTime,
    getImportFileTaskResponse_id,
    getImportFileTaskResponse_importName,
    getImportFileTaskResponse_inputS3Bucket,
    getImportFileTaskResponse_inputS3Key,
    getImportFileTaskResponse_numberOfRecordsFailed,
    getImportFileTaskResponse_numberOfRecordsSuccess,
    getImportFileTaskResponse_startTime,
    getImportFileTaskResponse_status,
    getImportFileTaskResponse_statusReportS3Bucket,
    getImportFileTaskResponse_statusReportS3Key,
    getImportFileTaskResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetImportFileTask' smart constructor.
data GetImportFileTask = GetImportFileTask'
  { -- | The ID of the import file task. This ID is returned in the response of
    -- StartImportFileTask.
    GetImportFileTask -> Text
id :: Prelude.Text
  }
  deriving (GetImportFileTask -> GetImportFileTask -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetImportFileTask -> GetImportFileTask -> Bool
$c/= :: GetImportFileTask -> GetImportFileTask -> Bool
== :: GetImportFileTask -> GetImportFileTask -> Bool
$c== :: GetImportFileTask -> GetImportFileTask -> Bool
Prelude.Eq, ReadPrec [GetImportFileTask]
ReadPrec GetImportFileTask
Int -> ReadS GetImportFileTask
ReadS [GetImportFileTask]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetImportFileTask]
$creadListPrec :: ReadPrec [GetImportFileTask]
readPrec :: ReadPrec GetImportFileTask
$creadPrec :: ReadPrec GetImportFileTask
readList :: ReadS [GetImportFileTask]
$creadList :: ReadS [GetImportFileTask]
readsPrec :: Int -> ReadS GetImportFileTask
$creadsPrec :: Int -> ReadS GetImportFileTask
Prelude.Read, Int -> GetImportFileTask -> ShowS
[GetImportFileTask] -> ShowS
GetImportFileTask -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetImportFileTask] -> ShowS
$cshowList :: [GetImportFileTask] -> ShowS
show :: GetImportFileTask -> String
$cshow :: GetImportFileTask -> String
showsPrec :: Int -> GetImportFileTask -> ShowS
$cshowsPrec :: Int -> GetImportFileTask -> ShowS
Prelude.Show, forall x. Rep GetImportFileTask x -> GetImportFileTask
forall x. GetImportFileTask -> Rep GetImportFileTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetImportFileTask x -> GetImportFileTask
$cfrom :: forall x. GetImportFileTask -> Rep GetImportFileTask x
Prelude.Generic)

-- |
-- Create a value of 'GetImportFileTask' 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:
--
-- 'id', 'getImportFileTask_id' - The ID of the import file task. This ID is returned in the response of
-- StartImportFileTask.
newGetImportFileTask ::
  -- | 'id'
  Prelude.Text ->
  GetImportFileTask
newGetImportFileTask :: Text -> GetImportFileTask
newGetImportFileTask Text
pId_ =
  GetImportFileTask' {$sel:id:GetImportFileTask' :: Text
id = Text
pId_}

-- | The ID of the import file task. This ID is returned in the response of
-- StartImportFileTask.
getImportFileTask_id :: Lens.Lens' GetImportFileTask Prelude.Text
getImportFileTask_id :: Lens' GetImportFileTask Text
getImportFileTask_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTask' {Text
id :: Text
$sel:id:GetImportFileTask' :: GetImportFileTask -> Text
id} -> Text
id) (\s :: GetImportFileTask
s@GetImportFileTask' {} Text
a -> GetImportFileTask
s {$sel:id:GetImportFileTask' :: Text
id = Text
a} :: GetImportFileTask)

instance Core.AWSRequest GetImportFileTask where
  type
    AWSResponse GetImportFileTask =
      GetImportFileTaskResponse
  request :: (Service -> Service)
-> GetImportFileTask -> Request GetImportFileTask
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 GetImportFileTask
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetImportFileTask)))
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe POSIX
-> Maybe ImportFileTaskStatus
-> Maybe Text
-> Maybe Text
-> Int
-> GetImportFileTaskResponse
GetImportFileTaskResponse'
            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
"completionTime")
            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
"id")
            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
"importName")
            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
"inputS3Bucket")
            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
"inputS3Key")
            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
"numberOfRecordsFailed")
            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
"numberOfRecordsSuccess")
            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
"startTime")
            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
"status")
            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
"statusReportS3Bucket")
            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
"statusReportS3Key")
            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 GetImportFileTask where
  hashWithSalt :: Int -> GetImportFileTask -> Int
hashWithSalt Int
_salt GetImportFileTask' {Text
id :: Text
$sel:id:GetImportFileTask' :: GetImportFileTask -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id

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

instance Data.ToHeaders GetImportFileTask where
  toHeaders :: GetImportFileTask -> 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 GetImportFileTask where
  toPath :: GetImportFileTask -> ByteString
toPath GetImportFileTask' {Text
id :: Text
$sel:id:GetImportFileTask' :: GetImportFileTask -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/get-import-file-task/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
id]

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

-- | /See:/ 'newGetImportFileTaskResponse' smart constructor.
data GetImportFileTaskResponse = GetImportFileTaskResponse'
  { -- | The time that the import task completed.
    GetImportFileTaskResponse -> Maybe POSIX
completionTime :: Prelude.Maybe Data.POSIX,
    -- | The import file task @id@ returned in the response of
    -- StartImportFileTask.
    GetImportFileTaskResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The name of the import task given in StartImportFileTask.
    GetImportFileTaskResponse -> Maybe Text
importName :: Prelude.Maybe Prelude.Text,
    -- | The S3 bucket where import file is located.
    GetImportFileTaskResponse -> Maybe Text
inputS3Bucket :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 key name of the import file.
    GetImportFileTaskResponse -> Maybe Text
inputS3Key :: Prelude.Maybe Prelude.Text,
    -- | The number of records that failed to be imported.
    GetImportFileTaskResponse -> Maybe Int
numberOfRecordsFailed :: Prelude.Maybe Prelude.Int,
    -- | The number of records successfully imported.
    GetImportFileTaskResponse -> Maybe Int
numberOfRecordsSuccess :: Prelude.Maybe Prelude.Int,
    -- | Start time of the import task.
    GetImportFileTaskResponse -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX,
    -- | Status of import file task.
    GetImportFileTaskResponse -> Maybe ImportFileTaskStatus
status :: Prelude.Maybe ImportFileTaskStatus,
    -- | The S3 bucket name for status report of import task.
    GetImportFileTaskResponse -> Maybe Text
statusReportS3Bucket :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 key name for status report of import task. The report
    -- contains details about whether each record imported successfully or why
    -- it did not.
    GetImportFileTaskResponse -> Maybe Text
statusReportS3Key :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetImportFileTaskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetImportFileTaskResponse -> GetImportFileTaskResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetImportFileTaskResponse -> GetImportFileTaskResponse -> Bool
$c/= :: GetImportFileTaskResponse -> GetImportFileTaskResponse -> Bool
== :: GetImportFileTaskResponse -> GetImportFileTaskResponse -> Bool
$c== :: GetImportFileTaskResponse -> GetImportFileTaskResponse -> Bool
Prelude.Eq, ReadPrec [GetImportFileTaskResponse]
ReadPrec GetImportFileTaskResponse
Int -> ReadS GetImportFileTaskResponse
ReadS [GetImportFileTaskResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetImportFileTaskResponse]
$creadListPrec :: ReadPrec [GetImportFileTaskResponse]
readPrec :: ReadPrec GetImportFileTaskResponse
$creadPrec :: ReadPrec GetImportFileTaskResponse
readList :: ReadS [GetImportFileTaskResponse]
$creadList :: ReadS [GetImportFileTaskResponse]
readsPrec :: Int -> ReadS GetImportFileTaskResponse
$creadsPrec :: Int -> ReadS GetImportFileTaskResponse
Prelude.Read, Int -> GetImportFileTaskResponse -> ShowS
[GetImportFileTaskResponse] -> ShowS
GetImportFileTaskResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetImportFileTaskResponse] -> ShowS
$cshowList :: [GetImportFileTaskResponse] -> ShowS
show :: GetImportFileTaskResponse -> String
$cshow :: GetImportFileTaskResponse -> String
showsPrec :: Int -> GetImportFileTaskResponse -> ShowS
$cshowsPrec :: Int -> GetImportFileTaskResponse -> ShowS
Prelude.Show, forall x.
Rep GetImportFileTaskResponse x -> GetImportFileTaskResponse
forall x.
GetImportFileTaskResponse -> Rep GetImportFileTaskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetImportFileTaskResponse x -> GetImportFileTaskResponse
$cfrom :: forall x.
GetImportFileTaskResponse -> Rep GetImportFileTaskResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetImportFileTaskResponse' 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:
--
-- 'completionTime', 'getImportFileTaskResponse_completionTime' - The time that the import task completed.
--
-- 'id', 'getImportFileTaskResponse_id' - The import file task @id@ returned in the response of
-- StartImportFileTask.
--
-- 'importName', 'getImportFileTaskResponse_importName' - The name of the import task given in StartImportFileTask.
--
-- 'inputS3Bucket', 'getImportFileTaskResponse_inputS3Bucket' - The S3 bucket where import file is located.
--
-- 'inputS3Key', 'getImportFileTaskResponse_inputS3Key' - The Amazon S3 key name of the import file.
--
-- 'numberOfRecordsFailed', 'getImportFileTaskResponse_numberOfRecordsFailed' - The number of records that failed to be imported.
--
-- 'numberOfRecordsSuccess', 'getImportFileTaskResponse_numberOfRecordsSuccess' - The number of records successfully imported.
--
-- 'startTime', 'getImportFileTaskResponse_startTime' - Start time of the import task.
--
-- 'status', 'getImportFileTaskResponse_status' - Status of import file task.
--
-- 'statusReportS3Bucket', 'getImportFileTaskResponse_statusReportS3Bucket' - The S3 bucket name for status report of import task.
--
-- 'statusReportS3Key', 'getImportFileTaskResponse_statusReportS3Key' - The Amazon S3 key name for status report of import task. The report
-- contains details about whether each record imported successfully or why
-- it did not.
--
-- 'httpStatus', 'getImportFileTaskResponse_httpStatus' - The response's http status code.
newGetImportFileTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetImportFileTaskResponse
newGetImportFileTaskResponse :: Int -> GetImportFileTaskResponse
newGetImportFileTaskResponse Int
pHttpStatus_ =
  GetImportFileTaskResponse'
    { $sel:completionTime:GetImportFileTaskResponse' :: Maybe POSIX
completionTime =
        forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetImportFileTaskResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:importName:GetImportFileTaskResponse' :: Maybe Text
importName = forall a. Maybe a
Prelude.Nothing,
      $sel:inputS3Bucket:GetImportFileTaskResponse' :: Maybe Text
inputS3Bucket = forall a. Maybe a
Prelude.Nothing,
      $sel:inputS3Key:GetImportFileTaskResponse' :: Maybe Text
inputS3Key = forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfRecordsFailed:GetImportFileTaskResponse' :: Maybe Int
numberOfRecordsFailed = forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfRecordsSuccess:GetImportFileTaskResponse' :: Maybe Int
numberOfRecordsSuccess = forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:GetImportFileTaskResponse' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing,
      $sel:status:GetImportFileTaskResponse' :: Maybe ImportFileTaskStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:statusReportS3Bucket:GetImportFileTaskResponse' :: Maybe Text
statusReportS3Bucket = forall a. Maybe a
Prelude.Nothing,
      $sel:statusReportS3Key:GetImportFileTaskResponse' :: Maybe Text
statusReportS3Key = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetImportFileTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The time that the import task completed.
getImportFileTaskResponse_completionTime :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe Prelude.UTCTime)
getImportFileTaskResponse_completionTime :: Lens' GetImportFileTaskResponse (Maybe UTCTime)
getImportFileTaskResponse_completionTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe POSIX
completionTime :: Maybe POSIX
$sel:completionTime:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe POSIX
completionTime} -> Maybe POSIX
completionTime) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe POSIX
a -> GetImportFileTaskResponse
s {$sel:completionTime:GetImportFileTaskResponse' :: Maybe POSIX
completionTime = Maybe POSIX
a} :: GetImportFileTaskResponse) 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 import file task @id@ returned in the response of
-- StartImportFileTask.
getImportFileTaskResponse_id :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe Prelude.Text)
getImportFileTaskResponse_id :: Lens' GetImportFileTaskResponse (Maybe Text)
getImportFileTaskResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe Text
id :: Maybe Text
$sel:id:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe Text
a -> GetImportFileTaskResponse
s {$sel:id:GetImportFileTaskResponse' :: Maybe Text
id = Maybe Text
a} :: GetImportFileTaskResponse)

-- | The name of the import task given in StartImportFileTask.
getImportFileTaskResponse_importName :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe Prelude.Text)
getImportFileTaskResponse_importName :: Lens' GetImportFileTaskResponse (Maybe Text)
getImportFileTaskResponse_importName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe Text
importName :: Maybe Text
$sel:importName:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
importName} -> Maybe Text
importName) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe Text
a -> GetImportFileTaskResponse
s {$sel:importName:GetImportFileTaskResponse' :: Maybe Text
importName = Maybe Text
a} :: GetImportFileTaskResponse)

-- | The S3 bucket where import file is located.
getImportFileTaskResponse_inputS3Bucket :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe Prelude.Text)
getImportFileTaskResponse_inputS3Bucket :: Lens' GetImportFileTaskResponse (Maybe Text)
getImportFileTaskResponse_inputS3Bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe Text
inputS3Bucket :: Maybe Text
$sel:inputS3Bucket:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
inputS3Bucket} -> Maybe Text
inputS3Bucket) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe Text
a -> GetImportFileTaskResponse
s {$sel:inputS3Bucket:GetImportFileTaskResponse' :: Maybe Text
inputS3Bucket = Maybe Text
a} :: GetImportFileTaskResponse)

-- | The Amazon S3 key name of the import file.
getImportFileTaskResponse_inputS3Key :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe Prelude.Text)
getImportFileTaskResponse_inputS3Key :: Lens' GetImportFileTaskResponse (Maybe Text)
getImportFileTaskResponse_inputS3Key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe Text
inputS3Key :: Maybe Text
$sel:inputS3Key:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
inputS3Key} -> Maybe Text
inputS3Key) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe Text
a -> GetImportFileTaskResponse
s {$sel:inputS3Key:GetImportFileTaskResponse' :: Maybe Text
inputS3Key = Maybe Text
a} :: GetImportFileTaskResponse)

-- | The number of records that failed to be imported.
getImportFileTaskResponse_numberOfRecordsFailed :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe Prelude.Int)
getImportFileTaskResponse_numberOfRecordsFailed :: Lens' GetImportFileTaskResponse (Maybe Int)
getImportFileTaskResponse_numberOfRecordsFailed = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe Int
numberOfRecordsFailed :: Maybe Int
$sel:numberOfRecordsFailed:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Int
numberOfRecordsFailed} -> Maybe Int
numberOfRecordsFailed) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe Int
a -> GetImportFileTaskResponse
s {$sel:numberOfRecordsFailed:GetImportFileTaskResponse' :: Maybe Int
numberOfRecordsFailed = Maybe Int
a} :: GetImportFileTaskResponse)

-- | The number of records successfully imported.
getImportFileTaskResponse_numberOfRecordsSuccess :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe Prelude.Int)
getImportFileTaskResponse_numberOfRecordsSuccess :: Lens' GetImportFileTaskResponse (Maybe Int)
getImportFileTaskResponse_numberOfRecordsSuccess = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe Int
numberOfRecordsSuccess :: Maybe Int
$sel:numberOfRecordsSuccess:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Int
numberOfRecordsSuccess} -> Maybe Int
numberOfRecordsSuccess) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe Int
a -> GetImportFileTaskResponse
s {$sel:numberOfRecordsSuccess:GetImportFileTaskResponse' :: Maybe Int
numberOfRecordsSuccess = Maybe Int
a} :: GetImportFileTaskResponse)

-- | Start time of the import task.
getImportFileTaskResponse_startTime :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe Prelude.UTCTime)
getImportFileTaskResponse_startTime :: Lens' GetImportFileTaskResponse (Maybe UTCTime)
getImportFileTaskResponse_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe POSIX
a -> GetImportFileTaskResponse
s {$sel:startTime:GetImportFileTaskResponse' :: Maybe POSIX
startTime = Maybe POSIX
a} :: GetImportFileTaskResponse) 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

-- | Status of import file task.
getImportFileTaskResponse_status :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe ImportFileTaskStatus)
getImportFileTaskResponse_status :: Lens' GetImportFileTaskResponse (Maybe ImportFileTaskStatus)
getImportFileTaskResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe ImportFileTaskStatus
status :: Maybe ImportFileTaskStatus
$sel:status:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe ImportFileTaskStatus
status} -> Maybe ImportFileTaskStatus
status) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe ImportFileTaskStatus
a -> GetImportFileTaskResponse
s {$sel:status:GetImportFileTaskResponse' :: Maybe ImportFileTaskStatus
status = Maybe ImportFileTaskStatus
a} :: GetImportFileTaskResponse)

-- | The S3 bucket name for status report of import task.
getImportFileTaskResponse_statusReportS3Bucket :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe Prelude.Text)
getImportFileTaskResponse_statusReportS3Bucket :: Lens' GetImportFileTaskResponse (Maybe Text)
getImportFileTaskResponse_statusReportS3Bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe Text
statusReportS3Bucket :: Maybe Text
$sel:statusReportS3Bucket:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
statusReportS3Bucket} -> Maybe Text
statusReportS3Bucket) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe Text
a -> GetImportFileTaskResponse
s {$sel:statusReportS3Bucket:GetImportFileTaskResponse' :: Maybe Text
statusReportS3Bucket = Maybe Text
a} :: GetImportFileTaskResponse)

-- | The Amazon S3 key name for status report of import task. The report
-- contains details about whether each record imported successfully or why
-- it did not.
getImportFileTaskResponse_statusReportS3Key :: Lens.Lens' GetImportFileTaskResponse (Prelude.Maybe Prelude.Text)
getImportFileTaskResponse_statusReportS3Key :: Lens' GetImportFileTaskResponse (Maybe Text)
getImportFileTaskResponse_statusReportS3Key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetImportFileTaskResponse' {Maybe Text
statusReportS3Key :: Maybe Text
$sel:statusReportS3Key:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
statusReportS3Key} -> Maybe Text
statusReportS3Key) (\s :: GetImportFileTaskResponse
s@GetImportFileTaskResponse' {} Maybe Text
a -> GetImportFileTaskResponse
s {$sel:statusReportS3Key:GetImportFileTaskResponse' :: Maybe Text
statusReportS3Key = Maybe Text
a} :: GetImportFileTaskResponse)

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

instance Prelude.NFData GetImportFileTaskResponse where
  rnf :: GetImportFileTaskResponse -> ()
rnf GetImportFileTaskResponse' {Int
Maybe Int
Maybe Text
Maybe POSIX
Maybe ImportFileTaskStatus
httpStatus :: Int
statusReportS3Key :: Maybe Text
statusReportS3Bucket :: Maybe Text
status :: Maybe ImportFileTaskStatus
startTime :: Maybe POSIX
numberOfRecordsSuccess :: Maybe Int
numberOfRecordsFailed :: Maybe Int
inputS3Key :: Maybe Text
inputS3Bucket :: Maybe Text
importName :: Maybe Text
id :: Maybe Text
completionTime :: Maybe POSIX
$sel:httpStatus:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Int
$sel:statusReportS3Key:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
$sel:statusReportS3Bucket:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
$sel:status:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe ImportFileTaskStatus
$sel:startTime:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe POSIX
$sel:numberOfRecordsSuccess:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Int
$sel:numberOfRecordsFailed:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Int
$sel:inputS3Key:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
$sel:inputS3Bucket:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
$sel:importName:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
$sel:id:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe Text
$sel:completionTime:GetImportFileTaskResponse' :: GetImportFileTaskResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
completionTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
importName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
inputS3Bucket
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
inputS3Key
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfRecordsFailed
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numberOfRecordsSuccess
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportFileTaskStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusReportS3Bucket
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusReportS3Key
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus