{-# 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.DynamoDB.Types.ImportTableDescription
-- 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.DynamoDB.Types.ImportTableDescription where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DynamoDB.Types.AttributeValue
import Amazonka.DynamoDB.Types.ImportStatus
import Amazonka.DynamoDB.Types.InputCompressionType
import Amazonka.DynamoDB.Types.InputFormat
import Amazonka.DynamoDB.Types.InputFormatOptions
import Amazonka.DynamoDB.Types.S3BucketSource
import Amazonka.DynamoDB.Types.TableCreationParameters
import Amazonka.DynamoDB.Types.WriteRequest
import qualified Amazonka.Prelude as Prelude

-- | Represents the properties of the table being imported into.
--
-- /See:/ 'newImportTableDescription' smart constructor.
data ImportTableDescription = ImportTableDescription'
  { -- | The client token that was provided for the import task. Reusing the
    -- client token on retry makes a call to @ImportTable@ idempotent.
    ImportTableDescription -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Number (ARN) of the Cloudwatch Log Group associated
    -- with the target table.
    ImportTableDescription -> Maybe Text
cloudWatchLogGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The time at which the creation of the table associated with this import
    -- task completed.
    ImportTableDescription -> Maybe POSIX
endTime :: Prelude.Maybe Data.POSIX,
    -- | The number of errors occurred on importing the source file into the
    -- target table.
    ImportTableDescription -> Maybe Natural
errorCount :: Prelude.Maybe Prelude.Natural,
    -- | The error code corresponding to the failure that the import job ran into
    -- during execution.
    ImportTableDescription -> Maybe Text
failureCode :: Prelude.Maybe Prelude.Text,
    -- | The error message corresponding to the failure that the import job ran
    -- into during execution.
    ImportTableDescription -> Maybe Text
failureMessage :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Number (ARN) corresponding to the import request.
    ImportTableDescription -> Maybe Text
importArn :: Prelude.Maybe Prelude.Text,
    -- | The status of the import.
    ImportTableDescription -> Maybe ImportStatus
importStatus :: Prelude.Maybe ImportStatus,
    -- | The number of items successfully imported into the new table.
    ImportTableDescription -> Maybe Natural
importedItemCount :: Prelude.Maybe Prelude.Natural,
    -- | The compression options for the data that has been imported into the
    -- target table. The values are NONE, GZIP, or ZSTD.
    ImportTableDescription -> Maybe InputCompressionType
inputCompressionType :: Prelude.Maybe InputCompressionType,
    -- | The format of the source data going into the target table.
    ImportTableDescription -> Maybe InputFormat
inputFormat :: Prelude.Maybe InputFormat,
    -- | The format options for the data that was imported into the target table.
    -- There is one value, CsvOption.
    ImportTableDescription -> Maybe InputFormatOptions
inputFormatOptions :: Prelude.Maybe InputFormatOptions,
    -- | The total number of items processed from the source file.
    ImportTableDescription -> Maybe Natural
processedItemCount :: Prelude.Maybe Prelude.Natural,
    -- | The total size of data processed from the source file, in Bytes.
    ImportTableDescription -> Maybe Integer
processedSizeBytes :: Prelude.Maybe Prelude.Integer,
    -- | Values for the S3 bucket the source file is imported from. Includes
    -- bucket name (required), key prefix (optional) and bucket account owner
    -- ID (optional).
    ImportTableDescription -> Maybe S3BucketSource
s3BucketSource :: Prelude.Maybe S3BucketSource,
    -- | The time when this import task started.
    ImportTableDescription -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX,
    -- | The Amazon Resource Number (ARN) of the table being imported into.
    ImportTableDescription -> Maybe Text
tableArn :: Prelude.Maybe Prelude.Text,
    -- | The parameters for the new table that is being imported into.
    ImportTableDescription -> Maybe TableCreationParameters
tableCreationParameters :: Prelude.Maybe TableCreationParameters,
    -- | The table id corresponding to the table created by import table process.
    ImportTableDescription -> Maybe Text
tableId :: Prelude.Maybe Prelude.Text
  }
  deriving (ImportTableDescription -> ImportTableDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportTableDescription -> ImportTableDescription -> Bool
$c/= :: ImportTableDescription -> ImportTableDescription -> Bool
== :: ImportTableDescription -> ImportTableDescription -> Bool
$c== :: ImportTableDescription -> ImportTableDescription -> Bool
Prelude.Eq, ReadPrec [ImportTableDescription]
ReadPrec ImportTableDescription
Int -> ReadS ImportTableDescription
ReadS [ImportTableDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportTableDescription]
$creadListPrec :: ReadPrec [ImportTableDescription]
readPrec :: ReadPrec ImportTableDescription
$creadPrec :: ReadPrec ImportTableDescription
readList :: ReadS [ImportTableDescription]
$creadList :: ReadS [ImportTableDescription]
readsPrec :: Int -> ReadS ImportTableDescription
$creadsPrec :: Int -> ReadS ImportTableDescription
Prelude.Read, Int -> ImportTableDescription -> ShowS
[ImportTableDescription] -> ShowS
ImportTableDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportTableDescription] -> ShowS
$cshowList :: [ImportTableDescription] -> ShowS
show :: ImportTableDescription -> String
$cshow :: ImportTableDescription -> String
showsPrec :: Int -> ImportTableDescription -> ShowS
$cshowsPrec :: Int -> ImportTableDescription -> ShowS
Prelude.Show, forall x. Rep ImportTableDescription x -> ImportTableDescription
forall x. ImportTableDescription -> Rep ImportTableDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportTableDescription x -> ImportTableDescription
$cfrom :: forall x. ImportTableDescription -> Rep ImportTableDescription x
Prelude.Generic)

-- |
-- Create a value of 'ImportTableDescription' 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:
--
-- 'clientToken', 'importTableDescription_clientToken' - The client token that was provided for the import task. Reusing the
-- client token on retry makes a call to @ImportTable@ idempotent.
--
-- 'cloudWatchLogGroupArn', 'importTableDescription_cloudWatchLogGroupArn' - The Amazon Resource Number (ARN) of the Cloudwatch Log Group associated
-- with the target table.
--
-- 'endTime', 'importTableDescription_endTime' - The time at which the creation of the table associated with this import
-- task completed.
--
-- 'errorCount', 'importTableDescription_errorCount' - The number of errors occurred on importing the source file into the
-- target table.
--
-- 'failureCode', 'importTableDescription_failureCode' - The error code corresponding to the failure that the import job ran into
-- during execution.
--
-- 'failureMessage', 'importTableDescription_failureMessage' - The error message corresponding to the failure that the import job ran
-- into during execution.
--
-- 'importArn', 'importTableDescription_importArn' - The Amazon Resource Number (ARN) corresponding to the import request.
--
-- 'importStatus', 'importTableDescription_importStatus' - The status of the import.
--
-- 'importedItemCount', 'importTableDescription_importedItemCount' - The number of items successfully imported into the new table.
--
-- 'inputCompressionType', 'importTableDescription_inputCompressionType' - The compression options for the data that has been imported into the
-- target table. The values are NONE, GZIP, or ZSTD.
--
-- 'inputFormat', 'importTableDescription_inputFormat' - The format of the source data going into the target table.
--
-- 'inputFormatOptions', 'importTableDescription_inputFormatOptions' - The format options for the data that was imported into the target table.
-- There is one value, CsvOption.
--
-- 'processedItemCount', 'importTableDescription_processedItemCount' - The total number of items processed from the source file.
--
-- 'processedSizeBytes', 'importTableDescription_processedSizeBytes' - The total size of data processed from the source file, in Bytes.
--
-- 's3BucketSource', 'importTableDescription_s3BucketSource' - Values for the S3 bucket the source file is imported from. Includes
-- bucket name (required), key prefix (optional) and bucket account owner
-- ID (optional).
--
-- 'startTime', 'importTableDescription_startTime' - The time when this import task started.
--
-- 'tableArn', 'importTableDescription_tableArn' - The Amazon Resource Number (ARN) of the table being imported into.
--
-- 'tableCreationParameters', 'importTableDescription_tableCreationParameters' - The parameters for the new table that is being imported into.
--
-- 'tableId', 'importTableDescription_tableId' - The table id corresponding to the table created by import table process.
newImportTableDescription ::
  ImportTableDescription
newImportTableDescription :: ImportTableDescription
newImportTableDescription =
  ImportTableDescription'
    { $sel:clientToken:ImportTableDescription' :: Maybe Text
clientToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLogGroupArn:ImportTableDescription' :: Maybe Text
cloudWatchLogGroupArn = forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:ImportTableDescription' :: Maybe POSIX
endTime = forall a. Maybe a
Prelude.Nothing,
      $sel:errorCount:ImportTableDescription' :: Maybe Natural
errorCount = forall a. Maybe a
Prelude.Nothing,
      $sel:failureCode:ImportTableDescription' :: Maybe Text
failureCode = forall a. Maybe a
Prelude.Nothing,
      $sel:failureMessage:ImportTableDescription' :: Maybe Text
failureMessage = forall a. Maybe a
Prelude.Nothing,
      $sel:importArn:ImportTableDescription' :: Maybe Text
importArn = forall a. Maybe a
Prelude.Nothing,
      $sel:importStatus:ImportTableDescription' :: Maybe ImportStatus
importStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:importedItemCount:ImportTableDescription' :: Maybe Natural
importedItemCount = forall a. Maybe a
Prelude.Nothing,
      $sel:inputCompressionType:ImportTableDescription' :: Maybe InputCompressionType
inputCompressionType = forall a. Maybe a
Prelude.Nothing,
      $sel:inputFormat:ImportTableDescription' :: Maybe InputFormat
inputFormat = forall a. Maybe a
Prelude.Nothing,
      $sel:inputFormatOptions:ImportTableDescription' :: Maybe InputFormatOptions
inputFormatOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:processedItemCount:ImportTableDescription' :: Maybe Natural
processedItemCount = forall a. Maybe a
Prelude.Nothing,
      $sel:processedSizeBytes:ImportTableDescription' :: Maybe Integer
processedSizeBytes = forall a. Maybe a
Prelude.Nothing,
      $sel:s3BucketSource:ImportTableDescription' :: Maybe S3BucketSource
s3BucketSource = forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:ImportTableDescription' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing,
      $sel:tableArn:ImportTableDescription' :: Maybe Text
tableArn = forall a. Maybe a
Prelude.Nothing,
      $sel:tableCreationParameters:ImportTableDescription' :: Maybe TableCreationParameters
tableCreationParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:tableId:ImportTableDescription' :: Maybe Text
tableId = forall a. Maybe a
Prelude.Nothing
    }

-- | The client token that was provided for the import task. Reusing the
-- client token on retry makes a call to @ImportTable@ idempotent.
importTableDescription_clientToken :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Text)
importTableDescription_clientToken :: Lens' ImportTableDescription (Maybe Text)
importTableDescription_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:ImportTableDescription' :: ImportTableDescription -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Text
a -> ImportTableDescription
s {$sel:clientToken:ImportTableDescription' :: Maybe Text
clientToken = Maybe Text
a} :: ImportTableDescription)

-- | The Amazon Resource Number (ARN) of the Cloudwatch Log Group associated
-- with the target table.
importTableDescription_cloudWatchLogGroupArn :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Text)
importTableDescription_cloudWatchLogGroupArn :: Lens' ImportTableDescription (Maybe Text)
importTableDescription_cloudWatchLogGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Text
cloudWatchLogGroupArn :: Maybe Text
$sel:cloudWatchLogGroupArn:ImportTableDescription' :: ImportTableDescription -> Maybe Text
cloudWatchLogGroupArn} -> Maybe Text
cloudWatchLogGroupArn) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Text
a -> ImportTableDescription
s {$sel:cloudWatchLogGroupArn:ImportTableDescription' :: Maybe Text
cloudWatchLogGroupArn = Maybe Text
a} :: ImportTableDescription)

-- | The time at which the creation of the table associated with this import
-- task completed.
importTableDescription_endTime :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.UTCTime)
importTableDescription_endTime :: Lens' ImportTableDescription (Maybe UTCTime)
importTableDescription_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:ImportTableDescription' :: ImportTableDescription -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe POSIX
a -> ImportTableDescription
s {$sel:endTime:ImportTableDescription' :: Maybe POSIX
endTime = Maybe POSIX
a} :: ImportTableDescription) 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 errors occurred on importing the source file into the
-- target table.
importTableDescription_errorCount :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Natural)
importTableDescription_errorCount :: Lens' ImportTableDescription (Maybe Natural)
importTableDescription_errorCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Natural
errorCount :: Maybe Natural
$sel:errorCount:ImportTableDescription' :: ImportTableDescription -> Maybe Natural
errorCount} -> Maybe Natural
errorCount) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Natural
a -> ImportTableDescription
s {$sel:errorCount:ImportTableDescription' :: Maybe Natural
errorCount = Maybe Natural
a} :: ImportTableDescription)

-- | The error code corresponding to the failure that the import job ran into
-- during execution.
importTableDescription_failureCode :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Text)
importTableDescription_failureCode :: Lens' ImportTableDescription (Maybe Text)
importTableDescription_failureCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Text
failureCode :: Maybe Text
$sel:failureCode:ImportTableDescription' :: ImportTableDescription -> Maybe Text
failureCode} -> Maybe Text
failureCode) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Text
a -> ImportTableDescription
s {$sel:failureCode:ImportTableDescription' :: Maybe Text
failureCode = Maybe Text
a} :: ImportTableDescription)

-- | The error message corresponding to the failure that the import job ran
-- into during execution.
importTableDescription_failureMessage :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Text)
importTableDescription_failureMessage :: Lens' ImportTableDescription (Maybe Text)
importTableDescription_failureMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Text
failureMessage :: Maybe Text
$sel:failureMessage:ImportTableDescription' :: ImportTableDescription -> Maybe Text
failureMessage} -> Maybe Text
failureMessage) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Text
a -> ImportTableDescription
s {$sel:failureMessage:ImportTableDescription' :: Maybe Text
failureMessage = Maybe Text
a} :: ImportTableDescription)

-- | The Amazon Resource Number (ARN) corresponding to the import request.
importTableDescription_importArn :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Text)
importTableDescription_importArn :: Lens' ImportTableDescription (Maybe Text)
importTableDescription_importArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Text
importArn :: Maybe Text
$sel:importArn:ImportTableDescription' :: ImportTableDescription -> Maybe Text
importArn} -> Maybe Text
importArn) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Text
a -> ImportTableDescription
s {$sel:importArn:ImportTableDescription' :: Maybe Text
importArn = Maybe Text
a} :: ImportTableDescription)

-- | The status of the import.
importTableDescription_importStatus :: Lens.Lens' ImportTableDescription (Prelude.Maybe ImportStatus)
importTableDescription_importStatus :: Lens' ImportTableDescription (Maybe ImportStatus)
importTableDescription_importStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe ImportStatus
importStatus :: Maybe ImportStatus
$sel:importStatus:ImportTableDescription' :: ImportTableDescription -> Maybe ImportStatus
importStatus} -> Maybe ImportStatus
importStatus) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe ImportStatus
a -> ImportTableDescription
s {$sel:importStatus:ImportTableDescription' :: Maybe ImportStatus
importStatus = Maybe ImportStatus
a} :: ImportTableDescription)

-- | The number of items successfully imported into the new table.
importTableDescription_importedItemCount :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Natural)
importTableDescription_importedItemCount :: Lens' ImportTableDescription (Maybe Natural)
importTableDescription_importedItemCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Natural
importedItemCount :: Maybe Natural
$sel:importedItemCount:ImportTableDescription' :: ImportTableDescription -> Maybe Natural
importedItemCount} -> Maybe Natural
importedItemCount) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Natural
a -> ImportTableDescription
s {$sel:importedItemCount:ImportTableDescription' :: Maybe Natural
importedItemCount = Maybe Natural
a} :: ImportTableDescription)

-- | The compression options for the data that has been imported into the
-- target table. The values are NONE, GZIP, or ZSTD.
importTableDescription_inputCompressionType :: Lens.Lens' ImportTableDescription (Prelude.Maybe InputCompressionType)
importTableDescription_inputCompressionType :: Lens' ImportTableDescription (Maybe InputCompressionType)
importTableDescription_inputCompressionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe InputCompressionType
inputCompressionType :: Maybe InputCompressionType
$sel:inputCompressionType:ImportTableDescription' :: ImportTableDescription -> Maybe InputCompressionType
inputCompressionType} -> Maybe InputCompressionType
inputCompressionType) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe InputCompressionType
a -> ImportTableDescription
s {$sel:inputCompressionType:ImportTableDescription' :: Maybe InputCompressionType
inputCompressionType = Maybe InputCompressionType
a} :: ImportTableDescription)

-- | The format of the source data going into the target table.
importTableDescription_inputFormat :: Lens.Lens' ImportTableDescription (Prelude.Maybe InputFormat)
importTableDescription_inputFormat :: Lens' ImportTableDescription (Maybe InputFormat)
importTableDescription_inputFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe InputFormat
inputFormat :: Maybe InputFormat
$sel:inputFormat:ImportTableDescription' :: ImportTableDescription -> Maybe InputFormat
inputFormat} -> Maybe InputFormat
inputFormat) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe InputFormat
a -> ImportTableDescription
s {$sel:inputFormat:ImportTableDescription' :: Maybe InputFormat
inputFormat = Maybe InputFormat
a} :: ImportTableDescription)

-- | The format options for the data that was imported into the target table.
-- There is one value, CsvOption.
importTableDescription_inputFormatOptions :: Lens.Lens' ImportTableDescription (Prelude.Maybe InputFormatOptions)
importTableDescription_inputFormatOptions :: Lens' ImportTableDescription (Maybe InputFormatOptions)
importTableDescription_inputFormatOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe InputFormatOptions
inputFormatOptions :: Maybe InputFormatOptions
$sel:inputFormatOptions:ImportTableDescription' :: ImportTableDescription -> Maybe InputFormatOptions
inputFormatOptions} -> Maybe InputFormatOptions
inputFormatOptions) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe InputFormatOptions
a -> ImportTableDescription
s {$sel:inputFormatOptions:ImportTableDescription' :: Maybe InputFormatOptions
inputFormatOptions = Maybe InputFormatOptions
a} :: ImportTableDescription)

-- | The total number of items processed from the source file.
importTableDescription_processedItemCount :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Natural)
importTableDescription_processedItemCount :: Lens' ImportTableDescription (Maybe Natural)
importTableDescription_processedItemCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Natural
processedItemCount :: Maybe Natural
$sel:processedItemCount:ImportTableDescription' :: ImportTableDescription -> Maybe Natural
processedItemCount} -> Maybe Natural
processedItemCount) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Natural
a -> ImportTableDescription
s {$sel:processedItemCount:ImportTableDescription' :: Maybe Natural
processedItemCount = Maybe Natural
a} :: ImportTableDescription)

-- | The total size of data processed from the source file, in Bytes.
importTableDescription_processedSizeBytes :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Integer)
importTableDescription_processedSizeBytes :: Lens' ImportTableDescription (Maybe Integer)
importTableDescription_processedSizeBytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Integer
processedSizeBytes :: Maybe Integer
$sel:processedSizeBytes:ImportTableDescription' :: ImportTableDescription -> Maybe Integer
processedSizeBytes} -> Maybe Integer
processedSizeBytes) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Integer
a -> ImportTableDescription
s {$sel:processedSizeBytes:ImportTableDescription' :: Maybe Integer
processedSizeBytes = Maybe Integer
a} :: ImportTableDescription)

-- | Values for the S3 bucket the source file is imported from. Includes
-- bucket name (required), key prefix (optional) and bucket account owner
-- ID (optional).
importTableDescription_s3BucketSource :: Lens.Lens' ImportTableDescription (Prelude.Maybe S3BucketSource)
importTableDescription_s3BucketSource :: Lens' ImportTableDescription (Maybe S3BucketSource)
importTableDescription_s3BucketSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe S3BucketSource
s3BucketSource :: Maybe S3BucketSource
$sel:s3BucketSource:ImportTableDescription' :: ImportTableDescription -> Maybe S3BucketSource
s3BucketSource} -> Maybe S3BucketSource
s3BucketSource) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe S3BucketSource
a -> ImportTableDescription
s {$sel:s3BucketSource:ImportTableDescription' :: Maybe S3BucketSource
s3BucketSource = Maybe S3BucketSource
a} :: ImportTableDescription)

-- | The time when this import task started.
importTableDescription_startTime :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.UTCTime)
importTableDescription_startTime :: Lens' ImportTableDescription (Maybe UTCTime)
importTableDescription_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:ImportTableDescription' :: ImportTableDescription -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe POSIX
a -> ImportTableDescription
s {$sel:startTime:ImportTableDescription' :: Maybe POSIX
startTime = Maybe POSIX
a} :: ImportTableDescription) 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 Amazon Resource Number (ARN) of the table being imported into.
importTableDescription_tableArn :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Text)
importTableDescription_tableArn :: Lens' ImportTableDescription (Maybe Text)
importTableDescription_tableArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Text
tableArn :: Maybe Text
$sel:tableArn:ImportTableDescription' :: ImportTableDescription -> Maybe Text
tableArn} -> Maybe Text
tableArn) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Text
a -> ImportTableDescription
s {$sel:tableArn:ImportTableDescription' :: Maybe Text
tableArn = Maybe Text
a} :: ImportTableDescription)

-- | The parameters for the new table that is being imported into.
importTableDescription_tableCreationParameters :: Lens.Lens' ImportTableDescription (Prelude.Maybe TableCreationParameters)
importTableDescription_tableCreationParameters :: Lens' ImportTableDescription (Maybe TableCreationParameters)
importTableDescription_tableCreationParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe TableCreationParameters
tableCreationParameters :: Maybe TableCreationParameters
$sel:tableCreationParameters:ImportTableDescription' :: ImportTableDescription -> Maybe TableCreationParameters
tableCreationParameters} -> Maybe TableCreationParameters
tableCreationParameters) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe TableCreationParameters
a -> ImportTableDescription
s {$sel:tableCreationParameters:ImportTableDescription' :: Maybe TableCreationParameters
tableCreationParameters = Maybe TableCreationParameters
a} :: ImportTableDescription)

-- | The table id corresponding to the table created by import table process.
importTableDescription_tableId :: Lens.Lens' ImportTableDescription (Prelude.Maybe Prelude.Text)
importTableDescription_tableId :: Lens' ImportTableDescription (Maybe Text)
importTableDescription_tableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportTableDescription' {Maybe Text
tableId :: Maybe Text
$sel:tableId:ImportTableDescription' :: ImportTableDescription -> Maybe Text
tableId} -> Maybe Text
tableId) (\s :: ImportTableDescription
s@ImportTableDescription' {} Maybe Text
a -> ImportTableDescription
s {$sel:tableId:ImportTableDescription' :: Maybe Text
tableId = Maybe Text
a} :: ImportTableDescription)

instance Data.FromJSON ImportTableDescription where
  parseJSON :: Value -> Parser ImportTableDescription
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ImportTableDescription"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ImportStatus
-> Maybe Natural
-> Maybe InputCompressionType
-> Maybe InputFormat
-> Maybe InputFormatOptions
-> Maybe Natural
-> Maybe Integer
-> Maybe S3BucketSource
-> Maybe POSIX
-> Maybe Text
-> Maybe TableCreationParameters
-> Maybe Text
-> ImportTableDescription
ImportTableDescription'
            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
"ClientToken")
            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
"CloudWatchLogGroupArn")
            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
"EndTime")
            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
"ErrorCount")
            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
"FailureCode")
            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
"FailureMessage")
            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
"ImportArn")
            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
"ImportStatus")
            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
"ImportedItemCount")
            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
"InputCompressionType")
            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
"InputFormat")
            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
"InputFormatOptions")
            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
"ProcessedItemCount")
            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
"ProcessedSizeBytes")
            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
"S3BucketSource")
            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
"StartTime")
            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
"TableArn")
            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
"TableCreationParameters")
            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
"TableId")
      )

instance Prelude.Hashable ImportTableDescription where
  hashWithSalt :: Int -> ImportTableDescription -> Int
hashWithSalt Int
_salt ImportTableDescription' {Maybe Integer
Maybe Natural
Maybe Text
Maybe POSIX
Maybe S3BucketSource
Maybe InputFormat
Maybe InputCompressionType
Maybe ImportStatus
Maybe InputFormatOptions
Maybe TableCreationParameters
tableId :: Maybe Text
tableCreationParameters :: Maybe TableCreationParameters
tableArn :: Maybe Text
startTime :: Maybe POSIX
s3BucketSource :: Maybe S3BucketSource
processedSizeBytes :: Maybe Integer
processedItemCount :: Maybe Natural
inputFormatOptions :: Maybe InputFormatOptions
inputFormat :: Maybe InputFormat
inputCompressionType :: Maybe InputCompressionType
importedItemCount :: Maybe Natural
importStatus :: Maybe ImportStatus
importArn :: Maybe Text
failureMessage :: Maybe Text
failureCode :: Maybe Text
errorCount :: Maybe Natural
endTime :: Maybe POSIX
cloudWatchLogGroupArn :: Maybe Text
clientToken :: Maybe Text
$sel:tableId:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:tableCreationParameters:ImportTableDescription' :: ImportTableDescription -> Maybe TableCreationParameters
$sel:tableArn:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:startTime:ImportTableDescription' :: ImportTableDescription -> Maybe POSIX
$sel:s3BucketSource:ImportTableDescription' :: ImportTableDescription -> Maybe S3BucketSource
$sel:processedSizeBytes:ImportTableDescription' :: ImportTableDescription -> Maybe Integer
$sel:processedItemCount:ImportTableDescription' :: ImportTableDescription -> Maybe Natural
$sel:inputFormatOptions:ImportTableDescription' :: ImportTableDescription -> Maybe InputFormatOptions
$sel:inputFormat:ImportTableDescription' :: ImportTableDescription -> Maybe InputFormat
$sel:inputCompressionType:ImportTableDescription' :: ImportTableDescription -> Maybe InputCompressionType
$sel:importedItemCount:ImportTableDescription' :: ImportTableDescription -> Maybe Natural
$sel:importStatus:ImportTableDescription' :: ImportTableDescription -> Maybe ImportStatus
$sel:importArn:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:failureMessage:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:failureCode:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:errorCount:ImportTableDescription' :: ImportTableDescription -> Maybe Natural
$sel:endTime:ImportTableDescription' :: ImportTableDescription -> Maybe POSIX
$sel:cloudWatchLogGroupArn:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:clientToken:ImportTableDescription' :: ImportTableDescription -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cloudWatchLogGroupArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
endTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
errorCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
failureCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
failureMessage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
importArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImportStatus
importStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
importedItemCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputCompressionType
inputCompressionType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputFormat
inputFormat
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputFormatOptions
inputFormatOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
processedItemCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
processedSizeBytes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3BucketSource
s3BucketSource
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tableArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TableCreationParameters
tableCreationParameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tableId

instance Prelude.NFData ImportTableDescription where
  rnf :: ImportTableDescription -> ()
rnf ImportTableDescription' {Maybe Integer
Maybe Natural
Maybe Text
Maybe POSIX
Maybe S3BucketSource
Maybe InputFormat
Maybe InputCompressionType
Maybe ImportStatus
Maybe InputFormatOptions
Maybe TableCreationParameters
tableId :: Maybe Text
tableCreationParameters :: Maybe TableCreationParameters
tableArn :: Maybe Text
startTime :: Maybe POSIX
s3BucketSource :: Maybe S3BucketSource
processedSizeBytes :: Maybe Integer
processedItemCount :: Maybe Natural
inputFormatOptions :: Maybe InputFormatOptions
inputFormat :: Maybe InputFormat
inputCompressionType :: Maybe InputCompressionType
importedItemCount :: Maybe Natural
importStatus :: Maybe ImportStatus
importArn :: Maybe Text
failureMessage :: Maybe Text
failureCode :: Maybe Text
errorCount :: Maybe Natural
endTime :: Maybe POSIX
cloudWatchLogGroupArn :: Maybe Text
clientToken :: Maybe Text
$sel:tableId:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:tableCreationParameters:ImportTableDescription' :: ImportTableDescription -> Maybe TableCreationParameters
$sel:tableArn:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:startTime:ImportTableDescription' :: ImportTableDescription -> Maybe POSIX
$sel:s3BucketSource:ImportTableDescription' :: ImportTableDescription -> Maybe S3BucketSource
$sel:processedSizeBytes:ImportTableDescription' :: ImportTableDescription -> Maybe Integer
$sel:processedItemCount:ImportTableDescription' :: ImportTableDescription -> Maybe Natural
$sel:inputFormatOptions:ImportTableDescription' :: ImportTableDescription -> Maybe InputFormatOptions
$sel:inputFormat:ImportTableDescription' :: ImportTableDescription -> Maybe InputFormat
$sel:inputCompressionType:ImportTableDescription' :: ImportTableDescription -> Maybe InputCompressionType
$sel:importedItemCount:ImportTableDescription' :: ImportTableDescription -> Maybe Natural
$sel:importStatus:ImportTableDescription' :: ImportTableDescription -> Maybe ImportStatus
$sel:importArn:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:failureMessage:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:failureCode:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:errorCount:ImportTableDescription' :: ImportTableDescription -> Maybe Natural
$sel:endTime:ImportTableDescription' :: ImportTableDescription -> Maybe POSIX
$sel:cloudWatchLogGroupArn:ImportTableDescription' :: ImportTableDescription -> Maybe Text
$sel:clientToken:ImportTableDescription' :: ImportTableDescription -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cloudWatchLogGroupArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
endTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
errorCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
importArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportStatus
importStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
importedItemCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputCompressionType
inputCompressionType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputFormat
inputFormat
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputFormatOptions
inputFormatOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
processedItemCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
processedSizeBytes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe S3BucketSource
s3BucketSource
      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 Text
tableArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe TableCreationParameters
tableCreationParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tableId