{-# 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.Pinpoint.Types.ImportJobResponse
-- 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.Pinpoint.Types.ImportJobResponse where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Pinpoint.Types.ImportJobResource
import Amazonka.Pinpoint.Types.JobStatus
import qualified Amazonka.Prelude as Prelude

-- | Provides information about the status and settings of a job that imports
-- endpoint definitions from one or more files. The files can be stored in
-- an Amazon Simple Storage Service (Amazon S3) bucket or uploaded directly
-- from a computer by using the Amazon Pinpoint console.
--
-- /See:/ 'newImportJobResponse' smart constructor.
data ImportJobResponse = ImportJobResponse'
  { -- | The number of pieces that were processed successfully (completed) by the
    -- import job, as of the time of the request.
    ImportJobResponse -> Maybe Int
completedPieces :: Prelude.Maybe Prelude.Int,
    -- | The date, in ISO 8601 format, when the import job was completed.
    ImportJobResponse -> Maybe Text
completionDate :: Prelude.Maybe Prelude.Text,
    -- | The number of pieces that weren\'t processed successfully (failed) by
    -- the import job, as of the time of the request.
    ImportJobResponse -> Maybe Int
failedPieces :: Prelude.Maybe Prelude.Int,
    -- | An array of entries, one for each of the first 100 entries that weren\'t
    -- processed successfully (failed) by the import job, if any.
    ImportJobResponse -> Maybe [Text]
failures :: Prelude.Maybe [Prelude.Text],
    -- | The total number of endpoint definitions that weren\'t processed
    -- successfully (failed) by the import job, typically because an error,
    -- such as a syntax error, occurred.
    ImportJobResponse -> Maybe Int
totalFailures :: Prelude.Maybe Prelude.Int,
    -- | The total number of pieces that must be processed to complete the import
    -- job. Each piece consists of an approximately equal portion of the
    -- endpoint definitions that are part of the import job.
    ImportJobResponse -> Maybe Int
totalPieces :: Prelude.Maybe Prelude.Int,
    -- | The total number of endpoint definitions that were processed by the
    -- import job.
    ImportJobResponse -> Maybe Int
totalProcessed :: Prelude.Maybe Prelude.Int,
    -- | The status of the import job. The job status is FAILED if Amazon
    -- Pinpoint wasn\'t able to process one or more pieces in the job.
    ImportJobResponse -> JobStatus
jobStatus :: JobStatus,
    -- | The date, in ISO 8601 format, when the import job was created.
    ImportJobResponse -> Text
creationDate :: Prelude.Text,
    -- | The job type. This value is IMPORT for import jobs.
    ImportJobResponse -> Text
type' :: Prelude.Text,
    -- | The resource settings that apply to the import job.
    ImportJobResponse -> ImportJobResource
definition :: ImportJobResource,
    -- | The unique identifier for the import job.
    ImportJobResponse -> Text
id :: Prelude.Text,
    -- | The unique identifier for the application that\'s associated with the
    -- import job.
    ImportJobResponse -> Text
applicationId :: Prelude.Text
  }
  deriving (ImportJobResponse -> ImportJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportJobResponse -> ImportJobResponse -> Bool
$c/= :: ImportJobResponse -> ImportJobResponse -> Bool
== :: ImportJobResponse -> ImportJobResponse -> Bool
$c== :: ImportJobResponse -> ImportJobResponse -> Bool
Prelude.Eq, ReadPrec [ImportJobResponse]
ReadPrec ImportJobResponse
Int -> ReadS ImportJobResponse
ReadS [ImportJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportJobResponse]
$creadListPrec :: ReadPrec [ImportJobResponse]
readPrec :: ReadPrec ImportJobResponse
$creadPrec :: ReadPrec ImportJobResponse
readList :: ReadS [ImportJobResponse]
$creadList :: ReadS [ImportJobResponse]
readsPrec :: Int -> ReadS ImportJobResponse
$creadsPrec :: Int -> ReadS ImportJobResponse
Prelude.Read, Int -> ImportJobResponse -> ShowS
[ImportJobResponse] -> ShowS
ImportJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportJobResponse] -> ShowS
$cshowList :: [ImportJobResponse] -> ShowS
show :: ImportJobResponse -> String
$cshow :: ImportJobResponse -> String
showsPrec :: Int -> ImportJobResponse -> ShowS
$cshowsPrec :: Int -> ImportJobResponse -> ShowS
Prelude.Show, forall x. Rep ImportJobResponse x -> ImportJobResponse
forall x. ImportJobResponse -> Rep ImportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportJobResponse x -> ImportJobResponse
$cfrom :: forall x. ImportJobResponse -> Rep ImportJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'ImportJobResponse' 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:
--
-- 'completedPieces', 'importJobResponse_completedPieces' - The number of pieces that were processed successfully (completed) by the
-- import job, as of the time of the request.
--
-- 'completionDate', 'importJobResponse_completionDate' - The date, in ISO 8601 format, when the import job was completed.
--
-- 'failedPieces', 'importJobResponse_failedPieces' - The number of pieces that weren\'t processed successfully (failed) by
-- the import job, as of the time of the request.
--
-- 'failures', 'importJobResponse_failures' - An array of entries, one for each of the first 100 entries that weren\'t
-- processed successfully (failed) by the import job, if any.
--
-- 'totalFailures', 'importJobResponse_totalFailures' - The total number of endpoint definitions that weren\'t processed
-- successfully (failed) by the import job, typically because an error,
-- such as a syntax error, occurred.
--
-- 'totalPieces', 'importJobResponse_totalPieces' - The total number of pieces that must be processed to complete the import
-- job. Each piece consists of an approximately equal portion of the
-- endpoint definitions that are part of the import job.
--
-- 'totalProcessed', 'importJobResponse_totalProcessed' - The total number of endpoint definitions that were processed by the
-- import job.
--
-- 'jobStatus', 'importJobResponse_jobStatus' - The status of the import job. The job status is FAILED if Amazon
-- Pinpoint wasn\'t able to process one or more pieces in the job.
--
-- 'creationDate', 'importJobResponse_creationDate' - The date, in ISO 8601 format, when the import job was created.
--
-- 'type'', 'importJobResponse_type' - The job type. This value is IMPORT for import jobs.
--
-- 'definition', 'importJobResponse_definition' - The resource settings that apply to the import job.
--
-- 'id', 'importJobResponse_id' - The unique identifier for the import job.
--
-- 'applicationId', 'importJobResponse_applicationId' - The unique identifier for the application that\'s associated with the
-- import job.
newImportJobResponse ::
  -- | 'jobStatus'
  JobStatus ->
  -- | 'creationDate'
  Prelude.Text ->
  -- | 'type''
  Prelude.Text ->
  -- | 'definition'
  ImportJobResource ->
  -- | 'id'
  Prelude.Text ->
  -- | 'applicationId'
  Prelude.Text ->
  ImportJobResponse
newImportJobResponse :: JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse
newImportJobResponse
  JobStatus
pJobStatus_
  Text
pCreationDate_
  Text
pType_
  ImportJobResource
pDefinition_
  Text
pId_
  Text
pApplicationId_ =
    ImportJobResponse'
      { $sel:completedPieces:ImportJobResponse' :: Maybe Int
completedPieces =
          forall a. Maybe a
Prelude.Nothing,
        $sel:completionDate:ImportJobResponse' :: Maybe Text
completionDate = forall a. Maybe a
Prelude.Nothing,
        $sel:failedPieces:ImportJobResponse' :: Maybe Int
failedPieces = forall a. Maybe a
Prelude.Nothing,
        $sel:failures:ImportJobResponse' :: Maybe [Text]
failures = forall a. Maybe a
Prelude.Nothing,
        $sel:totalFailures:ImportJobResponse' :: Maybe Int
totalFailures = forall a. Maybe a
Prelude.Nothing,
        $sel:totalPieces:ImportJobResponse' :: Maybe Int
totalPieces = forall a. Maybe a
Prelude.Nothing,
        $sel:totalProcessed:ImportJobResponse' :: Maybe Int
totalProcessed = forall a. Maybe a
Prelude.Nothing,
        $sel:jobStatus:ImportJobResponse' :: JobStatus
jobStatus = JobStatus
pJobStatus_,
        $sel:creationDate:ImportJobResponse' :: Text
creationDate = Text
pCreationDate_,
        $sel:type':ImportJobResponse' :: Text
type' = Text
pType_,
        $sel:definition:ImportJobResponse' :: ImportJobResource
definition = ImportJobResource
pDefinition_,
        $sel:id:ImportJobResponse' :: Text
id = Text
pId_,
        $sel:applicationId:ImportJobResponse' :: Text
applicationId = Text
pApplicationId_
      }

-- | The number of pieces that were processed successfully (completed) by the
-- import job, as of the time of the request.
importJobResponse_completedPieces :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Int)
importJobResponse_completedPieces :: Lens' ImportJobResponse (Maybe Int)
importJobResponse_completedPieces = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Int
completedPieces :: Maybe Int
$sel:completedPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
completedPieces} -> Maybe Int
completedPieces) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Int
a -> ImportJobResponse
s {$sel:completedPieces:ImportJobResponse' :: Maybe Int
completedPieces = Maybe Int
a} :: ImportJobResponse)

-- | The date, in ISO 8601 format, when the import job was completed.
importJobResponse_completionDate :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Text)
importJobResponse_completionDate :: Lens' ImportJobResponse (Maybe Text)
importJobResponse_completionDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Text
completionDate :: Maybe Text
$sel:completionDate:ImportJobResponse' :: ImportJobResponse -> Maybe Text
completionDate} -> Maybe Text
completionDate) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Text
a -> ImportJobResponse
s {$sel:completionDate:ImportJobResponse' :: Maybe Text
completionDate = Maybe Text
a} :: ImportJobResponse)

-- | The number of pieces that weren\'t processed successfully (failed) by
-- the import job, as of the time of the request.
importJobResponse_failedPieces :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Int)
importJobResponse_failedPieces :: Lens' ImportJobResponse (Maybe Int)
importJobResponse_failedPieces = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Int
failedPieces :: Maybe Int
$sel:failedPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
failedPieces} -> Maybe Int
failedPieces) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Int
a -> ImportJobResponse
s {$sel:failedPieces:ImportJobResponse' :: Maybe Int
failedPieces = Maybe Int
a} :: ImportJobResponse)

-- | An array of entries, one for each of the first 100 entries that weren\'t
-- processed successfully (failed) by the import job, if any.
importJobResponse_failures :: Lens.Lens' ImportJobResponse (Prelude.Maybe [Prelude.Text])
importJobResponse_failures :: Lens' ImportJobResponse (Maybe [Text])
importJobResponse_failures = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe [Text]
failures :: Maybe [Text]
$sel:failures:ImportJobResponse' :: ImportJobResponse -> Maybe [Text]
failures} -> Maybe [Text]
failures) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe [Text]
a -> ImportJobResponse
s {$sel:failures:ImportJobResponse' :: Maybe [Text]
failures = Maybe [Text]
a} :: ImportJobResponse) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The total number of endpoint definitions that weren\'t processed
-- successfully (failed) by the import job, typically because an error,
-- such as a syntax error, occurred.
importJobResponse_totalFailures :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Int)
importJobResponse_totalFailures :: Lens' ImportJobResponse (Maybe Int)
importJobResponse_totalFailures = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Int
totalFailures :: Maybe Int
$sel:totalFailures:ImportJobResponse' :: ImportJobResponse -> Maybe Int
totalFailures} -> Maybe Int
totalFailures) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Int
a -> ImportJobResponse
s {$sel:totalFailures:ImportJobResponse' :: Maybe Int
totalFailures = Maybe Int
a} :: ImportJobResponse)

-- | The total number of pieces that must be processed to complete the import
-- job. Each piece consists of an approximately equal portion of the
-- endpoint definitions that are part of the import job.
importJobResponse_totalPieces :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Int)
importJobResponse_totalPieces :: Lens' ImportJobResponse (Maybe Int)
importJobResponse_totalPieces = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Int
totalPieces :: Maybe Int
$sel:totalPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
totalPieces} -> Maybe Int
totalPieces) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Int
a -> ImportJobResponse
s {$sel:totalPieces:ImportJobResponse' :: Maybe Int
totalPieces = Maybe Int
a} :: ImportJobResponse)

-- | The total number of endpoint definitions that were processed by the
-- import job.
importJobResponse_totalProcessed :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Int)
importJobResponse_totalProcessed :: Lens' ImportJobResponse (Maybe Int)
importJobResponse_totalProcessed = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Int
totalProcessed :: Maybe Int
$sel:totalProcessed:ImportJobResponse' :: ImportJobResponse -> Maybe Int
totalProcessed} -> Maybe Int
totalProcessed) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Int
a -> ImportJobResponse
s {$sel:totalProcessed:ImportJobResponse' :: Maybe Int
totalProcessed = Maybe Int
a} :: ImportJobResponse)

-- | The status of the import job. The job status is FAILED if Amazon
-- Pinpoint wasn\'t able to process one or more pieces in the job.
importJobResponse_jobStatus :: Lens.Lens' ImportJobResponse JobStatus
importJobResponse_jobStatus :: Lens' ImportJobResponse JobStatus
importJobResponse_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {JobStatus
jobStatus :: JobStatus
$sel:jobStatus:ImportJobResponse' :: ImportJobResponse -> JobStatus
jobStatus} -> JobStatus
jobStatus) (\s :: ImportJobResponse
s@ImportJobResponse' {} JobStatus
a -> ImportJobResponse
s {$sel:jobStatus:ImportJobResponse' :: JobStatus
jobStatus = JobStatus
a} :: ImportJobResponse)

-- | The date, in ISO 8601 format, when the import job was created.
importJobResponse_creationDate :: Lens.Lens' ImportJobResponse Prelude.Text
importJobResponse_creationDate :: Lens' ImportJobResponse Text
importJobResponse_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Text
creationDate :: Text
$sel:creationDate:ImportJobResponse' :: ImportJobResponse -> Text
creationDate} -> Text
creationDate) (\s :: ImportJobResponse
s@ImportJobResponse' {} Text
a -> ImportJobResponse
s {$sel:creationDate:ImportJobResponse' :: Text
creationDate = Text
a} :: ImportJobResponse)

-- | The job type. This value is IMPORT for import jobs.
importJobResponse_type :: Lens.Lens' ImportJobResponse Prelude.Text
importJobResponse_type :: Lens' ImportJobResponse Text
importJobResponse_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Text
type' :: Text
$sel:type':ImportJobResponse' :: ImportJobResponse -> Text
type'} -> Text
type') (\s :: ImportJobResponse
s@ImportJobResponse' {} Text
a -> ImportJobResponse
s {$sel:type':ImportJobResponse' :: Text
type' = Text
a} :: ImportJobResponse)

-- | The resource settings that apply to the import job.
importJobResponse_definition :: Lens.Lens' ImportJobResponse ImportJobResource
importJobResponse_definition :: Lens' ImportJobResponse ImportJobResource
importJobResponse_definition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {ImportJobResource
definition :: ImportJobResource
$sel:definition:ImportJobResponse' :: ImportJobResponse -> ImportJobResource
definition} -> ImportJobResource
definition) (\s :: ImportJobResponse
s@ImportJobResponse' {} ImportJobResource
a -> ImportJobResponse
s {$sel:definition:ImportJobResponse' :: ImportJobResource
definition = ImportJobResource
a} :: ImportJobResponse)

-- | The unique identifier for the import job.
importJobResponse_id :: Lens.Lens' ImportJobResponse Prelude.Text
importJobResponse_id :: Lens' ImportJobResponse Text
importJobResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Text
id :: Text
$sel:id:ImportJobResponse' :: ImportJobResponse -> Text
id} -> Text
id) (\s :: ImportJobResponse
s@ImportJobResponse' {} Text
a -> ImportJobResponse
s {$sel:id:ImportJobResponse' :: Text
id = Text
a} :: ImportJobResponse)

-- | The unique identifier for the application that\'s associated with the
-- import job.
importJobResponse_applicationId :: Lens.Lens' ImportJobResponse Prelude.Text
importJobResponse_applicationId :: Lens' ImportJobResponse Text
importJobResponse_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Text
applicationId :: Text
$sel:applicationId:ImportJobResponse' :: ImportJobResponse -> Text
applicationId} -> Text
applicationId) (\s :: ImportJobResponse
s@ImportJobResponse' {} Text
a -> ImportJobResponse
s {$sel:applicationId:ImportJobResponse' :: Text
applicationId = Text
a} :: ImportJobResponse)

instance Data.FromJSON ImportJobResponse where
  parseJSON :: Value -> Parser ImportJobResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ImportJobResponse"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse
ImportJobResponse'
            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
"CompletedPieces")
            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
"CompletionDate")
            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
"FailedPieces")
            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
"Failures" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            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
"TotalFailures")
            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
"TotalPieces")
            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
"TotalProcessed")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"JobStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CreationDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Type")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Definition")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ApplicationId")
      )

instance Prelude.Hashable ImportJobResponse where
  hashWithSalt :: Int -> ImportJobResponse -> Int
hashWithSalt Int
_salt ImportJobResponse' {Maybe Int
Maybe [Text]
Maybe Text
Text
ImportJobResource
JobStatus
applicationId :: Text
id :: Text
definition :: ImportJobResource
type' :: Text
creationDate :: Text
jobStatus :: JobStatus
totalProcessed :: Maybe Int
totalPieces :: Maybe Int
totalFailures :: Maybe Int
failures :: Maybe [Text]
failedPieces :: Maybe Int
completionDate :: Maybe Text
completedPieces :: Maybe Int
$sel:applicationId:ImportJobResponse' :: ImportJobResponse -> Text
$sel:id:ImportJobResponse' :: ImportJobResponse -> Text
$sel:definition:ImportJobResponse' :: ImportJobResponse -> ImportJobResource
$sel:type':ImportJobResponse' :: ImportJobResponse -> Text
$sel:creationDate:ImportJobResponse' :: ImportJobResponse -> Text
$sel:jobStatus:ImportJobResponse' :: ImportJobResponse -> JobStatus
$sel:totalProcessed:ImportJobResponse' :: ImportJobResponse -> Maybe Int
$sel:totalPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
$sel:totalFailures:ImportJobResponse' :: ImportJobResponse -> Maybe Int
$sel:failures:ImportJobResponse' :: ImportJobResponse -> Maybe [Text]
$sel:failedPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
$sel:completionDate:ImportJobResponse' :: ImportJobResponse -> Maybe Text
$sel:completedPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
completedPieces
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
completionDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
failedPieces
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
failures
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
totalFailures
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
totalPieces
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
totalProcessed
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` JobStatus
jobStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
creationDate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
type'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ImportJobResource
definition
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationId

instance Prelude.NFData ImportJobResponse where
  rnf :: ImportJobResponse -> ()
rnf ImportJobResponse' {Maybe Int
Maybe [Text]
Maybe Text
Text
ImportJobResource
JobStatus
applicationId :: Text
id :: Text
definition :: ImportJobResource
type' :: Text
creationDate :: Text
jobStatus :: JobStatus
totalProcessed :: Maybe Int
totalPieces :: Maybe Int
totalFailures :: Maybe Int
failures :: Maybe [Text]
failedPieces :: Maybe Int
completionDate :: Maybe Text
completedPieces :: Maybe Int
$sel:applicationId:ImportJobResponse' :: ImportJobResponse -> Text
$sel:id:ImportJobResponse' :: ImportJobResponse -> Text
$sel:definition:ImportJobResponse' :: ImportJobResponse -> ImportJobResource
$sel:type':ImportJobResponse' :: ImportJobResponse -> Text
$sel:creationDate:ImportJobResponse' :: ImportJobResponse -> Text
$sel:jobStatus:ImportJobResponse' :: ImportJobResponse -> JobStatus
$sel:totalProcessed:ImportJobResponse' :: ImportJobResponse -> Maybe Int
$sel:totalPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
$sel:totalFailures:ImportJobResponse' :: ImportJobResponse -> Maybe Int
$sel:failures:ImportJobResponse' :: ImportJobResponse -> Maybe [Text]
$sel:failedPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
$sel:completionDate:ImportJobResponse' :: ImportJobResponse -> Maybe Text
$sel:completedPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
completedPieces
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
completionDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
failedPieces
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
failures
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
totalFailures
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
totalPieces
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
totalProcessed
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf JobStatus
jobStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
creationDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ImportJobResource
definition
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applicationId