{-# 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.EMRServerless.Types.JobRun
-- 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.EMRServerless.Types.JobRun where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EMRServerless.Types.ConfigurationOverrides
import Amazonka.EMRServerless.Types.JobDriver
import Amazonka.EMRServerless.Types.JobRunState
import Amazonka.EMRServerless.Types.NetworkConfiguration
import Amazonka.EMRServerless.Types.TotalResourceUtilization
import qualified Amazonka.Prelude as Prelude

-- | Information about a job run. A job run is a unit of work, such as a
-- Spark JAR, Hive query, or SparkSQL query, that you submit to an EMR
-- Serverless application.
--
-- /See:/ 'newJobRun' smart constructor.
data JobRun = JobRun'
  { -- | The configuration settings that are used to override default
    -- configuration.
    JobRun -> Maybe ConfigurationOverrides
configurationOverrides :: Prelude.Maybe ConfigurationOverrides,
    -- | The optional job run name. This doesn\'t have to be unique.
    JobRun -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    JobRun -> Maybe NetworkConfiguration
networkConfiguration :: Prelude.Maybe NetworkConfiguration,
    -- | The tags assigned to the job run.
    JobRun -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The job run total execution duration in seconds. This field is only
    -- available for job runs in a @COMPLETED@, @FAILED@, or @CANCELLED@ state.
    JobRun -> Maybe Int
totalExecutionDurationSeconds :: Prelude.Maybe Prelude.Int,
    -- | The aggregate vCPU, memory, and storage resources used from the time job
    -- start executing till the time job is terminated, rounded up to the
    -- nearest second.
    JobRun -> Maybe TotalResourceUtilization
totalResourceUtilization :: Prelude.Maybe TotalResourceUtilization,
    -- | The ID of the application the job is running on.
    JobRun -> Text
applicationId :: Prelude.Text,
    -- | The ID of the job run.
    JobRun -> Text
jobRunId :: Prelude.Text,
    -- | The execution role ARN of the job run.
    JobRun -> Text
arn :: Prelude.Text,
    -- | The user who created the job run.
    JobRun -> Text
createdBy :: Prelude.Text,
    -- | The date and time when the job run was created.
    JobRun -> POSIX
createdAt :: Data.POSIX,
    -- | The date and time when the job run was updated.
    JobRun -> POSIX
updatedAt :: Data.POSIX,
    -- | The execution role ARN of the job run.
    JobRun -> Text
executionRole :: Prelude.Text,
    -- | The state of the job run.
    JobRun -> JobRunState
state :: JobRunState,
    -- | The state details of the job run.
    JobRun -> Text
stateDetails :: Prelude.Text,
    -- | The EMR release associated with the application your job is running on.
    JobRun -> Text
releaseLabel :: Prelude.Text,
    -- | The job driver for the job run.
    JobRun -> JobDriver
jobDriver :: JobDriver
  }
  deriving (JobRun -> JobRun -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobRun -> JobRun -> Bool
$c/= :: JobRun -> JobRun -> Bool
== :: JobRun -> JobRun -> Bool
$c== :: JobRun -> JobRun -> Bool
Prelude.Eq, Int -> JobRun -> ShowS
[JobRun] -> ShowS
JobRun -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobRun] -> ShowS
$cshowList :: [JobRun] -> ShowS
show :: JobRun -> String
$cshow :: JobRun -> String
showsPrec :: Int -> JobRun -> ShowS
$cshowsPrec :: Int -> JobRun -> ShowS
Prelude.Show, forall x. Rep JobRun x -> JobRun
forall x. JobRun -> Rep JobRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobRun x -> JobRun
$cfrom :: forall x. JobRun -> Rep JobRun x
Prelude.Generic)

-- |
-- Create a value of 'JobRun' 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:
--
-- 'configurationOverrides', 'jobRun_configurationOverrides' - The configuration settings that are used to override default
-- configuration.
--
-- 'name', 'jobRun_name' - The optional job run name. This doesn\'t have to be unique.
--
-- 'networkConfiguration', 'jobRun_networkConfiguration' - Undocumented member.
--
-- 'tags', 'jobRun_tags' - The tags assigned to the job run.
--
-- 'totalExecutionDurationSeconds', 'jobRun_totalExecutionDurationSeconds' - The job run total execution duration in seconds. This field is only
-- available for job runs in a @COMPLETED@, @FAILED@, or @CANCELLED@ state.
--
-- 'totalResourceUtilization', 'jobRun_totalResourceUtilization' - The aggregate vCPU, memory, and storage resources used from the time job
-- start executing till the time job is terminated, rounded up to the
-- nearest second.
--
-- 'applicationId', 'jobRun_applicationId' - The ID of the application the job is running on.
--
-- 'jobRunId', 'jobRun_jobRunId' - The ID of the job run.
--
-- 'arn', 'jobRun_arn' - The execution role ARN of the job run.
--
-- 'createdBy', 'jobRun_createdBy' - The user who created the job run.
--
-- 'createdAt', 'jobRun_createdAt' - The date and time when the job run was created.
--
-- 'updatedAt', 'jobRun_updatedAt' - The date and time when the job run was updated.
--
-- 'executionRole', 'jobRun_executionRole' - The execution role ARN of the job run.
--
-- 'state', 'jobRun_state' - The state of the job run.
--
-- 'stateDetails', 'jobRun_stateDetails' - The state details of the job run.
--
-- 'releaseLabel', 'jobRun_releaseLabel' - The EMR release associated with the application your job is running on.
--
-- 'jobDriver', 'jobRun_jobDriver' - The job driver for the job run.
newJobRun ::
  -- | 'applicationId'
  Prelude.Text ->
  -- | 'jobRunId'
  Prelude.Text ->
  -- | 'arn'
  Prelude.Text ->
  -- | 'createdBy'
  Prelude.Text ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'updatedAt'
  Prelude.UTCTime ->
  -- | 'executionRole'
  Prelude.Text ->
  -- | 'state'
  JobRunState ->
  -- | 'stateDetails'
  Prelude.Text ->
  -- | 'releaseLabel'
  Prelude.Text ->
  -- | 'jobDriver'
  JobDriver ->
  JobRun
newJobRun :: Text
-> Text
-> Text
-> Text
-> UTCTime
-> UTCTime
-> Text
-> JobRunState
-> Text
-> Text
-> JobDriver
-> JobRun
newJobRun
  Text
pApplicationId_
  Text
pJobRunId_
  Text
pArn_
  Text
pCreatedBy_
  UTCTime
pCreatedAt_
  UTCTime
pUpdatedAt_
  Text
pExecutionRole_
  JobRunState
pState_
  Text
pStateDetails_
  Text
pReleaseLabel_
  JobDriver
pJobDriver_ =
    JobRun'
      { $sel:configurationOverrides:JobRun' :: Maybe ConfigurationOverrides
configurationOverrides = forall a. Maybe a
Prelude.Nothing,
        $sel:name:JobRun' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
        $sel:networkConfiguration:JobRun' :: Maybe NetworkConfiguration
networkConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:JobRun' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:totalExecutionDurationSeconds:JobRun' :: Maybe Int
totalExecutionDurationSeconds = forall a. Maybe a
Prelude.Nothing,
        $sel:totalResourceUtilization:JobRun' :: Maybe TotalResourceUtilization
totalResourceUtilization = forall a. Maybe a
Prelude.Nothing,
        $sel:applicationId:JobRun' :: Text
applicationId = Text
pApplicationId_,
        $sel:jobRunId:JobRun' :: Text
jobRunId = Text
pJobRunId_,
        $sel:arn:JobRun' :: Text
arn = Text
pArn_,
        $sel:createdBy:JobRun' :: Text
createdBy = Text
pCreatedBy_,
        $sel:createdAt:JobRun' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
        $sel:updatedAt:JobRun' :: POSIX
updatedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_,
        $sel:executionRole:JobRun' :: Text
executionRole = Text
pExecutionRole_,
        $sel:state:JobRun' :: JobRunState
state = JobRunState
pState_,
        $sel:stateDetails:JobRun' :: Text
stateDetails = Text
pStateDetails_,
        $sel:releaseLabel:JobRun' :: Text
releaseLabel = Text
pReleaseLabel_,
        $sel:jobDriver:JobRun' :: JobDriver
jobDriver = JobDriver
pJobDriver_
      }

-- | The configuration settings that are used to override default
-- configuration.
jobRun_configurationOverrides :: Lens.Lens' JobRun (Prelude.Maybe ConfigurationOverrides)
jobRun_configurationOverrides :: Lens' JobRun (Maybe ConfigurationOverrides)
jobRun_configurationOverrides = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe ConfigurationOverrides
configurationOverrides :: Maybe ConfigurationOverrides
$sel:configurationOverrides:JobRun' :: JobRun -> Maybe ConfigurationOverrides
configurationOverrides} -> Maybe ConfigurationOverrides
configurationOverrides) (\s :: JobRun
s@JobRun' {} Maybe ConfigurationOverrides
a -> JobRun
s {$sel:configurationOverrides:JobRun' :: Maybe ConfigurationOverrides
configurationOverrides = Maybe ConfigurationOverrides
a} :: JobRun)

-- | The optional job run name. This doesn\'t have to be unique.
jobRun_name :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_name :: Lens' JobRun (Maybe Text)
jobRun_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
name :: Maybe Text
$sel:name:JobRun' :: JobRun -> Maybe Text
name} -> Maybe Text
name) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:name:JobRun' :: Maybe Text
name = Maybe Text
a} :: JobRun)

-- | Undocumented member.
jobRun_networkConfiguration :: Lens.Lens' JobRun (Prelude.Maybe NetworkConfiguration)
jobRun_networkConfiguration :: Lens' JobRun (Maybe NetworkConfiguration)
jobRun_networkConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe NetworkConfiguration
networkConfiguration :: Maybe NetworkConfiguration
$sel:networkConfiguration:JobRun' :: JobRun -> Maybe NetworkConfiguration
networkConfiguration} -> Maybe NetworkConfiguration
networkConfiguration) (\s :: JobRun
s@JobRun' {} Maybe NetworkConfiguration
a -> JobRun
s {$sel:networkConfiguration:JobRun' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
a} :: JobRun)

-- | The tags assigned to the job run.
jobRun_tags :: Lens.Lens' JobRun (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
jobRun_tags :: Lens' JobRun (Maybe (HashMap Text Text))
jobRun_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:JobRun' :: JobRun -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: JobRun
s@JobRun' {} Maybe (HashMap Text Text)
a -> JobRun
s {$sel:tags:JobRun' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: JobRun) 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 job run total execution duration in seconds. This field is only
-- available for job runs in a @COMPLETED@, @FAILED@, or @CANCELLED@ state.
jobRun_totalExecutionDurationSeconds :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Int)
jobRun_totalExecutionDurationSeconds :: Lens' JobRun (Maybe Int)
jobRun_totalExecutionDurationSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Int
totalExecutionDurationSeconds :: Maybe Int
$sel:totalExecutionDurationSeconds:JobRun' :: JobRun -> Maybe Int
totalExecutionDurationSeconds} -> Maybe Int
totalExecutionDurationSeconds) (\s :: JobRun
s@JobRun' {} Maybe Int
a -> JobRun
s {$sel:totalExecutionDurationSeconds:JobRun' :: Maybe Int
totalExecutionDurationSeconds = Maybe Int
a} :: JobRun)

-- | The aggregate vCPU, memory, and storage resources used from the time job
-- start executing till the time job is terminated, rounded up to the
-- nearest second.
jobRun_totalResourceUtilization :: Lens.Lens' JobRun (Prelude.Maybe TotalResourceUtilization)
jobRun_totalResourceUtilization :: Lens' JobRun (Maybe TotalResourceUtilization)
jobRun_totalResourceUtilization = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe TotalResourceUtilization
totalResourceUtilization :: Maybe TotalResourceUtilization
$sel:totalResourceUtilization:JobRun' :: JobRun -> Maybe TotalResourceUtilization
totalResourceUtilization} -> Maybe TotalResourceUtilization
totalResourceUtilization) (\s :: JobRun
s@JobRun' {} Maybe TotalResourceUtilization
a -> JobRun
s {$sel:totalResourceUtilization:JobRun' :: Maybe TotalResourceUtilization
totalResourceUtilization = Maybe TotalResourceUtilization
a} :: JobRun)

-- | The ID of the application the job is running on.
jobRun_applicationId :: Lens.Lens' JobRun Prelude.Text
jobRun_applicationId :: Lens' JobRun Text
jobRun_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Text
applicationId :: Text
$sel:applicationId:JobRun' :: JobRun -> Text
applicationId} -> Text
applicationId) (\s :: JobRun
s@JobRun' {} Text
a -> JobRun
s {$sel:applicationId:JobRun' :: Text
applicationId = Text
a} :: JobRun)

-- | The ID of the job run.
jobRun_jobRunId :: Lens.Lens' JobRun Prelude.Text
jobRun_jobRunId :: Lens' JobRun Text
jobRun_jobRunId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Text
jobRunId :: Text
$sel:jobRunId:JobRun' :: JobRun -> Text
jobRunId} -> Text
jobRunId) (\s :: JobRun
s@JobRun' {} Text
a -> JobRun
s {$sel:jobRunId:JobRun' :: Text
jobRunId = Text
a} :: JobRun)

-- | The execution role ARN of the job run.
jobRun_arn :: Lens.Lens' JobRun Prelude.Text
jobRun_arn :: Lens' JobRun Text
jobRun_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Text
arn :: Text
$sel:arn:JobRun' :: JobRun -> Text
arn} -> Text
arn) (\s :: JobRun
s@JobRun' {} Text
a -> JobRun
s {$sel:arn:JobRun' :: Text
arn = Text
a} :: JobRun)

-- | The user who created the job run.
jobRun_createdBy :: Lens.Lens' JobRun Prelude.Text
jobRun_createdBy :: Lens' JobRun Text
jobRun_createdBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Text
createdBy :: Text
$sel:createdBy:JobRun' :: JobRun -> Text
createdBy} -> Text
createdBy) (\s :: JobRun
s@JobRun' {} Text
a -> JobRun
s {$sel:createdBy:JobRun' :: Text
createdBy = Text
a} :: JobRun)

-- | The date and time when the job run was created.
jobRun_createdAt :: Lens.Lens' JobRun Prelude.UTCTime
jobRun_createdAt :: Lens' JobRun UTCTime
jobRun_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {POSIX
createdAt :: POSIX
$sel:createdAt:JobRun' :: JobRun -> POSIX
createdAt} -> POSIX
createdAt) (\s :: JobRun
s@JobRun' {} POSIX
a -> JobRun
s {$sel:createdAt:JobRun' :: POSIX
createdAt = POSIX
a} :: JobRun) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The date and time when the job run was updated.
jobRun_updatedAt :: Lens.Lens' JobRun Prelude.UTCTime
jobRun_updatedAt :: Lens' JobRun UTCTime
jobRun_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {POSIX
updatedAt :: POSIX
$sel:updatedAt:JobRun' :: JobRun -> POSIX
updatedAt} -> POSIX
updatedAt) (\s :: JobRun
s@JobRun' {} POSIX
a -> JobRun
s {$sel:updatedAt:JobRun' :: POSIX
updatedAt = POSIX
a} :: JobRun) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The execution role ARN of the job run.
jobRun_executionRole :: Lens.Lens' JobRun Prelude.Text
jobRun_executionRole :: Lens' JobRun Text
jobRun_executionRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Text
executionRole :: Text
$sel:executionRole:JobRun' :: JobRun -> Text
executionRole} -> Text
executionRole) (\s :: JobRun
s@JobRun' {} Text
a -> JobRun
s {$sel:executionRole:JobRun' :: Text
executionRole = Text
a} :: JobRun)

-- | The state of the job run.
jobRun_state :: Lens.Lens' JobRun JobRunState
jobRun_state :: Lens' JobRun JobRunState
jobRun_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {JobRunState
state :: JobRunState
$sel:state:JobRun' :: JobRun -> JobRunState
state} -> JobRunState
state) (\s :: JobRun
s@JobRun' {} JobRunState
a -> JobRun
s {$sel:state:JobRun' :: JobRunState
state = JobRunState
a} :: JobRun)

-- | The state details of the job run.
jobRun_stateDetails :: Lens.Lens' JobRun Prelude.Text
jobRun_stateDetails :: Lens' JobRun Text
jobRun_stateDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Text
stateDetails :: Text
$sel:stateDetails:JobRun' :: JobRun -> Text
stateDetails} -> Text
stateDetails) (\s :: JobRun
s@JobRun' {} Text
a -> JobRun
s {$sel:stateDetails:JobRun' :: Text
stateDetails = Text
a} :: JobRun)

-- | The EMR release associated with the application your job is running on.
jobRun_releaseLabel :: Lens.Lens' JobRun Prelude.Text
jobRun_releaseLabel :: Lens' JobRun Text
jobRun_releaseLabel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Text
releaseLabel :: Text
$sel:releaseLabel:JobRun' :: JobRun -> Text
releaseLabel} -> Text
releaseLabel) (\s :: JobRun
s@JobRun' {} Text
a -> JobRun
s {$sel:releaseLabel:JobRun' :: Text
releaseLabel = Text
a} :: JobRun)

-- | The job driver for the job run.
jobRun_jobDriver :: Lens.Lens' JobRun JobDriver
jobRun_jobDriver :: Lens' JobRun JobDriver
jobRun_jobDriver = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {JobDriver
jobDriver :: JobDriver
$sel:jobDriver:JobRun' :: JobRun -> JobDriver
jobDriver} -> JobDriver
jobDriver) (\s :: JobRun
s@JobRun' {} JobDriver
a -> JobRun
s {$sel:jobDriver:JobRun' :: JobDriver
jobDriver = JobDriver
a} :: JobRun)

instance Data.FromJSON JobRun where
  parseJSON :: Value -> Parser JobRun
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"JobRun"
      ( \Object
x ->
          Maybe ConfigurationOverrides
-> Maybe Text
-> Maybe NetworkConfiguration
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Maybe TotalResourceUtilization
-> Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> Text
-> JobRunState
-> Text
-> Text
-> JobDriver
-> JobRun
JobRun'
            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
"configurationOverrides")
            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
"networkConfiguration")
            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
"tags" 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
"totalExecutionDurationSeconds")
            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
"totalResourceUtilization")
            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")
            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
"jobRunId")
            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
"arn")
            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
"createdBy")
            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
"createdAt")
            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
"updatedAt")
            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
"executionRole")
            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
"state")
            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
"stateDetails")
            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
"releaseLabel")
            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
"jobDriver")
      )

instance Prelude.Hashable JobRun where
  hashWithSalt :: Int -> JobRun -> Int
hashWithSalt Int
_salt JobRun' {Maybe Int
Maybe Text
Maybe (HashMap Text Text)
Maybe NetworkConfiguration
Maybe ConfigurationOverrides
Maybe TotalResourceUtilization
Text
POSIX
JobRunState
JobDriver
jobDriver :: JobDriver
releaseLabel :: Text
stateDetails :: Text
state :: JobRunState
executionRole :: Text
updatedAt :: POSIX
createdAt :: POSIX
createdBy :: Text
arn :: Text
jobRunId :: Text
applicationId :: Text
totalResourceUtilization :: Maybe TotalResourceUtilization
totalExecutionDurationSeconds :: Maybe Int
tags :: Maybe (HashMap Text Text)
networkConfiguration :: Maybe NetworkConfiguration
name :: Maybe Text
configurationOverrides :: Maybe ConfigurationOverrides
$sel:jobDriver:JobRun' :: JobRun -> JobDriver
$sel:releaseLabel:JobRun' :: JobRun -> Text
$sel:stateDetails:JobRun' :: JobRun -> Text
$sel:state:JobRun' :: JobRun -> JobRunState
$sel:executionRole:JobRun' :: JobRun -> Text
$sel:updatedAt:JobRun' :: JobRun -> POSIX
$sel:createdAt:JobRun' :: JobRun -> POSIX
$sel:createdBy:JobRun' :: JobRun -> Text
$sel:arn:JobRun' :: JobRun -> Text
$sel:jobRunId:JobRun' :: JobRun -> Text
$sel:applicationId:JobRun' :: JobRun -> Text
$sel:totalResourceUtilization:JobRun' :: JobRun -> Maybe TotalResourceUtilization
$sel:totalExecutionDurationSeconds:JobRun' :: JobRun -> Maybe Int
$sel:tags:JobRun' :: JobRun -> Maybe (HashMap Text Text)
$sel:networkConfiguration:JobRun' :: JobRun -> Maybe NetworkConfiguration
$sel:name:JobRun' :: JobRun -> Maybe Text
$sel:configurationOverrides:JobRun' :: JobRun -> Maybe ConfigurationOverrides
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConfigurationOverrides
configurationOverrides
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkConfiguration
networkConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
totalExecutionDurationSeconds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TotalResourceUtilization
totalResourceUtilization
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobRunId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
createdBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
updatedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
executionRole
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` JobRunState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stateDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
releaseLabel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` JobDriver
jobDriver

instance Prelude.NFData JobRun where
  rnf :: JobRun -> ()
rnf JobRun' {Maybe Int
Maybe Text
Maybe (HashMap Text Text)
Maybe NetworkConfiguration
Maybe ConfigurationOverrides
Maybe TotalResourceUtilization
Text
POSIX
JobRunState
JobDriver
jobDriver :: JobDriver
releaseLabel :: Text
stateDetails :: Text
state :: JobRunState
executionRole :: Text
updatedAt :: POSIX
createdAt :: POSIX
createdBy :: Text
arn :: Text
jobRunId :: Text
applicationId :: Text
totalResourceUtilization :: Maybe TotalResourceUtilization
totalExecutionDurationSeconds :: Maybe Int
tags :: Maybe (HashMap Text Text)
networkConfiguration :: Maybe NetworkConfiguration
name :: Maybe Text
configurationOverrides :: Maybe ConfigurationOverrides
$sel:jobDriver:JobRun' :: JobRun -> JobDriver
$sel:releaseLabel:JobRun' :: JobRun -> Text
$sel:stateDetails:JobRun' :: JobRun -> Text
$sel:state:JobRun' :: JobRun -> JobRunState
$sel:executionRole:JobRun' :: JobRun -> Text
$sel:updatedAt:JobRun' :: JobRun -> POSIX
$sel:createdAt:JobRun' :: JobRun -> POSIX
$sel:createdBy:JobRun' :: JobRun -> Text
$sel:arn:JobRun' :: JobRun -> Text
$sel:jobRunId:JobRun' :: JobRun -> Text
$sel:applicationId:JobRun' :: JobRun -> Text
$sel:totalResourceUtilization:JobRun' :: JobRun -> Maybe TotalResourceUtilization
$sel:totalExecutionDurationSeconds:JobRun' :: JobRun -> Maybe Int
$sel:tags:JobRun' :: JobRun -> Maybe (HashMap Text Text)
$sel:networkConfiguration:JobRun' :: JobRun -> Maybe NetworkConfiguration
$sel:name:JobRun' :: JobRun -> Maybe Text
$sel:configurationOverrides:JobRun' :: JobRun -> Maybe ConfigurationOverrides
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ConfigurationOverrides
configurationOverrides
      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 NetworkConfiguration
networkConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
totalExecutionDurationSeconds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TotalResourceUtilization
totalResourceUtilization
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applicationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jobRunId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
createdBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
updatedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
executionRole
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf JobRunState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stateDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
releaseLabel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf JobDriver
jobDriver