{-# 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.MacieV2.Types.JobSummary
-- 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.MacieV2.Types.JobSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MacieV2.Types.JobStatus
import Amazonka.MacieV2.Types.JobType
import Amazonka.MacieV2.Types.LastRunErrorStatus
import Amazonka.MacieV2.Types.S3BucketCriteriaForJob
import Amazonka.MacieV2.Types.S3BucketDefinitionForJob
import Amazonka.MacieV2.Types.UserPausedDetails
import qualified Amazonka.Prelude as Prelude

-- | Provides information about a classification job, including the current
-- status of the job.
--
-- /See:/ 'newJobSummary' smart constructor.
data JobSummary = JobSummary'
  { -- | The property- and tag-based conditions that determine which S3 buckets
    -- are included or excluded from the job\'s analysis. Each time the job
    -- runs, the job uses these criteria to determine which buckets to analyze.
    -- A job\'s definition can contain a bucketCriteria object or a
    -- bucketDefinitions array, not both.
    JobSummary -> Maybe S3BucketCriteriaForJob
bucketCriteria :: Prelude.Maybe S3BucketCriteriaForJob,
    -- | An array of objects, one for each Amazon Web Services account that owns
    -- specific S3 buckets for the job to analyze. Each object specifies the
    -- account ID for an account and one or more buckets to analyze for that
    -- account. A job\'s definition can contain a bucketDefinitions array or a
    -- bucketCriteria object, not both.
    JobSummary -> Maybe [S3BucketDefinitionForJob]
bucketDefinitions :: Prelude.Maybe [S3BucketDefinitionForJob],
    -- | The date and time, in UTC and extended ISO 8601 format, when the job was
    -- created.
    JobSummary -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | The unique identifier for the job.
    JobSummary -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The current status of the job. Possible values are:
    --
    -- -   CANCELLED - You cancelled the job or, if it\'s a one-time job, you
    --     paused the job and didn\'t resume it within 30 days.
    --
    -- -   COMPLETE - For a one-time job, Amazon Macie finished processing the
    --     data specified for the job. This value doesn\'t apply to recurring
    --     jobs.
    --
    -- -   IDLE - For a recurring job, the previous scheduled run is complete
    --     and the next scheduled run is pending. This value doesn\'t apply to
    --     one-time jobs.
    --
    -- -   PAUSED - Macie started running the job but additional processing
    --     would exceed the monthly sensitive data discovery quota for your
    --     account or one or more member accounts that the job analyzes data
    --     for.
    --
    -- -   RUNNING - For a one-time job, the job is in progress. For a
    --     recurring job, a scheduled run is in progress.
    --
    -- -   USER_PAUSED - You paused the job. If you paused the job while it had
    --     a status of RUNNING and you don\'t resume it within 30 days of
    --     pausing it, the job or job run will expire and be cancelled,
    --     depending on the job\'s type. To check the expiration date, refer to
    --     the UserPausedDetails.jobExpiresAt property.
    JobSummary -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
    -- | The schedule for running the job. Possible values are:
    --
    -- -   ONE_TIME - The job runs only once.
    --
    -- -   SCHEDULED - The job runs on a daily, weekly, or monthly basis.
    JobSummary -> Maybe JobType
jobType :: Prelude.Maybe JobType,
    -- | Specifies whether any account- or bucket-level access errors occurred
    -- when the job ran. For a recurring job, this value indicates the error
    -- status of the job\'s most recent run.
    JobSummary -> Maybe LastRunErrorStatus
lastRunErrorStatus :: Prelude.Maybe LastRunErrorStatus,
    -- | The custom name of the job.
    JobSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | If the current status of the job is USER_PAUSED, specifies when the job
    -- was paused and when the job or job run will expire and be cancelled if
    -- it isn\'t resumed. This value is present only if the value for jobStatus
    -- is USER_PAUSED.
    JobSummary -> Maybe UserPausedDetails
userPausedDetails :: Prelude.Maybe UserPausedDetails
  }
  deriving (JobSummary -> JobSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobSummary -> JobSummary -> Bool
$c/= :: JobSummary -> JobSummary -> Bool
== :: JobSummary -> JobSummary -> Bool
$c== :: JobSummary -> JobSummary -> Bool
Prelude.Eq, ReadPrec [JobSummary]
ReadPrec JobSummary
Int -> ReadS JobSummary
ReadS [JobSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobSummary]
$creadListPrec :: ReadPrec [JobSummary]
readPrec :: ReadPrec JobSummary
$creadPrec :: ReadPrec JobSummary
readList :: ReadS [JobSummary]
$creadList :: ReadS [JobSummary]
readsPrec :: Int -> ReadS JobSummary
$creadsPrec :: Int -> ReadS JobSummary
Prelude.Read, Int -> JobSummary -> ShowS
[JobSummary] -> ShowS
JobSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobSummary] -> ShowS
$cshowList :: [JobSummary] -> ShowS
show :: JobSummary -> String
$cshow :: JobSummary -> String
showsPrec :: Int -> JobSummary -> ShowS
$cshowsPrec :: Int -> JobSummary -> ShowS
Prelude.Show, forall x. Rep JobSummary x -> JobSummary
forall x. JobSummary -> Rep JobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobSummary x -> JobSummary
$cfrom :: forall x. JobSummary -> Rep JobSummary x
Prelude.Generic)

-- |
-- Create a value of 'JobSummary' 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:
--
-- 'bucketCriteria', 'jobSummary_bucketCriteria' - The property- and tag-based conditions that determine which S3 buckets
-- are included or excluded from the job\'s analysis. Each time the job
-- runs, the job uses these criteria to determine which buckets to analyze.
-- A job\'s definition can contain a bucketCriteria object or a
-- bucketDefinitions array, not both.
--
-- 'bucketDefinitions', 'jobSummary_bucketDefinitions' - An array of objects, one for each Amazon Web Services account that owns
-- specific S3 buckets for the job to analyze. Each object specifies the
-- account ID for an account and one or more buckets to analyze for that
-- account. A job\'s definition can contain a bucketDefinitions array or a
-- bucketCriteria object, not both.
--
-- 'createdAt', 'jobSummary_createdAt' - The date and time, in UTC and extended ISO 8601 format, when the job was
-- created.
--
-- 'jobId', 'jobSummary_jobId' - The unique identifier for the job.
--
-- 'jobStatus', 'jobSummary_jobStatus' - The current status of the job. Possible values are:
--
-- -   CANCELLED - You cancelled the job or, if it\'s a one-time job, you
--     paused the job and didn\'t resume it within 30 days.
--
-- -   COMPLETE - For a one-time job, Amazon Macie finished processing the
--     data specified for the job. This value doesn\'t apply to recurring
--     jobs.
--
-- -   IDLE - For a recurring job, the previous scheduled run is complete
--     and the next scheduled run is pending. This value doesn\'t apply to
--     one-time jobs.
--
-- -   PAUSED - Macie started running the job but additional processing
--     would exceed the monthly sensitive data discovery quota for your
--     account or one or more member accounts that the job analyzes data
--     for.
--
-- -   RUNNING - For a one-time job, the job is in progress. For a
--     recurring job, a scheduled run is in progress.
--
-- -   USER_PAUSED - You paused the job. If you paused the job while it had
--     a status of RUNNING and you don\'t resume it within 30 days of
--     pausing it, the job or job run will expire and be cancelled,
--     depending on the job\'s type. To check the expiration date, refer to
--     the UserPausedDetails.jobExpiresAt property.
--
-- 'jobType', 'jobSummary_jobType' - The schedule for running the job. Possible values are:
--
-- -   ONE_TIME - The job runs only once.
--
-- -   SCHEDULED - The job runs on a daily, weekly, or monthly basis.
--
-- 'lastRunErrorStatus', 'jobSummary_lastRunErrorStatus' - Specifies whether any account- or bucket-level access errors occurred
-- when the job ran. For a recurring job, this value indicates the error
-- status of the job\'s most recent run.
--
-- 'name', 'jobSummary_name' - The custom name of the job.
--
-- 'userPausedDetails', 'jobSummary_userPausedDetails' - If the current status of the job is USER_PAUSED, specifies when the job
-- was paused and when the job or job run will expire and be cancelled if
-- it isn\'t resumed. This value is present only if the value for jobStatus
-- is USER_PAUSED.
newJobSummary ::
  JobSummary
newJobSummary :: JobSummary
newJobSummary =
  JobSummary'
    { $sel:bucketCriteria:JobSummary' :: Maybe S3BucketCriteriaForJob
bucketCriteria = forall a. Maybe a
Prelude.Nothing,
      $sel:bucketDefinitions:JobSummary' :: Maybe [S3BucketDefinitionForJob]
bucketDefinitions = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:JobSummary' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:JobSummary' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:JobSummary' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:jobType:JobSummary' :: Maybe JobType
jobType = forall a. Maybe a
Prelude.Nothing,
      $sel:lastRunErrorStatus:JobSummary' :: Maybe LastRunErrorStatus
lastRunErrorStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:name:JobSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:userPausedDetails:JobSummary' :: Maybe UserPausedDetails
userPausedDetails = forall a. Maybe a
Prelude.Nothing
    }

-- | The property- and tag-based conditions that determine which S3 buckets
-- are included or excluded from the job\'s analysis. Each time the job
-- runs, the job uses these criteria to determine which buckets to analyze.
-- A job\'s definition can contain a bucketCriteria object or a
-- bucketDefinitions array, not both.
jobSummary_bucketCriteria :: Lens.Lens' JobSummary (Prelude.Maybe S3BucketCriteriaForJob)
jobSummary_bucketCriteria :: Lens' JobSummary (Maybe S3BucketCriteriaForJob)
jobSummary_bucketCriteria = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe S3BucketCriteriaForJob
bucketCriteria :: Maybe S3BucketCriteriaForJob
$sel:bucketCriteria:JobSummary' :: JobSummary -> Maybe S3BucketCriteriaForJob
bucketCriteria} -> Maybe S3BucketCriteriaForJob
bucketCriteria) (\s :: JobSummary
s@JobSummary' {} Maybe S3BucketCriteriaForJob
a -> JobSummary
s {$sel:bucketCriteria:JobSummary' :: Maybe S3BucketCriteriaForJob
bucketCriteria = Maybe S3BucketCriteriaForJob
a} :: JobSummary)

-- | An array of objects, one for each Amazon Web Services account that owns
-- specific S3 buckets for the job to analyze. Each object specifies the
-- account ID for an account and one or more buckets to analyze for that
-- account. A job\'s definition can contain a bucketDefinitions array or a
-- bucketCriteria object, not both.
jobSummary_bucketDefinitions :: Lens.Lens' JobSummary (Prelude.Maybe [S3BucketDefinitionForJob])
jobSummary_bucketDefinitions :: Lens' JobSummary (Maybe [S3BucketDefinitionForJob])
jobSummary_bucketDefinitions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe [S3BucketDefinitionForJob]
bucketDefinitions :: Maybe [S3BucketDefinitionForJob]
$sel:bucketDefinitions:JobSummary' :: JobSummary -> Maybe [S3BucketDefinitionForJob]
bucketDefinitions} -> Maybe [S3BucketDefinitionForJob]
bucketDefinitions) (\s :: JobSummary
s@JobSummary' {} Maybe [S3BucketDefinitionForJob]
a -> JobSummary
s {$sel:bucketDefinitions:JobSummary' :: Maybe [S3BucketDefinitionForJob]
bucketDefinitions = Maybe [S3BucketDefinitionForJob]
a} :: JobSummary) 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 date and time, in UTC and extended ISO 8601 format, when the job was
-- created.
jobSummary_createdAt :: Lens.Lens' JobSummary (Prelude.Maybe Prelude.UTCTime)
jobSummary_createdAt :: Lens' JobSummary (Maybe UTCTime)
jobSummary_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:JobSummary' :: JobSummary -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: JobSummary
s@JobSummary' {} Maybe ISO8601
a -> JobSummary
s {$sel:createdAt:JobSummary' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: JobSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The unique identifier for the job.
jobSummary_jobId :: Lens.Lens' JobSummary (Prelude.Maybe Prelude.Text)
jobSummary_jobId :: Lens' JobSummary (Maybe Text)
jobSummary_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe Text
jobId :: Maybe Text
$sel:jobId:JobSummary' :: JobSummary -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: JobSummary
s@JobSummary' {} Maybe Text
a -> JobSummary
s {$sel:jobId:JobSummary' :: Maybe Text
jobId = Maybe Text
a} :: JobSummary)

-- | The current status of the job. Possible values are:
--
-- -   CANCELLED - You cancelled the job or, if it\'s a one-time job, you
--     paused the job and didn\'t resume it within 30 days.
--
-- -   COMPLETE - For a one-time job, Amazon Macie finished processing the
--     data specified for the job. This value doesn\'t apply to recurring
--     jobs.
--
-- -   IDLE - For a recurring job, the previous scheduled run is complete
--     and the next scheduled run is pending. This value doesn\'t apply to
--     one-time jobs.
--
-- -   PAUSED - Macie started running the job but additional processing
--     would exceed the monthly sensitive data discovery quota for your
--     account or one or more member accounts that the job analyzes data
--     for.
--
-- -   RUNNING - For a one-time job, the job is in progress. For a
--     recurring job, a scheduled run is in progress.
--
-- -   USER_PAUSED - You paused the job. If you paused the job while it had
--     a status of RUNNING and you don\'t resume it within 30 days of
--     pausing it, the job or job run will expire and be cancelled,
--     depending on the job\'s type. To check the expiration date, refer to
--     the UserPausedDetails.jobExpiresAt property.
jobSummary_jobStatus :: Lens.Lens' JobSummary (Prelude.Maybe JobStatus)
jobSummary_jobStatus :: Lens' JobSummary (Maybe JobStatus)
jobSummary_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:JobSummary' :: JobSummary -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: JobSummary
s@JobSummary' {} Maybe JobStatus
a -> JobSummary
s {$sel:jobStatus:JobSummary' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: JobSummary)

-- | The schedule for running the job. Possible values are:
--
-- -   ONE_TIME - The job runs only once.
--
-- -   SCHEDULED - The job runs on a daily, weekly, or monthly basis.
jobSummary_jobType :: Lens.Lens' JobSummary (Prelude.Maybe JobType)
jobSummary_jobType :: Lens' JobSummary (Maybe JobType)
jobSummary_jobType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe JobType
jobType :: Maybe JobType
$sel:jobType:JobSummary' :: JobSummary -> Maybe JobType
jobType} -> Maybe JobType
jobType) (\s :: JobSummary
s@JobSummary' {} Maybe JobType
a -> JobSummary
s {$sel:jobType:JobSummary' :: Maybe JobType
jobType = Maybe JobType
a} :: JobSummary)

-- | Specifies whether any account- or bucket-level access errors occurred
-- when the job ran. For a recurring job, this value indicates the error
-- status of the job\'s most recent run.
jobSummary_lastRunErrorStatus :: Lens.Lens' JobSummary (Prelude.Maybe LastRunErrorStatus)
jobSummary_lastRunErrorStatus :: Lens' JobSummary (Maybe LastRunErrorStatus)
jobSummary_lastRunErrorStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe LastRunErrorStatus
lastRunErrorStatus :: Maybe LastRunErrorStatus
$sel:lastRunErrorStatus:JobSummary' :: JobSummary -> Maybe LastRunErrorStatus
lastRunErrorStatus} -> Maybe LastRunErrorStatus
lastRunErrorStatus) (\s :: JobSummary
s@JobSummary' {} Maybe LastRunErrorStatus
a -> JobSummary
s {$sel:lastRunErrorStatus:JobSummary' :: Maybe LastRunErrorStatus
lastRunErrorStatus = Maybe LastRunErrorStatus
a} :: JobSummary)

-- | The custom name of the job.
jobSummary_name :: Lens.Lens' JobSummary (Prelude.Maybe Prelude.Text)
jobSummary_name :: Lens' JobSummary (Maybe Text)
jobSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe Text
name :: Maybe Text
$sel:name:JobSummary' :: JobSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: JobSummary
s@JobSummary' {} Maybe Text
a -> JobSummary
s {$sel:name:JobSummary' :: Maybe Text
name = Maybe Text
a} :: JobSummary)

-- | If the current status of the job is USER_PAUSED, specifies when the job
-- was paused and when the job or job run will expire and be cancelled if
-- it isn\'t resumed. This value is present only if the value for jobStatus
-- is USER_PAUSED.
jobSummary_userPausedDetails :: Lens.Lens' JobSummary (Prelude.Maybe UserPausedDetails)
jobSummary_userPausedDetails :: Lens' JobSummary (Maybe UserPausedDetails)
jobSummary_userPausedDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobSummary' {Maybe UserPausedDetails
userPausedDetails :: Maybe UserPausedDetails
$sel:userPausedDetails:JobSummary' :: JobSummary -> Maybe UserPausedDetails
userPausedDetails} -> Maybe UserPausedDetails
userPausedDetails) (\s :: JobSummary
s@JobSummary' {} Maybe UserPausedDetails
a -> JobSummary
s {$sel:userPausedDetails:JobSummary' :: Maybe UserPausedDetails
userPausedDetails = Maybe UserPausedDetails
a} :: JobSummary)

instance Data.FromJSON JobSummary where
  parseJSON :: Value -> Parser JobSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"JobSummary"
      ( \Object
x ->
          Maybe S3BucketCriteriaForJob
-> Maybe [S3BucketDefinitionForJob]
-> Maybe ISO8601
-> Maybe Text
-> Maybe JobStatus
-> Maybe JobType
-> Maybe LastRunErrorStatus
-> Maybe Text
-> Maybe UserPausedDetails
-> JobSummary
JobSummary'
            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
"bucketCriteria")
            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
"bucketDefinitions"
                            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
"createdAt")
            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
"jobId")
            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
"jobStatus")
            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
"jobType")
            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
"lastRunErrorStatus")
            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
"name")
            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
"userPausedDetails")
      )

instance Prelude.Hashable JobSummary where
  hashWithSalt :: Int -> JobSummary -> Int
hashWithSalt Int
_salt JobSummary' {Maybe [S3BucketDefinitionForJob]
Maybe Text
Maybe ISO8601
Maybe JobStatus
Maybe JobType
Maybe LastRunErrorStatus
Maybe S3BucketCriteriaForJob
Maybe UserPausedDetails
userPausedDetails :: Maybe UserPausedDetails
name :: Maybe Text
lastRunErrorStatus :: Maybe LastRunErrorStatus
jobType :: Maybe JobType
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
createdAt :: Maybe ISO8601
bucketDefinitions :: Maybe [S3BucketDefinitionForJob]
bucketCriteria :: Maybe S3BucketCriteriaForJob
$sel:userPausedDetails:JobSummary' :: JobSummary -> Maybe UserPausedDetails
$sel:name:JobSummary' :: JobSummary -> Maybe Text
$sel:lastRunErrorStatus:JobSummary' :: JobSummary -> Maybe LastRunErrorStatus
$sel:jobType:JobSummary' :: JobSummary -> Maybe JobType
$sel:jobStatus:JobSummary' :: JobSummary -> Maybe JobStatus
$sel:jobId:JobSummary' :: JobSummary -> Maybe Text
$sel:createdAt:JobSummary' :: JobSummary -> Maybe ISO8601
$sel:bucketDefinitions:JobSummary' :: JobSummary -> Maybe [S3BucketDefinitionForJob]
$sel:bucketCriteria:JobSummary' :: JobSummary -> Maybe S3BucketCriteriaForJob
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3BucketCriteriaForJob
bucketCriteria
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [S3BucketDefinitionForJob]
bucketDefinitions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobStatus
jobStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobType
jobType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LastRunErrorStatus
lastRunErrorStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UserPausedDetails
userPausedDetails

instance Prelude.NFData JobSummary where
  rnf :: JobSummary -> ()
rnf JobSummary' {Maybe [S3BucketDefinitionForJob]
Maybe Text
Maybe ISO8601
Maybe JobStatus
Maybe JobType
Maybe LastRunErrorStatus
Maybe S3BucketCriteriaForJob
Maybe UserPausedDetails
userPausedDetails :: Maybe UserPausedDetails
name :: Maybe Text
lastRunErrorStatus :: Maybe LastRunErrorStatus
jobType :: Maybe JobType
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
createdAt :: Maybe ISO8601
bucketDefinitions :: Maybe [S3BucketDefinitionForJob]
bucketCriteria :: Maybe S3BucketCriteriaForJob
$sel:userPausedDetails:JobSummary' :: JobSummary -> Maybe UserPausedDetails
$sel:name:JobSummary' :: JobSummary -> Maybe Text
$sel:lastRunErrorStatus:JobSummary' :: JobSummary -> Maybe LastRunErrorStatus
$sel:jobType:JobSummary' :: JobSummary -> Maybe JobType
$sel:jobStatus:JobSummary' :: JobSummary -> Maybe JobStatus
$sel:jobId:JobSummary' :: JobSummary -> Maybe Text
$sel:createdAt:JobSummary' :: JobSummary -> Maybe ISO8601
$sel:bucketDefinitions:JobSummary' :: JobSummary -> Maybe [S3BucketDefinitionForJob]
$sel:bucketCriteria:JobSummary' :: JobSummary -> Maybe S3BucketCriteriaForJob
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe S3BucketCriteriaForJob
bucketCriteria
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [S3BucketDefinitionForJob]
bucketDefinitions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobStatus
jobStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobType
jobType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LastRunErrorStatus
lastRunErrorStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe UserPausedDetails
userPausedDetails