{-# 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.Personalize.Types.DatasetImportJob
-- 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.Personalize.Types.DatasetImportJob where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Personalize.Types.DataSource
import qualified Amazonka.Prelude as Prelude

-- | Describes a job that imports training data from a data source (Amazon S3
-- bucket) to an Amazon Personalize dataset. For more information, see
-- CreateDatasetImportJob.
--
-- A dataset import job can be in one of the following states:
--
-- -   CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
--
-- /See:/ 'newDatasetImportJob' smart constructor.
data DatasetImportJob = DatasetImportJob'
  { -- | If a dataset import job fails, provides the reason why.
    DatasetImportJob -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The status of the dataset import job.
    --
    -- A dataset import job can be in one of the following states:
    --
    -- -   CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
    DatasetImportJob -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the dataset that receives the imported
    -- data.
    DatasetImportJob -> Maybe Text
datasetArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the import job.
    DatasetImportJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | The date and time (in Unix time) the dataset was last updated.
    DatasetImportJob -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
    -- | The ARN of the dataset import job.
    DatasetImportJob -> Maybe Text
datasetImportJobArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 bucket that contains the training data to import.
    DatasetImportJob -> Maybe DataSource
dataSource :: Prelude.Maybe DataSource,
    -- | The creation date and time (in Unix time) of the dataset import job.
    DatasetImportJob -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX,
    -- | The ARN of the IAM role that has permissions to read from the Amazon S3
    -- data source.
    DatasetImportJob -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text
  }
  deriving (DatasetImportJob -> DatasetImportJob -> Bool
(DatasetImportJob -> DatasetImportJob -> Bool)
-> (DatasetImportJob -> DatasetImportJob -> Bool)
-> Eq DatasetImportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatasetImportJob -> DatasetImportJob -> Bool
$c/= :: DatasetImportJob -> DatasetImportJob -> Bool
== :: DatasetImportJob -> DatasetImportJob -> Bool
$c== :: DatasetImportJob -> DatasetImportJob -> Bool
Prelude.Eq, ReadPrec [DatasetImportJob]
ReadPrec DatasetImportJob
Int -> ReadS DatasetImportJob
ReadS [DatasetImportJob]
(Int -> ReadS DatasetImportJob)
-> ReadS [DatasetImportJob]
-> ReadPrec DatasetImportJob
-> ReadPrec [DatasetImportJob]
-> Read DatasetImportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatasetImportJob]
$creadListPrec :: ReadPrec [DatasetImportJob]
readPrec :: ReadPrec DatasetImportJob
$creadPrec :: ReadPrec DatasetImportJob
readList :: ReadS [DatasetImportJob]
$creadList :: ReadS [DatasetImportJob]
readsPrec :: Int -> ReadS DatasetImportJob
$creadsPrec :: Int -> ReadS DatasetImportJob
Prelude.Read, Int -> DatasetImportJob -> ShowS
[DatasetImportJob] -> ShowS
DatasetImportJob -> String
(Int -> DatasetImportJob -> ShowS)
-> (DatasetImportJob -> String)
-> ([DatasetImportJob] -> ShowS)
-> Show DatasetImportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatasetImportJob] -> ShowS
$cshowList :: [DatasetImportJob] -> ShowS
show :: DatasetImportJob -> String
$cshow :: DatasetImportJob -> String
showsPrec :: Int -> DatasetImportJob -> ShowS
$cshowsPrec :: Int -> DatasetImportJob -> ShowS
Prelude.Show, (forall x. DatasetImportJob -> Rep DatasetImportJob x)
-> (forall x. Rep DatasetImportJob x -> DatasetImportJob)
-> Generic DatasetImportJob
forall x. Rep DatasetImportJob x -> DatasetImportJob
forall x. DatasetImportJob -> Rep DatasetImportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatasetImportJob x -> DatasetImportJob
$cfrom :: forall x. DatasetImportJob -> Rep DatasetImportJob x
Prelude.Generic)

-- |
-- Create a value of 'DatasetImportJob' 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', 'datasetImportJob_failureReason' - If a dataset import job fails, provides the reason why.
--
-- 'status', 'datasetImportJob_status' - The status of the dataset import job.
--
-- A dataset import job can be in one of the following states:
--
-- -   CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
--
-- 'datasetArn', 'datasetImportJob_datasetArn' - The Amazon Resource Name (ARN) of the dataset that receives the imported
-- data.
--
-- 'jobName', 'datasetImportJob_jobName' - The name of the import job.
--
-- 'lastUpdatedDateTime', 'datasetImportJob_lastUpdatedDateTime' - The date and time (in Unix time) the dataset was last updated.
--
-- 'datasetImportJobArn', 'datasetImportJob_datasetImportJobArn' - The ARN of the dataset import job.
--
-- 'dataSource', 'datasetImportJob_dataSource' - The Amazon S3 bucket that contains the training data to import.
--
-- 'creationDateTime', 'datasetImportJob_creationDateTime' - The creation date and time (in Unix time) of the dataset import job.
--
-- 'roleArn', 'datasetImportJob_roleArn' - The ARN of the IAM role that has permissions to read from the Amazon S3
-- data source.
newDatasetImportJob ::
  DatasetImportJob
newDatasetImportJob :: DatasetImportJob
newDatasetImportJob =
  DatasetImportJob' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe DataSource
-> Maybe POSIX
-> Maybe Text
-> DatasetImportJob
DatasetImportJob'
    { $sel:failureReason:DatasetImportJob' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DatasetImportJob' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetArn:DatasetImportJob' :: Maybe Text
datasetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:DatasetImportJob' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDateTime:DatasetImportJob' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetImportJobArn:DatasetImportJob' :: Maybe Text
datasetImportJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSource:DatasetImportJob' :: Maybe DataSource
dataSource = Maybe DataSource
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDateTime:DatasetImportJob' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:DatasetImportJob' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | If a dataset import job fails, provides the reason why.
datasetImportJob_failureReason :: Lens.Lens' DatasetImportJob (Prelude.Maybe Prelude.Text)
datasetImportJob_failureReason :: (Maybe Text -> f (Maybe Text))
-> DatasetImportJob -> f DatasetImportJob
datasetImportJob_failureReason = (DatasetImportJob -> Maybe Text)
-> (DatasetImportJob -> Maybe Text -> DatasetImportJob)
-> Lens DatasetImportJob DatasetImportJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImportJob' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:DatasetImportJob' :: DatasetImportJob -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: DatasetImportJob
s@DatasetImportJob' {} Maybe Text
a -> DatasetImportJob
s {$sel:failureReason:DatasetImportJob' :: Maybe Text
failureReason = Maybe Text
a} :: DatasetImportJob)

-- | The status of the dataset import job.
--
-- A dataset import job can be in one of the following states:
--
-- -   CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
datasetImportJob_status :: Lens.Lens' DatasetImportJob (Prelude.Maybe Prelude.Text)
datasetImportJob_status :: (Maybe Text -> f (Maybe Text))
-> DatasetImportJob -> f DatasetImportJob
datasetImportJob_status = (DatasetImportJob -> Maybe Text)
-> (DatasetImportJob -> Maybe Text -> DatasetImportJob)
-> Lens DatasetImportJob DatasetImportJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImportJob' {Maybe Text
status :: Maybe Text
$sel:status:DatasetImportJob' :: DatasetImportJob -> Maybe Text
status} -> Maybe Text
status) (\s :: DatasetImportJob
s@DatasetImportJob' {} Maybe Text
a -> DatasetImportJob
s {$sel:status:DatasetImportJob' :: Maybe Text
status = Maybe Text
a} :: DatasetImportJob)

-- | The Amazon Resource Name (ARN) of the dataset that receives the imported
-- data.
datasetImportJob_datasetArn :: Lens.Lens' DatasetImportJob (Prelude.Maybe Prelude.Text)
datasetImportJob_datasetArn :: (Maybe Text -> f (Maybe Text))
-> DatasetImportJob -> f DatasetImportJob
datasetImportJob_datasetArn = (DatasetImportJob -> Maybe Text)
-> (DatasetImportJob -> Maybe Text -> DatasetImportJob)
-> Lens DatasetImportJob DatasetImportJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImportJob' {Maybe Text
datasetArn :: Maybe Text
$sel:datasetArn:DatasetImportJob' :: DatasetImportJob -> Maybe Text
datasetArn} -> Maybe Text
datasetArn) (\s :: DatasetImportJob
s@DatasetImportJob' {} Maybe Text
a -> DatasetImportJob
s {$sel:datasetArn:DatasetImportJob' :: Maybe Text
datasetArn = Maybe Text
a} :: DatasetImportJob)

-- | The name of the import job.
datasetImportJob_jobName :: Lens.Lens' DatasetImportJob (Prelude.Maybe Prelude.Text)
datasetImportJob_jobName :: (Maybe Text -> f (Maybe Text))
-> DatasetImportJob -> f DatasetImportJob
datasetImportJob_jobName = (DatasetImportJob -> Maybe Text)
-> (DatasetImportJob -> Maybe Text -> DatasetImportJob)
-> Lens DatasetImportJob DatasetImportJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImportJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:DatasetImportJob' :: DatasetImportJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: DatasetImportJob
s@DatasetImportJob' {} Maybe Text
a -> DatasetImportJob
s {$sel:jobName:DatasetImportJob' :: Maybe Text
jobName = Maybe Text
a} :: DatasetImportJob)

-- | The date and time (in Unix time) the dataset was last updated.
datasetImportJob_lastUpdatedDateTime :: Lens.Lens' DatasetImportJob (Prelude.Maybe Prelude.UTCTime)
datasetImportJob_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetImportJob -> f DatasetImportJob
datasetImportJob_lastUpdatedDateTime = (DatasetImportJob -> Maybe POSIX)
-> (DatasetImportJob -> Maybe POSIX -> DatasetImportJob)
-> Lens
     DatasetImportJob DatasetImportJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImportJob' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:DatasetImportJob' :: DatasetImportJob -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: DatasetImportJob
s@DatasetImportJob' {} Maybe POSIX
a -> DatasetImportJob
s {$sel:lastUpdatedDateTime:DatasetImportJob' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: DatasetImportJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> DatasetImportJob -> f DatasetImportJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetImportJob
-> f DatasetImportJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

-- | The Amazon S3 bucket that contains the training data to import.
datasetImportJob_dataSource :: Lens.Lens' DatasetImportJob (Prelude.Maybe DataSource)
datasetImportJob_dataSource :: (Maybe DataSource -> f (Maybe DataSource))
-> DatasetImportJob -> f DatasetImportJob
datasetImportJob_dataSource = (DatasetImportJob -> Maybe DataSource)
-> (DatasetImportJob -> Maybe DataSource -> DatasetImportJob)
-> Lens
     DatasetImportJob
     DatasetImportJob
     (Maybe DataSource)
     (Maybe DataSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImportJob' {Maybe DataSource
dataSource :: Maybe DataSource
$sel:dataSource:DatasetImportJob' :: DatasetImportJob -> Maybe DataSource
dataSource} -> Maybe DataSource
dataSource) (\s :: DatasetImportJob
s@DatasetImportJob' {} Maybe DataSource
a -> DatasetImportJob
s {$sel:dataSource:DatasetImportJob' :: Maybe DataSource
dataSource = Maybe DataSource
a} :: DatasetImportJob)

-- | The creation date and time (in Unix time) of the dataset import job.
datasetImportJob_creationDateTime :: Lens.Lens' DatasetImportJob (Prelude.Maybe Prelude.UTCTime)
datasetImportJob_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetImportJob -> f DatasetImportJob
datasetImportJob_creationDateTime = (DatasetImportJob -> Maybe POSIX)
-> (DatasetImportJob -> Maybe POSIX -> DatasetImportJob)
-> Lens
     DatasetImportJob DatasetImportJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImportJob' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:DatasetImportJob' :: DatasetImportJob -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: DatasetImportJob
s@DatasetImportJob' {} Maybe POSIX
a -> DatasetImportJob
s {$sel:creationDateTime:DatasetImportJob' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: DatasetImportJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> DatasetImportJob -> f DatasetImportJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DatasetImportJob
-> f DatasetImportJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ARN of the IAM role that has permissions to read from the Amazon S3
-- data source.
datasetImportJob_roleArn :: Lens.Lens' DatasetImportJob (Prelude.Maybe Prelude.Text)
datasetImportJob_roleArn :: (Maybe Text -> f (Maybe Text))
-> DatasetImportJob -> f DatasetImportJob
datasetImportJob_roleArn = (DatasetImportJob -> Maybe Text)
-> (DatasetImportJob -> Maybe Text -> DatasetImportJob)
-> Lens DatasetImportJob DatasetImportJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetImportJob' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:DatasetImportJob' :: DatasetImportJob -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: DatasetImportJob
s@DatasetImportJob' {} Maybe Text
a -> DatasetImportJob
s {$sel:roleArn:DatasetImportJob' :: Maybe Text
roleArn = Maybe Text
a} :: DatasetImportJob)

instance Core.FromJSON DatasetImportJob where
  parseJSON :: Value -> Parser DatasetImportJob
parseJSON =
    String
-> (Object -> Parser DatasetImportJob)
-> Value
-> Parser DatasetImportJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DatasetImportJob"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe DataSource
-> Maybe POSIX
-> Maybe Text
-> DatasetImportJob
DatasetImportJob'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe DataSource
 -> Maybe POSIX
 -> Maybe Text
 -> DatasetImportJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe DataSource
      -> Maybe POSIX
      -> Maybe Text
      -> DatasetImportJob)
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 Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe DataSource
   -> Maybe POSIX
   -> Maybe Text
   -> DatasetImportJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe DataSource
      -> Maybe POSIX
      -> Maybe Text
      -> DatasetImportJob)
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
"status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe DataSource
   -> Maybe POSIX
   -> Maybe Text
   -> DatasetImportJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe DataSource
      -> Maybe POSIX
      -> Maybe Text
      -> DatasetImportJob)
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
"datasetArn")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe DataSource
   -> Maybe POSIX
   -> Maybe Text
   -> DatasetImportJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe DataSource
      -> Maybe POSIX
      -> Maybe Text
      -> DatasetImportJob)
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
"jobName")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe DataSource
   -> Maybe POSIX
   -> Maybe Text
   -> DatasetImportJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe DataSource
      -> Maybe POSIX
      -> Maybe Text
      -> DatasetImportJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdatedDateTime")
            Parser
  (Maybe Text
   -> Maybe DataSource
   -> Maybe POSIX
   -> Maybe Text
   -> DatasetImportJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe DataSource -> Maybe POSIX -> Maybe Text -> DatasetImportJob)
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
"datasetImportJobArn")
            Parser
  (Maybe DataSource -> Maybe POSIX -> Maybe Text -> DatasetImportJob)
-> Parser (Maybe DataSource)
-> Parser (Maybe POSIX -> Maybe Text -> DatasetImportJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DataSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dataSource")
            Parser (Maybe POSIX -> Maybe Text -> DatasetImportJob)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> DatasetImportJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationDateTime")
            Parser (Maybe Text -> DatasetImportJob)
-> Parser (Maybe Text) -> Parser DatasetImportJob
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
"roleArn")
      )

instance Prelude.Hashable DatasetImportJob

instance Prelude.NFData DatasetImportJob