{-# 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.EMRContainers.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.EMRContainers.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.EMRContainers.Types.ConfigurationOverrides
import Amazonka.EMRContainers.Types.FailureReason
import Amazonka.EMRContainers.Types.JobDriver
import Amazonka.EMRContainers.Types.JobRunState
import qualified Amazonka.Prelude as Prelude

-- | This entity describes a job run. A job run is a unit of work, such as a
-- Spark jar, PySpark script, or SparkSQL query, that you submit to Amazon
-- EMR on EKS.
--
-- /See:/ 'newJobRun' smart constructor.
data JobRun = JobRun'
  { -- | The ARN of job run.
    JobRun -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The client token used to start a job run.
    JobRun -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The configuration settings that are used to override default
    -- configuration.
    JobRun -> Maybe ConfigurationOverrides
configurationOverrides :: Prelude.Maybe ConfigurationOverrides,
    -- | The date and time when the job run was created.
    JobRun -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | The user who created the job run.
    JobRun -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The execution role ARN of the job run.
    JobRun -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The reasons why the job run has failed.
    JobRun -> Maybe FailureReason
failureReason :: Prelude.Maybe FailureReason,
    -- | The date and time when the job run has finished.
    JobRun -> Maybe ISO8601
finishedAt :: Prelude.Maybe Data.ISO8601,
    -- | The ID of the job run.
    JobRun -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | Parameters of job driver for the job run.
    JobRun -> Maybe JobDriver
jobDriver :: Prelude.Maybe JobDriver,
    -- | The name of the job run.
    JobRun -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The release version of Amazon EMR.
    JobRun -> Maybe Text
releaseLabel :: Prelude.Maybe Prelude.Text,
    -- | The state of the job run.
    JobRun -> Maybe JobRunState
state :: Prelude.Maybe JobRunState,
    -- | Additional details of the job run state.
    JobRun -> Maybe Text
stateDetails :: Prelude.Maybe Prelude.Text,
    -- | The assigned tags of the job run.
    JobRun -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The ID of the job run\'s virtual cluster.
    JobRun -> Maybe Text
virtualClusterId :: Prelude.Maybe Prelude.Text
  }
  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:
--
-- 'arn', 'jobRun_arn' - The ARN of job run.
--
-- 'clientToken', 'jobRun_clientToken' - The client token used to start a job run.
--
-- 'configurationOverrides', 'jobRun_configurationOverrides' - The configuration settings that are used to override default
-- configuration.
--
-- 'createdAt', 'jobRun_createdAt' - The date and time when the job run was created.
--
-- 'createdBy', 'jobRun_createdBy' - The user who created the job run.
--
-- 'executionRoleArn', 'jobRun_executionRoleArn' - The execution role ARN of the job run.
--
-- 'failureReason', 'jobRun_failureReason' - The reasons why the job run has failed.
--
-- 'finishedAt', 'jobRun_finishedAt' - The date and time when the job run has finished.
--
-- 'id', 'jobRun_id' - The ID of the job run.
--
-- 'jobDriver', 'jobRun_jobDriver' - Parameters of job driver for the job run.
--
-- 'name', 'jobRun_name' - The name of the job run.
--
-- 'releaseLabel', 'jobRun_releaseLabel' - The release version of Amazon EMR.
--
-- 'state', 'jobRun_state' - The state of the job run.
--
-- 'stateDetails', 'jobRun_stateDetails' - Additional details of the job run state.
--
-- 'tags', 'jobRun_tags' - The assigned tags of the job run.
--
-- 'virtualClusterId', 'jobRun_virtualClusterId' - The ID of the job run\'s virtual cluster.
newJobRun ::
  JobRun
newJobRun :: JobRun
newJobRun =
  JobRun'
    { $sel:arn:JobRun' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:clientToken:JobRun' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
      $sel:configurationOverrides:JobRun' :: Maybe ConfigurationOverrides
configurationOverrides = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:JobRun' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:JobRun' :: Maybe Text
createdBy = forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleArn:JobRun' :: Maybe Text
executionRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:JobRun' :: Maybe FailureReason
failureReason = forall a. Maybe a
Prelude.Nothing,
      $sel:finishedAt:JobRun' :: Maybe ISO8601
finishedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:id:JobRun' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:jobDriver:JobRun' :: Maybe JobDriver
jobDriver = forall a. Maybe a
Prelude.Nothing,
      $sel:name:JobRun' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:releaseLabel:JobRun' :: Maybe Text
releaseLabel = forall a. Maybe a
Prelude.Nothing,
      $sel:state:JobRun' :: Maybe JobRunState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:stateDetails:JobRun' :: Maybe Text
stateDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:JobRun' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:virtualClusterId:JobRun' :: Maybe Text
virtualClusterId = forall a. Maybe a
Prelude.Nothing
    }

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

-- | The client token used to start a job run.
jobRun_clientToken :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_clientToken :: Lens' JobRun (Maybe Text)
jobRun_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:JobRun' :: JobRun -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:clientToken:JobRun' :: Maybe Text
clientToken = Maybe Text
a} :: JobRun)

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

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

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

-- | The reasons why the job run has failed.
jobRun_failureReason :: Lens.Lens' JobRun (Prelude.Maybe FailureReason)
jobRun_failureReason :: Lens' JobRun (Maybe FailureReason)
jobRun_failureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe FailureReason
failureReason :: Maybe FailureReason
$sel:failureReason:JobRun' :: JobRun -> Maybe FailureReason
failureReason} -> Maybe FailureReason
failureReason) (\s :: JobRun
s@JobRun' {} Maybe FailureReason
a -> JobRun
s {$sel:failureReason:JobRun' :: Maybe FailureReason
failureReason = Maybe FailureReason
a} :: JobRun)

-- | The date and time when the job run has finished.
jobRun_finishedAt :: Lens.Lens' JobRun (Prelude.Maybe Prelude.UTCTime)
jobRun_finishedAt :: Lens' JobRun (Maybe UTCTime)
jobRun_finishedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe ISO8601
finishedAt :: Maybe ISO8601
$sel:finishedAt:JobRun' :: JobRun -> Maybe ISO8601
finishedAt} -> Maybe ISO8601
finishedAt) (\s :: JobRun
s@JobRun' {} Maybe ISO8601
a -> JobRun
s {$sel:finishedAt:JobRun' :: Maybe ISO8601
finishedAt = Maybe ISO8601
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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

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

-- | The name of the job run.
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)

-- | The release version of Amazon EMR.
jobRun_releaseLabel :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_releaseLabel :: Lens' JobRun (Maybe Text)
jobRun_releaseLabel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
releaseLabel :: Maybe Text
$sel:releaseLabel:JobRun' :: JobRun -> Maybe Text
releaseLabel} -> Maybe Text
releaseLabel) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:releaseLabel:JobRun' :: Maybe Text
releaseLabel = Maybe Text
a} :: JobRun)

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

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

-- | The assigned tags of 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 ID of the job run\'s virtual cluster.
jobRun_virtualClusterId :: Lens.Lens' JobRun (Prelude.Maybe Prelude.Text)
jobRun_virtualClusterId :: Lens' JobRun (Maybe Text)
jobRun_virtualClusterId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobRun' {Maybe Text
virtualClusterId :: Maybe Text
$sel:virtualClusterId:JobRun' :: JobRun -> Maybe Text
virtualClusterId} -> Maybe Text
virtualClusterId) (\s :: JobRun
s@JobRun' {} Maybe Text
a -> JobRun
s {$sel:virtualClusterId:JobRun' :: Maybe Text
virtualClusterId = Maybe Text
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 Text
-> Maybe Text
-> Maybe ConfigurationOverrides
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe FailureReason
-> Maybe ISO8601
-> Maybe Text
-> Maybe JobDriver
-> Maybe Text
-> Maybe Text
-> Maybe JobRunState
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> 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
"arn")
            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
"clientToken")
            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
"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
"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
"createdBy")
            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
"executionRoleArn")
            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
"failureReason")
            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
"finishedAt")
            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
"id")
            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
"jobDriver")
            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
"releaseLabel")
            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
"state")
            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
"stateDetails")
            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
"virtualClusterId")
      )

instance Prelude.Hashable JobRun where
  hashWithSalt :: Int -> JobRun -> Int
hashWithSalt Int
_salt JobRun' {Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe FailureReason
Maybe JobRunState
Maybe ConfigurationOverrides
Maybe JobDriver
virtualClusterId :: Maybe Text
tags :: Maybe (HashMap Text Text)
stateDetails :: Maybe Text
state :: Maybe JobRunState
releaseLabel :: Maybe Text
name :: Maybe Text
jobDriver :: Maybe JobDriver
id :: Maybe Text
finishedAt :: Maybe ISO8601
failureReason :: Maybe FailureReason
executionRoleArn :: Maybe Text
createdBy :: Maybe Text
createdAt :: Maybe ISO8601
configurationOverrides :: Maybe ConfigurationOverrides
clientToken :: Maybe Text
arn :: Maybe Text
$sel:virtualClusterId:JobRun' :: JobRun -> Maybe Text
$sel:tags:JobRun' :: JobRun -> Maybe (HashMap Text Text)
$sel:stateDetails:JobRun' :: JobRun -> Maybe Text
$sel:state:JobRun' :: JobRun -> Maybe JobRunState
$sel:releaseLabel:JobRun' :: JobRun -> Maybe Text
$sel:name:JobRun' :: JobRun -> Maybe Text
$sel:jobDriver:JobRun' :: JobRun -> Maybe JobDriver
$sel:id:JobRun' :: JobRun -> Maybe Text
$sel:finishedAt:JobRun' :: JobRun -> Maybe ISO8601
$sel:failureReason:JobRun' :: JobRun -> Maybe FailureReason
$sel:executionRoleArn:JobRun' :: JobRun -> Maybe Text
$sel:createdBy:JobRun' :: JobRun -> Maybe Text
$sel:createdAt:JobRun' :: JobRun -> Maybe ISO8601
$sel:configurationOverrides:JobRun' :: JobRun -> Maybe ConfigurationOverrides
$sel:clientToken:JobRun' :: JobRun -> Maybe Text
$sel:arn:JobRun' :: JobRun -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConfigurationOverrides
configurationOverrides
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
createdBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
executionRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FailureReason
failureReason
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
finishedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobDriver
jobDriver
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
releaseLabel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobRunState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stateDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
virtualClusterId

instance Prelude.NFData JobRun where
  rnf :: JobRun -> ()
rnf JobRun' {Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe FailureReason
Maybe JobRunState
Maybe ConfigurationOverrides
Maybe JobDriver
virtualClusterId :: Maybe Text
tags :: Maybe (HashMap Text Text)
stateDetails :: Maybe Text
state :: Maybe JobRunState
releaseLabel :: Maybe Text
name :: Maybe Text
jobDriver :: Maybe JobDriver
id :: Maybe Text
finishedAt :: Maybe ISO8601
failureReason :: Maybe FailureReason
executionRoleArn :: Maybe Text
createdBy :: Maybe Text
createdAt :: Maybe ISO8601
configurationOverrides :: Maybe ConfigurationOverrides
clientToken :: Maybe Text
arn :: Maybe Text
$sel:virtualClusterId:JobRun' :: JobRun -> Maybe Text
$sel:tags:JobRun' :: JobRun -> Maybe (HashMap Text Text)
$sel:stateDetails:JobRun' :: JobRun -> Maybe Text
$sel:state:JobRun' :: JobRun -> Maybe JobRunState
$sel:releaseLabel:JobRun' :: JobRun -> Maybe Text
$sel:name:JobRun' :: JobRun -> Maybe Text
$sel:jobDriver:JobRun' :: JobRun -> Maybe JobDriver
$sel:id:JobRun' :: JobRun -> Maybe Text
$sel:finishedAt:JobRun' :: JobRun -> Maybe ISO8601
$sel:failureReason:JobRun' :: JobRun -> Maybe FailureReason
$sel:executionRoleArn:JobRun' :: JobRun -> Maybe Text
$sel:createdBy:JobRun' :: JobRun -> Maybe Text
$sel:createdAt:JobRun' :: JobRun -> Maybe ISO8601
$sel:configurationOverrides:JobRun' :: JobRun -> Maybe ConfigurationOverrides
$sel:clientToken:JobRun' :: JobRun -> Maybe Text
$sel:arn:JobRun' :: JobRun -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 ISO8601
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
executionRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FailureReason
failureReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
finishedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobDriver
jobDriver
      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 Text
releaseLabel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobRunState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stateDetails
      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 Text
virtualClusterId