{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Discovery.Types.ImportTask
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Discovery.Types.ImportTask where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Discovery.Types.ImportStatus
import qualified Amazonka.Prelude as Prelude

-- | An array of information related to the import task request that includes
-- status information, times, IDs, the Amazon S3 Object URL for the import
-- file, and more.
--
-- /See:/ 'newImportTask' smart constructor.
data ImportTask = ImportTask'
  { -- | The total number of application records in the import file that failed
    -- to be imported.
    ImportTask -> Maybe Int
applicationImportFailure :: Prelude.Maybe Prelude.Int,
    -- | The total number of application records in the import file that were
    -- successfully imported.
    ImportTask -> Maybe Int
applicationImportSuccess :: Prelude.Maybe Prelude.Int,
    -- | A unique token used to prevent the same import request from occurring
    -- more than once. If you didn\'t provide a token, a token was
    -- automatically generated when the import task request was sent.
    ImportTask -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | A link to a compressed archive folder (in the ZIP format) that contains
    -- an error log and a file of failed records. You can use these two files
    -- to quickly identify records that failed, why they failed, and correct
    -- those records. Afterward, you can upload the corrected file to your
    -- Amazon S3 bucket and create another import task request.
    --
    -- This field also includes authorization information so you can confirm
    -- the authenticity of the compressed archive before you download it.
    --
    -- If some records failed to be imported we recommend that you correct the
    -- records in the failed entries file and then imports that failed entries
    -- file. This prevents you from having to correct and update the larger
    -- original file and attempt importing it again.
    ImportTask -> Maybe Text
errorsAndFailedEntriesZip :: Prelude.Maybe Prelude.Text,
    -- | The time that the import task request finished, presented in the Unix
    -- time stamp format.
    ImportTask -> Maybe POSIX
importCompletionTime :: Prelude.Maybe Data.POSIX,
    -- | The time that the import task request was deleted, presented in the Unix
    -- time stamp format.
    ImportTask -> Maybe POSIX
importDeletedTime :: Prelude.Maybe Data.POSIX,
    -- | The time that the import task request was made, presented in the Unix
    -- time stamp format.
    ImportTask -> Maybe POSIX
importRequestTime :: Prelude.Maybe Data.POSIX,
    -- | The unique ID for a specific import task. These IDs aren\'t globally
    -- unique, but they are unique within an Amazon Web Services account.
    ImportTask -> Maybe Text
importTaskId :: Prelude.Maybe Prelude.Text,
    -- | The URL for your import file that you\'ve uploaded to Amazon S3.
    ImportTask -> Maybe Text
importUrl :: Prelude.Maybe Prelude.Text,
    -- | A descriptive name for an import task. You can use this name to filter
    -- future requests related to this import task, such as identifying
    -- applications and servers that were included in this import task. We
    -- recommend that you use a meaningful name for each import task.
    ImportTask -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The total number of server records in the import file that failed to be
    -- imported.
    ImportTask -> Maybe Int
serverImportFailure :: Prelude.Maybe Prelude.Int,
    -- | The total number of server records in the import file that were
    -- successfully imported.
    ImportTask -> Maybe Int
serverImportSuccess :: Prelude.Maybe Prelude.Int,
    -- | The status of the import task. An import can have the status of
    -- @IMPORT_COMPLETE@ and still have some records fail to import from the
    -- overall request. More information can be found in the downloadable
    -- archive defined in the @errorsAndFailedEntriesZip@ field, or in the
    -- Migration Hub management console.
    ImportTask -> Maybe ImportStatus
status :: Prelude.Maybe ImportStatus
  }
  deriving (ImportTask -> ImportTask -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportTask -> ImportTask -> Bool
$c/= :: ImportTask -> ImportTask -> Bool
== :: ImportTask -> ImportTask -> Bool
$c== :: ImportTask -> ImportTask -> Bool
Prelude.Eq, ReadPrec [ImportTask]
ReadPrec ImportTask
Int -> ReadS ImportTask
ReadS [ImportTask]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportTask]
$creadListPrec :: ReadPrec [ImportTask]
readPrec :: ReadPrec ImportTask
$creadPrec :: ReadPrec ImportTask
readList :: ReadS [ImportTask]
$creadList :: ReadS [ImportTask]
readsPrec :: Int -> ReadS ImportTask
$creadsPrec :: Int -> ReadS ImportTask
Prelude.Read, Int -> ImportTask -> ShowS
[ImportTask] -> ShowS
ImportTask -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportTask] -> ShowS
$cshowList :: [ImportTask] -> ShowS
show :: ImportTask -> String
$cshow :: ImportTask -> String
showsPrec :: Int -> ImportTask -> ShowS
$cshowsPrec :: Int -> ImportTask -> ShowS
Prelude.Show, forall x. Rep ImportTask x -> ImportTask
forall x. ImportTask -> Rep ImportTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportTask x -> ImportTask
$cfrom :: forall x. ImportTask -> Rep ImportTask x
Prelude.Generic)

-- |
-- Create a value of 'ImportTask' 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:
--
-- 'applicationImportFailure', 'importTask_applicationImportFailure' - The total number of application records in the import file that failed
-- to be imported.
--
-- 'applicationImportSuccess', 'importTask_applicationImportSuccess' - The total number of application records in the import file that were
-- successfully imported.
--
-- 'clientRequestToken', 'importTask_clientRequestToken' - A unique token used to prevent the same import request from occurring
-- more than once. If you didn\'t provide a token, a token was
-- automatically generated when the import task request was sent.
--
-- 'errorsAndFailedEntriesZip', 'importTask_errorsAndFailedEntriesZip' - A link to a compressed archive folder (in the ZIP format) that contains
-- an error log and a file of failed records. You can use these two files
-- to quickly identify records that failed, why they failed, and correct
-- those records. Afterward, you can upload the corrected file to your
-- Amazon S3 bucket and create another import task request.
--
-- This field also includes authorization information so you can confirm
-- the authenticity of the compressed archive before you download it.
--
-- If some records failed to be imported we recommend that you correct the
-- records in the failed entries file and then imports that failed entries
-- file. This prevents you from having to correct and update the larger
-- original file and attempt importing it again.
--
-- 'importCompletionTime', 'importTask_importCompletionTime' - The time that the import task request finished, presented in the Unix
-- time stamp format.
--
-- 'importDeletedTime', 'importTask_importDeletedTime' - The time that the import task request was deleted, presented in the Unix
-- time stamp format.
--
-- 'importRequestTime', 'importTask_importRequestTime' - The time that the import task request was made, presented in the Unix
-- time stamp format.
--
-- 'importTaskId', 'importTask_importTaskId' - The unique ID for a specific import task. These IDs aren\'t globally
-- unique, but they are unique within an Amazon Web Services account.
--
-- 'importUrl', 'importTask_importUrl' - The URL for your import file that you\'ve uploaded to Amazon S3.
--
-- 'name', 'importTask_name' - A descriptive name for an import task. You can use this name to filter
-- future requests related to this import task, such as identifying
-- applications and servers that were included in this import task. We
-- recommend that you use a meaningful name for each import task.
--
-- 'serverImportFailure', 'importTask_serverImportFailure' - The total number of server records in the import file that failed to be
-- imported.
--
-- 'serverImportSuccess', 'importTask_serverImportSuccess' - The total number of server records in the import file that were
-- successfully imported.
--
-- 'status', 'importTask_status' - The status of the import task. An import can have the status of
-- @IMPORT_COMPLETE@ and still have some records fail to import from the
-- overall request. More information can be found in the downloadable
-- archive defined in the @errorsAndFailedEntriesZip@ field, or in the
-- Migration Hub management console.
newImportTask ::
  ImportTask
newImportTask :: ImportTask
newImportTask =
  ImportTask'
    { $sel:applicationImportFailure:ImportTask' :: Maybe Int
applicationImportFailure =
        forall a. Maybe a
Prelude.Nothing,
      $sel:applicationImportSuccess:ImportTask' :: Maybe Int
applicationImportSuccess = forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:ImportTask' :: Maybe Text
clientRequestToken = forall a. Maybe a
Prelude.Nothing,
      $sel:errorsAndFailedEntriesZip:ImportTask' :: Maybe Text
errorsAndFailedEntriesZip = forall a. Maybe a
Prelude.Nothing,
      $sel:importCompletionTime:ImportTask' :: Maybe POSIX
importCompletionTime = forall a. Maybe a
Prelude.Nothing,
      $sel:importDeletedTime:ImportTask' :: Maybe POSIX
importDeletedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:importRequestTime:ImportTask' :: Maybe POSIX
importRequestTime = forall a. Maybe a
Prelude.Nothing,
      $sel:importTaskId:ImportTask' :: Maybe Text
importTaskId = forall a. Maybe a
Prelude.Nothing,
      $sel:importUrl:ImportTask' :: Maybe Text
importUrl = forall a. Maybe a
Prelude.Nothing,
      $sel:name:ImportTask' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:serverImportFailure:ImportTask' :: Maybe Int
serverImportFailure = forall a. Maybe a
Prelude.Nothing,
      $sel:serverImportSuccess:ImportTask' :: Maybe Int
serverImportSuccess = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ImportTask' :: Maybe ImportStatus
status = forall a. Maybe a
Prelude.Nothing
    }

-- | The total number of application records in the import file that failed
-- to be imported.
importTask_applicationImportFailure :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.Int)
importTask_applicationImportFailure :: Lens' ImportTask (Maybe Int)
importTask_applicationImportFailure = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe Int
applicationImportFailure :: Maybe Int
$sel:applicationImportFailure:ImportTask' :: ImportTask -> Maybe Int
applicationImportFailure} -> Maybe Int
applicationImportFailure) (\s :: ImportTask
s@ImportTask' {} Maybe Int
a -> ImportTask
s {$sel:applicationImportFailure:ImportTask' :: Maybe Int
applicationImportFailure = Maybe Int
a} :: ImportTask)

-- | The total number of application records in the import file that were
-- successfully imported.
importTask_applicationImportSuccess :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.Int)
importTask_applicationImportSuccess :: Lens' ImportTask (Maybe Int)
importTask_applicationImportSuccess = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe Int
applicationImportSuccess :: Maybe Int
$sel:applicationImportSuccess:ImportTask' :: ImportTask -> Maybe Int
applicationImportSuccess} -> Maybe Int
applicationImportSuccess) (\s :: ImportTask
s@ImportTask' {} Maybe Int
a -> ImportTask
s {$sel:applicationImportSuccess:ImportTask' :: Maybe Int
applicationImportSuccess = Maybe Int
a} :: ImportTask)

-- | A unique token used to prevent the same import request from occurring
-- more than once. If you didn\'t provide a token, a token was
-- automatically generated when the import task request was sent.
importTask_clientRequestToken :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.Text)
importTask_clientRequestToken :: Lens' ImportTask (Maybe Text)
importTask_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:ImportTask' :: ImportTask -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: ImportTask
s@ImportTask' {} Maybe Text
a -> ImportTask
s {$sel:clientRequestToken:ImportTask' :: Maybe Text
clientRequestToken = Maybe Text
a} :: ImportTask)

-- | A link to a compressed archive folder (in the ZIP format) that contains
-- an error log and a file of failed records. You can use these two files
-- to quickly identify records that failed, why they failed, and correct
-- those records. Afterward, you can upload the corrected file to your
-- Amazon S3 bucket and create another import task request.
--
-- This field also includes authorization information so you can confirm
-- the authenticity of the compressed archive before you download it.
--
-- If some records failed to be imported we recommend that you correct the
-- records in the failed entries file and then imports that failed entries
-- file. This prevents you from having to correct and update the larger
-- original file and attempt importing it again.
importTask_errorsAndFailedEntriesZip :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.Text)
importTask_errorsAndFailedEntriesZip :: Lens' ImportTask (Maybe Text)
importTask_errorsAndFailedEntriesZip = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe Text
errorsAndFailedEntriesZip :: Maybe Text
$sel:errorsAndFailedEntriesZip:ImportTask' :: ImportTask -> Maybe Text
errorsAndFailedEntriesZip} -> Maybe Text
errorsAndFailedEntriesZip) (\s :: ImportTask
s@ImportTask' {} Maybe Text
a -> ImportTask
s {$sel:errorsAndFailedEntriesZip:ImportTask' :: Maybe Text
errorsAndFailedEntriesZip = Maybe Text
a} :: ImportTask)

-- | The time that the import task request finished, presented in the Unix
-- time stamp format.
importTask_importCompletionTime :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.UTCTime)
importTask_importCompletionTime :: Lens' ImportTask (Maybe UTCTime)
importTask_importCompletionTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe POSIX
importCompletionTime :: Maybe POSIX
$sel:importCompletionTime:ImportTask' :: ImportTask -> Maybe POSIX
importCompletionTime} -> Maybe POSIX
importCompletionTime) (\s :: ImportTask
s@ImportTask' {} Maybe POSIX
a -> ImportTask
s {$sel:importCompletionTime:ImportTask' :: Maybe POSIX
importCompletionTime = Maybe POSIX
a} :: ImportTask) 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 that the import task request was deleted, presented in the Unix
-- time stamp format.
importTask_importDeletedTime :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.UTCTime)
importTask_importDeletedTime :: Lens' ImportTask (Maybe UTCTime)
importTask_importDeletedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe POSIX
importDeletedTime :: Maybe POSIX
$sel:importDeletedTime:ImportTask' :: ImportTask -> Maybe POSIX
importDeletedTime} -> Maybe POSIX
importDeletedTime) (\s :: ImportTask
s@ImportTask' {} Maybe POSIX
a -> ImportTask
s {$sel:importDeletedTime:ImportTask' :: Maybe POSIX
importDeletedTime = Maybe POSIX
a} :: ImportTask) 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 that the import task request was made, presented in the Unix
-- time stamp format.
importTask_importRequestTime :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.UTCTime)
importTask_importRequestTime :: Lens' ImportTask (Maybe UTCTime)
importTask_importRequestTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe POSIX
importRequestTime :: Maybe POSIX
$sel:importRequestTime:ImportTask' :: ImportTask -> Maybe POSIX
importRequestTime} -> Maybe POSIX
importRequestTime) (\s :: ImportTask
s@ImportTask' {} Maybe POSIX
a -> ImportTask
s {$sel:importRequestTime:ImportTask' :: Maybe POSIX
importRequestTime = Maybe POSIX
a} :: ImportTask) 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 unique ID for a specific import task. These IDs aren\'t globally
-- unique, but they are unique within an Amazon Web Services account.
importTask_importTaskId :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.Text)
importTask_importTaskId :: Lens' ImportTask (Maybe Text)
importTask_importTaskId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe Text
importTaskId :: Maybe Text
$sel:importTaskId:ImportTask' :: ImportTask -> Maybe Text
importTaskId} -> Maybe Text
importTaskId) (\s :: ImportTask
s@ImportTask' {} Maybe Text
a -> ImportTask
s {$sel:importTaskId:ImportTask' :: Maybe Text
importTaskId = Maybe Text
a} :: ImportTask)

-- | The URL for your import file that you\'ve uploaded to Amazon S3.
importTask_importUrl :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.Text)
importTask_importUrl :: Lens' ImportTask (Maybe Text)
importTask_importUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe Text
importUrl :: Maybe Text
$sel:importUrl:ImportTask' :: ImportTask -> Maybe Text
importUrl} -> Maybe Text
importUrl) (\s :: ImportTask
s@ImportTask' {} Maybe Text
a -> ImportTask
s {$sel:importUrl:ImportTask' :: Maybe Text
importUrl = Maybe Text
a} :: ImportTask)

-- | A descriptive name for an import task. You can use this name to filter
-- future requests related to this import task, such as identifying
-- applications and servers that were included in this import task. We
-- recommend that you use a meaningful name for each import task.
importTask_name :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.Text)
importTask_name :: Lens' ImportTask (Maybe Text)
importTask_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe Text
name :: Maybe Text
$sel:name:ImportTask' :: ImportTask -> Maybe Text
name} -> Maybe Text
name) (\s :: ImportTask
s@ImportTask' {} Maybe Text
a -> ImportTask
s {$sel:name:ImportTask' :: Maybe Text
name = Maybe Text
a} :: ImportTask)

-- | The total number of server records in the import file that failed to be
-- imported.
importTask_serverImportFailure :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.Int)
importTask_serverImportFailure :: Lens' ImportTask (Maybe Int)
importTask_serverImportFailure = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe Int
serverImportFailure :: Maybe Int
$sel:serverImportFailure:ImportTask' :: ImportTask -> Maybe Int
serverImportFailure} -> Maybe Int
serverImportFailure) (\s :: ImportTask
s@ImportTask' {} Maybe Int
a -> ImportTask
s {$sel:serverImportFailure:ImportTask' :: Maybe Int
serverImportFailure = Maybe Int
a} :: ImportTask)

-- | The total number of server records in the import file that were
-- successfully imported.
importTask_serverImportSuccess :: Lens.Lens' ImportTask (Prelude.Maybe Prelude.Int)
importTask_serverImportSuccess :: Lens' ImportTask (Maybe Int)
importTask_serverImportSuccess = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe Int
serverImportSuccess :: Maybe Int
$sel:serverImportSuccess:ImportTask' :: ImportTask -> Maybe Int
serverImportSuccess} -> Maybe Int
serverImportSuccess) (\s :: ImportTask
s@ImportTask' {} Maybe Int
a -> ImportTask
s {$sel:serverImportSuccess:ImportTask' :: Maybe Int
serverImportSuccess = Maybe Int
a} :: ImportTask)

-- | The status of the import task. An import can have the status of
-- @IMPORT_COMPLETE@ and still have some records fail to import from the
-- overall request. More information can be found in the downloadable
-- archive defined in the @errorsAndFailedEntriesZip@ field, or in the
-- Migration Hub management console.
importTask_status :: Lens.Lens' ImportTask (Prelude.Maybe ImportStatus)
importTask_status :: Lens' ImportTask (Maybe ImportStatus)
importTask_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTask' {Maybe ImportStatus
status :: Maybe ImportStatus
$sel:status:ImportTask' :: ImportTask -> Maybe ImportStatus
status} -> Maybe ImportStatus
status) (\s :: ImportTask
s@ImportTask' {} Maybe ImportStatus
a -> ImportTask
s {$sel:status:ImportTask' :: Maybe ImportStatus
status = Maybe ImportStatus
a} :: ImportTask)

instance Data.FromJSON ImportTask where
  parseJSON :: Value -> Parser ImportTask
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ImportTask"
      ( \Object
x ->
          Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe ImportStatus
-> ImportTask
ImportTask'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"applicationImportFailure")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"applicationImportSuccess")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"clientRequestToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"errorsAndFailedEntriesZip")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"importCompletionTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"importDeletedTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"importRequestTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"importTaskId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"importUrl")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"serverImportFailure")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"serverImportSuccess")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"status")
      )

instance Prelude.Hashable ImportTask where
  hashWithSalt :: Int -> ImportTask -> Int
hashWithSalt Int
_salt ImportTask' {Maybe Int
Maybe Text
Maybe POSIX
Maybe ImportStatus
status :: Maybe ImportStatus
serverImportSuccess :: Maybe Int
serverImportFailure :: Maybe Int
name :: Maybe Text
importUrl :: Maybe Text
importTaskId :: Maybe Text
importRequestTime :: Maybe POSIX
importDeletedTime :: Maybe POSIX
importCompletionTime :: Maybe POSIX
errorsAndFailedEntriesZip :: Maybe Text
clientRequestToken :: Maybe Text
applicationImportSuccess :: Maybe Int
applicationImportFailure :: Maybe Int
$sel:status:ImportTask' :: ImportTask -> Maybe ImportStatus
$sel:serverImportSuccess:ImportTask' :: ImportTask -> Maybe Int
$sel:serverImportFailure:ImportTask' :: ImportTask -> Maybe Int
$sel:name:ImportTask' :: ImportTask -> Maybe Text
$sel:importUrl:ImportTask' :: ImportTask -> Maybe Text
$sel:importTaskId:ImportTask' :: ImportTask -> Maybe Text
$sel:importRequestTime:ImportTask' :: ImportTask -> Maybe POSIX
$sel:importDeletedTime:ImportTask' :: ImportTask -> Maybe POSIX
$sel:importCompletionTime:ImportTask' :: ImportTask -> Maybe POSIX
$sel:errorsAndFailedEntriesZip:ImportTask' :: ImportTask -> Maybe Text
$sel:clientRequestToken:ImportTask' :: ImportTask -> Maybe Text
$sel:applicationImportSuccess:ImportTask' :: ImportTask -> Maybe Int
$sel:applicationImportFailure:ImportTask' :: ImportTask -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
applicationImportFailure
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
applicationImportSuccess
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorsAndFailedEntriesZip
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
importCompletionTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
importDeletedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
importRequestTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
importTaskId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
importUrl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
serverImportFailure
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
serverImportSuccess
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImportStatus
status

instance Prelude.NFData ImportTask where
  rnf :: ImportTask -> ()
rnf ImportTask' {Maybe Int
Maybe Text
Maybe POSIX
Maybe ImportStatus
status :: Maybe ImportStatus
serverImportSuccess :: Maybe Int
serverImportFailure :: Maybe Int
name :: Maybe Text
importUrl :: Maybe Text
importTaskId :: Maybe Text
importRequestTime :: Maybe POSIX
importDeletedTime :: Maybe POSIX
importCompletionTime :: Maybe POSIX
errorsAndFailedEntriesZip :: Maybe Text
clientRequestToken :: Maybe Text
applicationImportSuccess :: Maybe Int
applicationImportFailure :: Maybe Int
$sel:status:ImportTask' :: ImportTask -> Maybe ImportStatus
$sel:serverImportSuccess:ImportTask' :: ImportTask -> Maybe Int
$sel:serverImportFailure:ImportTask' :: ImportTask -> Maybe Int
$sel:name:ImportTask' :: ImportTask -> Maybe Text
$sel:importUrl:ImportTask' :: ImportTask -> Maybe Text
$sel:importTaskId:ImportTask' :: ImportTask -> Maybe Text
$sel:importRequestTime:ImportTask' :: ImportTask -> Maybe POSIX
$sel:importDeletedTime:ImportTask' :: ImportTask -> Maybe POSIX
$sel:importCompletionTime:ImportTask' :: ImportTask -> Maybe POSIX
$sel:errorsAndFailedEntriesZip:ImportTask' :: ImportTask -> Maybe Text
$sel:clientRequestToken:ImportTask' :: ImportTask -> Maybe Text
$sel:applicationImportSuccess:ImportTask' :: ImportTask -> Maybe Int
$sel:applicationImportFailure:ImportTask' :: ImportTask -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
applicationImportFailure
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
applicationImportSuccess
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorsAndFailedEntriesZip
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
importCompletionTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
importDeletedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
importRequestTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
importTaskId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
importUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
serverImportFailure
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
serverImportSuccess
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportStatus
status