{-# 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.ExportJobResponse
-- 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.ExportJobResponse 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.ExportJobResource
import Amazonka.Pinpoint.Types.JobStatus
import qualified Amazonka.Prelude as Prelude

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

-- |
-- Create a value of 'ExportJobResponse' 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', 'exportJobResponse_completedPieces' - The number of pieces that were processed successfully (completed) by the
-- export job, as of the time of the request.
--
-- 'completionDate', 'exportJobResponse_completionDate' - The date, in ISO 8601 format, when the export job was completed.
--
-- 'failedPieces', 'exportJobResponse_failedPieces' - The number of pieces that weren\'t processed successfully (failed) by
-- the export job, as of the time of the request.
--
-- 'failures', 'exportJobResponse_failures' - An array of entries, one for each of the first 100 entries that weren\'t
-- processed successfully (failed) by the export job, if any.
--
-- 'totalFailures', 'exportJobResponse_totalFailures' - The total number of endpoint definitions that weren\'t processed
-- successfully (failed) by the export job, typically because an error,
-- such as a syntax error, occurred.
--
-- 'totalPieces', 'exportJobResponse_totalPieces' - The total number of pieces that must be processed to complete the export
-- job. Each piece consists of an approximately equal portion of the
-- endpoint definitions that are part of the export job.
--
-- 'totalProcessed', 'exportJobResponse_totalProcessed' - The total number of endpoint definitions that were processed by the
-- export job.
--
-- 'jobStatus', 'exportJobResponse_jobStatus' - The status of the export job. The job status is FAILED if Amazon
-- Pinpoint wasn\'t able to process one or more pieces in the job.
--
-- 'creationDate', 'exportJobResponse_creationDate' - The date, in ISO 8601 format, when the export job was created.
--
-- 'type'', 'exportJobResponse_type' - The job type. This value is EXPORT for export jobs.
--
-- 'definition', 'exportJobResponse_definition' - The resource settings that apply to the export job.
--
-- 'id', 'exportJobResponse_id' - The unique identifier for the export job.
--
-- 'applicationId', 'exportJobResponse_applicationId' - The unique identifier for the application that\'s associated with the
-- export job.
newExportJobResponse ::
  -- | 'jobStatus'
  JobStatus ->
  -- | 'creationDate'
  Prelude.Text ->
  -- | 'type''
  Prelude.Text ->
  -- | 'definition'
  ExportJobResource ->
  -- | 'id'
  Prelude.Text ->
  -- | 'applicationId'
  Prelude.Text ->
  ExportJobResponse
newExportJobResponse :: JobStatus
-> Text
-> Text
-> ExportJobResource
-> Text
-> Text
-> ExportJobResponse
newExportJobResponse
  JobStatus
pJobStatus_
  Text
pCreationDate_
  Text
pType_
  ExportJobResource
pDefinition_
  Text
pId_
  Text
pApplicationId_ =
    ExportJobResponse'
      { $sel:completedPieces:ExportJobResponse' :: Maybe Int
completedPieces =
          forall a. Maybe a
Prelude.Nothing,
        $sel:completionDate:ExportJobResponse' :: Maybe Text
completionDate = forall a. Maybe a
Prelude.Nothing,
        $sel:failedPieces:ExportJobResponse' :: Maybe Int
failedPieces = forall a. Maybe a
Prelude.Nothing,
        $sel:failures:ExportJobResponse' :: Maybe [Text]
failures = forall a. Maybe a
Prelude.Nothing,
        $sel:totalFailures:ExportJobResponse' :: Maybe Int
totalFailures = forall a. Maybe a
Prelude.Nothing,
        $sel:totalPieces:ExportJobResponse' :: Maybe Int
totalPieces = forall a. Maybe a
Prelude.Nothing,
        $sel:totalProcessed:ExportJobResponse' :: Maybe Int
totalProcessed = forall a. Maybe a
Prelude.Nothing,
        $sel:jobStatus:ExportJobResponse' :: JobStatus
jobStatus = JobStatus
pJobStatus_,
        $sel:creationDate:ExportJobResponse' :: Text
creationDate = Text
pCreationDate_,
        $sel:type':ExportJobResponse' :: Text
type' = Text
pType_,
        $sel:definition:ExportJobResponse' :: ExportJobResource
definition = ExportJobResource
pDefinition_,
        $sel:id:ExportJobResponse' :: Text
id = Text
pId_,
        $sel:applicationId:ExportJobResponse' :: Text
applicationId = Text
pApplicationId_
      }

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

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

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

-- | An array of entries, one for each of the first 100 entries that weren\'t
-- processed successfully (failed) by the export job, if any.
exportJobResponse_failures :: Lens.Lens' ExportJobResponse (Prelude.Maybe [Prelude.Text])
exportJobResponse_failures :: Lens' ExportJobResponse (Maybe [Text])
exportJobResponse_failures = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobResponse' {Maybe [Text]
failures :: Maybe [Text]
$sel:failures:ExportJobResponse' :: ExportJobResponse -> Maybe [Text]
failures} -> Maybe [Text]
failures) (\s :: ExportJobResponse
s@ExportJobResponse' {} Maybe [Text]
a -> ExportJobResponse
s {$sel:failures:ExportJobResponse' :: Maybe [Text]
failures = Maybe [Text]
a} :: ExportJobResponse) 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 export job, typically because an error,
-- such as a syntax error, occurred.
exportJobResponse_totalFailures :: Lens.Lens' ExportJobResponse (Prelude.Maybe Prelude.Int)
exportJobResponse_totalFailures :: Lens' ExportJobResponse (Maybe Int)
exportJobResponse_totalFailures = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobResponse' {Maybe Int
totalFailures :: Maybe Int
$sel:totalFailures:ExportJobResponse' :: ExportJobResponse -> Maybe Int
totalFailures} -> Maybe Int
totalFailures) (\s :: ExportJobResponse
s@ExportJobResponse' {} Maybe Int
a -> ExportJobResponse
s {$sel:totalFailures:ExportJobResponse' :: Maybe Int
totalFailures = Maybe Int
a} :: ExportJobResponse)

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

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

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

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

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

-- | The resource settings that apply to the export job.
exportJobResponse_definition :: Lens.Lens' ExportJobResponse ExportJobResource
exportJobResponse_definition :: Lens' ExportJobResponse ExportJobResource
exportJobResponse_definition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobResponse' {ExportJobResource
definition :: ExportJobResource
$sel:definition:ExportJobResponse' :: ExportJobResponse -> ExportJobResource
definition} -> ExportJobResource
definition) (\s :: ExportJobResponse
s@ExportJobResponse' {} ExportJobResource
a -> ExportJobResponse
s {$sel:definition:ExportJobResponse' :: ExportJobResource
definition = ExportJobResource
a} :: ExportJobResponse)

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

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

instance Data.FromJSON ExportJobResponse where
  parseJSON :: Value -> Parser ExportJobResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ExportJobResponse"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ExportJobResource
-> Text
-> Text
-> ExportJobResponse
ExportJobResponse'
            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 ExportJobResponse where
  hashWithSalt :: Int -> ExportJobResponse -> Int
hashWithSalt Int
_salt ExportJobResponse' {Maybe Int
Maybe [Text]
Maybe Text
Text
ExportJobResource
JobStatus
applicationId :: Text
id :: Text
definition :: ExportJobResource
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:ExportJobResponse' :: ExportJobResponse -> Text
$sel:id:ExportJobResponse' :: ExportJobResponse -> Text
$sel:definition:ExportJobResponse' :: ExportJobResponse -> ExportJobResource
$sel:type':ExportJobResponse' :: ExportJobResponse -> Text
$sel:creationDate:ExportJobResponse' :: ExportJobResponse -> Text
$sel:jobStatus:ExportJobResponse' :: ExportJobResponse -> JobStatus
$sel:totalProcessed:ExportJobResponse' :: ExportJobResponse -> Maybe Int
$sel:totalPieces:ExportJobResponse' :: ExportJobResponse -> Maybe Int
$sel:totalFailures:ExportJobResponse' :: ExportJobResponse -> Maybe Int
$sel:failures:ExportJobResponse' :: ExportJobResponse -> Maybe [Text]
$sel:failedPieces:ExportJobResponse' :: ExportJobResponse -> Maybe Int
$sel:completionDate:ExportJobResponse' :: ExportJobResponse -> Maybe Text
$sel:completedPieces:ExportJobResponse' :: ExportJobResponse -> 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` ExportJobResource
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 ExportJobResponse where
  rnf :: ExportJobResponse -> ()
rnf ExportJobResponse' {Maybe Int
Maybe [Text]
Maybe Text
Text
ExportJobResource
JobStatus
applicationId :: Text
id :: Text
definition :: ExportJobResource
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:ExportJobResponse' :: ExportJobResponse -> Text
$sel:id:ExportJobResponse' :: ExportJobResponse -> Text
$sel:definition:ExportJobResponse' :: ExportJobResponse -> ExportJobResource
$sel:type':ExportJobResponse' :: ExportJobResponse -> Text
$sel:creationDate:ExportJobResponse' :: ExportJobResponse -> Text
$sel:jobStatus:ExportJobResponse' :: ExportJobResponse -> JobStatus
$sel:totalProcessed:ExportJobResponse' :: ExportJobResponse -> Maybe Int
$sel:totalPieces:ExportJobResponse' :: ExportJobResponse -> Maybe Int
$sel:totalFailures:ExportJobResponse' :: ExportJobResponse -> Maybe Int
$sel:failures:ExportJobResponse' :: ExportJobResponse -> Maybe [Text]
$sel:failedPieces:ExportJobResponse' :: ExportJobResponse -> Maybe Int
$sel:completionDate:ExportJobResponse' :: ExportJobResponse -> Maybe Text
$sel:completedPieces:ExportJobResponse' :: ExportJobResponse -> 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 ExportJobResource
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