{-# 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.FraudDetector.Types.BatchImport
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.FraudDetector.Types.BatchImport where

import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.Types.AsyncJobStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The batch import job details.
--
-- /See:/ 'newBatchImport' smart constructor.
data BatchImport = BatchImport'
  { -- | The reason batch import job failed.
    BatchImport -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the IAM role to use for this job request.
    BatchImport -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The status of the batch import job.
    BatchImport -> Maybe AsyncJobStatus
status :: Prelude.Maybe AsyncJobStatus,
    -- | The number of records processed by batch import job.
    BatchImport -> Maybe Int
processedRecordsCount :: Prelude.Maybe Prelude.Int,
    -- | The total number of records in the batch import job.
    BatchImport -> Maybe Int
totalRecordsCount :: Prelude.Maybe Prelude.Int,
    -- | The ID of the batch import job.
    BatchImport -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the batch import job.
    BatchImport -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Timestamp of when the batch import job started.
    BatchImport -> Maybe Text
startTime :: Prelude.Maybe Prelude.Text,
    -- | The name of the event type.
    BatchImport -> Maybe Text
eventTypeName :: Prelude.Maybe Prelude.Text,
    -- | Timestamp of when batch import job completed.
    BatchImport -> Maybe Text
completionTime :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 location of your output file.
    BatchImport -> Maybe Text
outputPath :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 location of your data file for batch import.
    BatchImport -> Maybe Text
inputPath :: Prelude.Maybe Prelude.Text,
    -- | The number of records that failed to import.
    BatchImport -> Maybe Int
failedRecordsCount :: Prelude.Maybe Prelude.Int
  }
  deriving (BatchImport -> BatchImport -> Bool
(BatchImport -> BatchImport -> Bool)
-> (BatchImport -> BatchImport -> Bool) -> Eq BatchImport
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchImport -> BatchImport -> Bool
$c/= :: BatchImport -> BatchImport -> Bool
== :: BatchImport -> BatchImport -> Bool
$c== :: BatchImport -> BatchImport -> Bool
Prelude.Eq, ReadPrec [BatchImport]
ReadPrec BatchImport
Int -> ReadS BatchImport
ReadS [BatchImport]
(Int -> ReadS BatchImport)
-> ReadS [BatchImport]
-> ReadPrec BatchImport
-> ReadPrec [BatchImport]
-> Read BatchImport
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchImport]
$creadListPrec :: ReadPrec [BatchImport]
readPrec :: ReadPrec BatchImport
$creadPrec :: ReadPrec BatchImport
readList :: ReadS [BatchImport]
$creadList :: ReadS [BatchImport]
readsPrec :: Int -> ReadS BatchImport
$creadsPrec :: Int -> ReadS BatchImport
Prelude.Read, Int -> BatchImport -> ShowS
[BatchImport] -> ShowS
BatchImport -> String
(Int -> BatchImport -> ShowS)
-> (BatchImport -> String)
-> ([BatchImport] -> ShowS)
-> Show BatchImport
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchImport] -> ShowS
$cshowList :: [BatchImport] -> ShowS
show :: BatchImport -> String
$cshow :: BatchImport -> String
showsPrec :: Int -> BatchImport -> ShowS
$cshowsPrec :: Int -> BatchImport -> ShowS
Prelude.Show, (forall x. BatchImport -> Rep BatchImport x)
-> (forall x. Rep BatchImport x -> BatchImport)
-> Generic BatchImport
forall x. Rep BatchImport x -> BatchImport
forall x. BatchImport -> Rep BatchImport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchImport x -> BatchImport
$cfrom :: forall x. BatchImport -> Rep BatchImport x
Prelude.Generic)

-- |
-- Create a value of 'BatchImport' 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:
--
-- 'failureReason', 'batchImport_failureReason' - The reason batch import job failed.
--
-- 'iamRoleArn', 'batchImport_iamRoleArn' - The ARN of the IAM role to use for this job request.
--
-- 'status', 'batchImport_status' - The status of the batch import job.
--
-- 'processedRecordsCount', 'batchImport_processedRecordsCount' - The number of records processed by batch import job.
--
-- 'totalRecordsCount', 'batchImport_totalRecordsCount' - The total number of records in the batch import job.
--
-- 'jobId', 'batchImport_jobId' - The ID of the batch import job.
--
-- 'arn', 'batchImport_arn' - The ARN of the batch import job.
--
-- 'startTime', 'batchImport_startTime' - Timestamp of when the batch import job started.
--
-- 'eventTypeName', 'batchImport_eventTypeName' - The name of the event type.
--
-- 'completionTime', 'batchImport_completionTime' - Timestamp of when batch import job completed.
--
-- 'outputPath', 'batchImport_outputPath' - The Amazon S3 location of your output file.
--
-- 'inputPath', 'batchImport_inputPath' - The Amazon S3 location of your data file for batch import.
--
-- 'failedRecordsCount', 'batchImport_failedRecordsCount' - The number of records that failed to import.
newBatchImport ::
  BatchImport
newBatchImport :: BatchImport
newBatchImport =
  BatchImport' :: Maybe Text
-> Maybe Text
-> Maybe AsyncJobStatus
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> BatchImport
BatchImport'
    { $sel:failureReason:BatchImport' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRoleArn:BatchImport' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:BatchImport' :: Maybe AsyncJobStatus
status = Maybe AsyncJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:processedRecordsCount:BatchImport' :: Maybe Int
processedRecordsCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:totalRecordsCount:BatchImport' :: Maybe Int
totalRecordsCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:BatchImport' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:BatchImport' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:BatchImport' :: Maybe Text
startTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eventTypeName:BatchImport' :: Maybe Text
eventTypeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:completionTime:BatchImport' :: Maybe Text
completionTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputPath:BatchImport' :: Maybe Text
outputPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputPath:BatchImport' :: Maybe Text
inputPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:failedRecordsCount:BatchImport' :: Maybe Int
failedRecordsCount = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The reason batch import job failed.
batchImport_failureReason :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Text)
batchImport_failureReason :: (Maybe Text -> f (Maybe Text)) -> BatchImport -> f BatchImport
batchImport_failureReason = (BatchImport -> Maybe Text)
-> (BatchImport -> Maybe Text -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:BatchImport' :: BatchImport -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: BatchImport
s@BatchImport' {} Maybe Text
a -> BatchImport
s {$sel:failureReason:BatchImport' :: Maybe Text
failureReason = Maybe Text
a} :: BatchImport)

-- | The ARN of the IAM role to use for this job request.
batchImport_iamRoleArn :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Text)
batchImport_iamRoleArn :: (Maybe Text -> f (Maybe Text)) -> BatchImport -> f BatchImport
batchImport_iamRoleArn = (BatchImport -> Maybe Text)
-> (BatchImport -> Maybe Text -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Text
iamRoleArn :: Maybe Text
$sel:iamRoleArn:BatchImport' :: BatchImport -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: BatchImport
s@BatchImport' {} Maybe Text
a -> BatchImport
s {$sel:iamRoleArn:BatchImport' :: Maybe Text
iamRoleArn = Maybe Text
a} :: BatchImport)

-- | The status of the batch import job.
batchImport_status :: Lens.Lens' BatchImport (Prelude.Maybe AsyncJobStatus)
batchImport_status :: (Maybe AsyncJobStatus -> f (Maybe AsyncJobStatus))
-> BatchImport -> f BatchImport
batchImport_status = (BatchImport -> Maybe AsyncJobStatus)
-> (BatchImport -> Maybe AsyncJobStatus -> BatchImport)
-> Lens
     BatchImport
     BatchImport
     (Maybe AsyncJobStatus)
     (Maybe AsyncJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe AsyncJobStatus
status :: Maybe AsyncJobStatus
$sel:status:BatchImport' :: BatchImport -> Maybe AsyncJobStatus
status} -> Maybe AsyncJobStatus
status) (\s :: BatchImport
s@BatchImport' {} Maybe AsyncJobStatus
a -> BatchImport
s {$sel:status:BatchImport' :: Maybe AsyncJobStatus
status = Maybe AsyncJobStatus
a} :: BatchImport)

-- | The number of records processed by batch import job.
batchImport_processedRecordsCount :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Int)
batchImport_processedRecordsCount :: (Maybe Int -> f (Maybe Int)) -> BatchImport -> f BatchImport
batchImport_processedRecordsCount = (BatchImport -> Maybe Int)
-> (BatchImport -> Maybe Int -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Int
processedRecordsCount :: Maybe Int
$sel:processedRecordsCount:BatchImport' :: BatchImport -> Maybe Int
processedRecordsCount} -> Maybe Int
processedRecordsCount) (\s :: BatchImport
s@BatchImport' {} Maybe Int
a -> BatchImport
s {$sel:processedRecordsCount:BatchImport' :: Maybe Int
processedRecordsCount = Maybe Int
a} :: BatchImport)

-- | The total number of records in the batch import job.
batchImport_totalRecordsCount :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Int)
batchImport_totalRecordsCount :: (Maybe Int -> f (Maybe Int)) -> BatchImport -> f BatchImport
batchImport_totalRecordsCount = (BatchImport -> Maybe Int)
-> (BatchImport -> Maybe Int -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Int
totalRecordsCount :: Maybe Int
$sel:totalRecordsCount:BatchImport' :: BatchImport -> Maybe Int
totalRecordsCount} -> Maybe Int
totalRecordsCount) (\s :: BatchImport
s@BatchImport' {} Maybe Int
a -> BatchImport
s {$sel:totalRecordsCount:BatchImport' :: Maybe Int
totalRecordsCount = Maybe Int
a} :: BatchImport)

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

-- | The ARN of the batch import job.
batchImport_arn :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Text)
batchImport_arn :: (Maybe Text -> f (Maybe Text)) -> BatchImport -> f BatchImport
batchImport_arn = (BatchImport -> Maybe Text)
-> (BatchImport -> Maybe Text -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Text
arn :: Maybe Text
$sel:arn:BatchImport' :: BatchImport -> Maybe Text
arn} -> Maybe Text
arn) (\s :: BatchImport
s@BatchImport' {} Maybe Text
a -> BatchImport
s {$sel:arn:BatchImport' :: Maybe Text
arn = Maybe Text
a} :: BatchImport)

-- | Timestamp of when the batch import job started.
batchImport_startTime :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Text)
batchImport_startTime :: (Maybe Text -> f (Maybe Text)) -> BatchImport -> f BatchImport
batchImport_startTime = (BatchImport -> Maybe Text)
-> (BatchImport -> Maybe Text -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Text
startTime :: Maybe Text
$sel:startTime:BatchImport' :: BatchImport -> Maybe Text
startTime} -> Maybe Text
startTime) (\s :: BatchImport
s@BatchImport' {} Maybe Text
a -> BatchImport
s {$sel:startTime:BatchImport' :: Maybe Text
startTime = Maybe Text
a} :: BatchImport)

-- | The name of the event type.
batchImport_eventTypeName :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Text)
batchImport_eventTypeName :: (Maybe Text -> f (Maybe Text)) -> BatchImport -> f BatchImport
batchImport_eventTypeName = (BatchImport -> Maybe Text)
-> (BatchImport -> Maybe Text -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Text
eventTypeName :: Maybe Text
$sel:eventTypeName:BatchImport' :: BatchImport -> Maybe Text
eventTypeName} -> Maybe Text
eventTypeName) (\s :: BatchImport
s@BatchImport' {} Maybe Text
a -> BatchImport
s {$sel:eventTypeName:BatchImport' :: Maybe Text
eventTypeName = Maybe Text
a} :: BatchImport)

-- | Timestamp of when batch import job completed.
batchImport_completionTime :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Text)
batchImport_completionTime :: (Maybe Text -> f (Maybe Text)) -> BatchImport -> f BatchImport
batchImport_completionTime = (BatchImport -> Maybe Text)
-> (BatchImport -> Maybe Text -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Text
completionTime :: Maybe Text
$sel:completionTime:BatchImport' :: BatchImport -> Maybe Text
completionTime} -> Maybe Text
completionTime) (\s :: BatchImport
s@BatchImport' {} Maybe Text
a -> BatchImport
s {$sel:completionTime:BatchImport' :: Maybe Text
completionTime = Maybe Text
a} :: BatchImport)

-- | The Amazon S3 location of your output file.
batchImport_outputPath :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Text)
batchImport_outputPath :: (Maybe Text -> f (Maybe Text)) -> BatchImport -> f BatchImport
batchImport_outputPath = (BatchImport -> Maybe Text)
-> (BatchImport -> Maybe Text -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Text
outputPath :: Maybe Text
$sel:outputPath:BatchImport' :: BatchImport -> Maybe Text
outputPath} -> Maybe Text
outputPath) (\s :: BatchImport
s@BatchImport' {} Maybe Text
a -> BatchImport
s {$sel:outputPath:BatchImport' :: Maybe Text
outputPath = Maybe Text
a} :: BatchImport)

-- | The Amazon S3 location of your data file for batch import.
batchImport_inputPath :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Text)
batchImport_inputPath :: (Maybe Text -> f (Maybe Text)) -> BatchImport -> f BatchImport
batchImport_inputPath = (BatchImport -> Maybe Text)
-> (BatchImport -> Maybe Text -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Text
inputPath :: Maybe Text
$sel:inputPath:BatchImport' :: BatchImport -> Maybe Text
inputPath} -> Maybe Text
inputPath) (\s :: BatchImport
s@BatchImport' {} Maybe Text
a -> BatchImport
s {$sel:inputPath:BatchImport' :: Maybe Text
inputPath = Maybe Text
a} :: BatchImport)

-- | The number of records that failed to import.
batchImport_failedRecordsCount :: Lens.Lens' BatchImport (Prelude.Maybe Prelude.Int)
batchImport_failedRecordsCount :: (Maybe Int -> f (Maybe Int)) -> BatchImport -> f BatchImport
batchImport_failedRecordsCount = (BatchImport -> Maybe Int)
-> (BatchImport -> Maybe Int -> BatchImport)
-> Lens BatchImport BatchImport (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchImport' {Maybe Int
failedRecordsCount :: Maybe Int
$sel:failedRecordsCount:BatchImport' :: BatchImport -> Maybe Int
failedRecordsCount} -> Maybe Int
failedRecordsCount) (\s :: BatchImport
s@BatchImport' {} Maybe Int
a -> BatchImport
s {$sel:failedRecordsCount:BatchImport' :: Maybe Int
failedRecordsCount = Maybe Int
a} :: BatchImport)

instance Core.FromJSON BatchImport where
  parseJSON :: Value -> Parser BatchImport
parseJSON =
    String
-> (Object -> Parser BatchImport) -> Value -> Parser BatchImport
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BatchImport"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe AsyncJobStatus
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> BatchImport
BatchImport'
            (Maybe Text
 -> Maybe Text
 -> Maybe AsyncJobStatus
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> BatchImport)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AsyncJobStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> BatchImport)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"failureReason")
            Parser
  (Maybe Text
   -> Maybe AsyncJobStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> BatchImport)
-> Parser (Maybe Text)
-> Parser
     (Maybe AsyncJobStatus
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"iamRoleArn")
            Parser
  (Maybe AsyncJobStatus
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> BatchImport)
-> Parser (Maybe AsyncJobStatus)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AsyncJobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> BatchImport)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"processedRecordsCount")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> BatchImport)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"totalRecordsCount")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> BatchImport)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> BatchImport)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> BatchImport)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"startTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> BatchImport)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Int -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"eventTypeName")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Int -> BatchImport)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Int -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"completionTime")
            Parser (Maybe Text -> Maybe Text -> Maybe Int -> BatchImport)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Int -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputPath")
            Parser (Maybe Text -> Maybe Int -> BatchImport)
-> Parser (Maybe Text) -> Parser (Maybe Int -> BatchImport)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"inputPath")
            Parser (Maybe Int -> BatchImport)
-> Parser (Maybe Int) -> Parser BatchImport
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"failedRecordsCount")
      )

instance Prelude.Hashable BatchImport

instance Prelude.NFData BatchImport