{-# 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 #-}
module Amazonka.IoT.Types.Job where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types.AbortConfig
import Amazonka.IoT.Types.JobExecutionsRolloutConfig
import Amazonka.IoT.Types.JobProcessDetails
import Amazonka.IoT.Types.JobStatus
import Amazonka.IoT.Types.PresignedUrlConfig
import Amazonka.IoT.Types.TargetSelection
import Amazonka.IoT.Types.TimeoutConfig
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Job = Job'
{
Job -> Maybe JobStatus
status :: Prelude.Maybe JobStatus,
Job -> Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig :: Prelude.Maybe JobExecutionsRolloutConfig,
Job -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
Job -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
Job -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
Job -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
Job -> Maybe AbortConfig
abortConfig :: Prelude.Maybe AbortConfig,
Job -> Maybe JobProcessDetails
jobProcessDetails :: Prelude.Maybe JobProcessDetails,
Job -> Maybe Text
namespaceId :: Prelude.Maybe Prelude.Text,
Job -> Maybe Text
reasonCode :: Prelude.Maybe Prelude.Text,
Job -> Maybe PresignedUrlConfig
presignedUrlConfig :: Prelude.Maybe PresignedUrlConfig,
Job -> Maybe Bool
forceCanceled :: Prelude.Maybe Prelude.Bool,
Job -> Maybe Text
jobTemplateArn :: Prelude.Maybe Prelude.Text,
Job -> Maybe (NonEmpty Text)
targets :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
Job -> Maybe POSIX
completedAt :: Prelude.Maybe Core.POSIX,
:: Prelude.Maybe Prelude.Text,
Job -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Job -> Maybe TargetSelection
targetSelection :: Prelude.Maybe TargetSelection,
Job -> Maybe TimeoutConfig
timeoutConfig :: Prelude.Maybe TimeoutConfig
}
deriving (Job -> Job -> Bool
(Job -> Job -> Bool) -> (Job -> Job -> Bool) -> Eq Job
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Job -> Job -> Bool
$c/= :: Job -> Job -> Bool
== :: Job -> Job -> Bool
$c== :: Job -> Job -> Bool
Prelude.Eq, ReadPrec [Job]
ReadPrec Job
Int -> ReadS Job
ReadS [Job]
(Int -> ReadS Job)
-> ReadS [Job] -> ReadPrec Job -> ReadPrec [Job] -> Read Job
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Job]
$creadListPrec :: ReadPrec [Job]
readPrec :: ReadPrec Job
$creadPrec :: ReadPrec Job
readList :: ReadS [Job]
$creadList :: ReadS [Job]
readsPrec :: Int -> ReadS Job
$creadsPrec :: Int -> ReadS Job
Prelude.Read, Int -> Job -> ShowS
[Job] -> ShowS
Job -> String
(Int -> Job -> ShowS)
-> (Job -> String) -> ([Job] -> ShowS) -> Show Job
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Job] -> ShowS
$cshowList :: [Job] -> ShowS
show :: Job -> String
$cshow :: Job -> String
showsPrec :: Int -> Job -> ShowS
$cshowsPrec :: Int -> Job -> ShowS
Prelude.Show, (forall x. Job -> Rep Job x)
-> (forall x. Rep Job x -> Job) -> Generic Job
forall x. Rep Job x -> Job
forall x. Job -> Rep Job x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Job x -> Job
$cfrom :: forall x. Job -> Rep Job x
Prelude.Generic)
newJob ::
Job
newJob :: Job
newJob =
Job' :: Maybe JobStatus
-> Maybe JobExecutionsRolloutConfig
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job
Job'
{ $sel:status:Job' :: Maybe JobStatus
status = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:jobExecutionsRolloutConfig:Job' :: Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig = Maybe JobExecutionsRolloutConfig
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:Job' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedAt:Job' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:jobArn:Job' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:Job' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:abortConfig:Job' :: Maybe AbortConfig
abortConfig = Maybe AbortConfig
forall a. Maybe a
Prelude.Nothing,
$sel:jobProcessDetails:Job' :: Maybe JobProcessDetails
jobProcessDetails = Maybe JobProcessDetails
forall a. Maybe a
Prelude.Nothing,
$sel:namespaceId:Job' :: Maybe Text
namespaceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reasonCode:Job' :: Maybe Text
reasonCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:presignedUrlConfig:Job' :: Maybe PresignedUrlConfig
presignedUrlConfig = Maybe PresignedUrlConfig
forall a. Maybe a
Prelude.Nothing,
$sel:forceCanceled:Job' :: Maybe Bool
forceCanceled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:jobTemplateArn:Job' :: Maybe Text
jobTemplateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targets:Job' :: Maybe (NonEmpty Text)
targets = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:completedAt:Job' :: Maybe POSIX
completedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:comment:Job' :: Maybe Text
comment = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Job' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targetSelection:Job' :: Maybe TargetSelection
targetSelection = Maybe TargetSelection
forall a. Maybe a
Prelude.Nothing,
$sel:timeoutConfig:Job' :: Maybe TimeoutConfig
timeoutConfig = Maybe TimeoutConfig
forall a. Maybe a
Prelude.Nothing
}
job_status :: Lens.Lens' Job (Prelude.Maybe JobStatus)
job_status :: (Maybe JobStatus -> f (Maybe JobStatus)) -> Job -> f Job
job_status = (Job -> Maybe JobStatus)
-> (Job -> Maybe JobStatus -> Job)
-> Lens Job Job (Maybe JobStatus) (Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobStatus
status :: Maybe JobStatus
$sel:status:Job' :: Job -> Maybe JobStatus
status} -> Maybe JobStatus
status) (\s :: Job
s@Job' {} Maybe JobStatus
a -> Job
s {$sel:status:Job' :: Maybe JobStatus
status = Maybe JobStatus
a} :: Job)
job_jobExecutionsRolloutConfig :: Lens.Lens' Job (Prelude.Maybe JobExecutionsRolloutConfig)
job_jobExecutionsRolloutConfig :: (Maybe JobExecutionsRolloutConfig
-> f (Maybe JobExecutionsRolloutConfig))
-> Job -> f Job
job_jobExecutionsRolloutConfig = (Job -> Maybe JobExecutionsRolloutConfig)
-> (Job -> Maybe JobExecutionsRolloutConfig -> Job)
-> Lens
Job
Job
(Maybe JobExecutionsRolloutConfig)
(Maybe JobExecutionsRolloutConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig :: Maybe JobExecutionsRolloutConfig
$sel:jobExecutionsRolloutConfig:Job' :: Job -> Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig} -> Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig) (\s :: Job
s@Job' {} Maybe JobExecutionsRolloutConfig
a -> Job
s {$sel:jobExecutionsRolloutConfig:Job' :: Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig = Maybe JobExecutionsRolloutConfig
a} :: Job)
job_jobId :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_jobId :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_jobId = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
jobId :: Maybe Text
$sel:jobId:Job' :: Job -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:jobId:Job' :: Maybe Text
jobId = Maybe Text
a} :: Job)
job_lastUpdatedAt :: Lens.Lens' Job (Prelude.Maybe Prelude.UTCTime)
job_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Job -> f Job
job_lastUpdatedAt = (Job -> Maybe POSIX)
-> (Job -> Maybe POSIX -> Job)
-> Lens Job Job (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:Job' :: Job -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: Job
s@Job' {} Maybe POSIX
a -> Job
s {$sel:lastUpdatedAt:Job' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: Job) ((Maybe POSIX -> f (Maybe POSIX)) -> Job -> f Job)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
job_jobArn :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_jobArn :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_jobArn = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:Job' :: Job -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:jobArn:Job' :: Maybe Text
jobArn = Maybe Text
a} :: Job)
job_createdAt :: Lens.Lens' Job (Prelude.Maybe Prelude.UTCTime)
job_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Job -> f Job
job_createdAt = (Job -> Maybe POSIX)
-> (Job -> Maybe POSIX -> Job)
-> Lens Job Job (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Job' :: Job -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Job
s@Job' {} Maybe POSIX
a -> Job
s {$sel:createdAt:Job' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Job) ((Maybe POSIX -> f (Maybe POSIX)) -> Job -> f Job)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
job_abortConfig :: Lens.Lens' Job (Prelude.Maybe AbortConfig)
job_abortConfig :: (Maybe AbortConfig -> f (Maybe AbortConfig)) -> Job -> f Job
job_abortConfig = (Job -> Maybe AbortConfig)
-> (Job -> Maybe AbortConfig -> Job)
-> Lens Job Job (Maybe AbortConfig) (Maybe AbortConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe AbortConfig
abortConfig :: Maybe AbortConfig
$sel:abortConfig:Job' :: Job -> Maybe AbortConfig
abortConfig} -> Maybe AbortConfig
abortConfig) (\s :: Job
s@Job' {} Maybe AbortConfig
a -> Job
s {$sel:abortConfig:Job' :: Maybe AbortConfig
abortConfig = Maybe AbortConfig
a} :: Job)
job_jobProcessDetails :: Lens.Lens' Job (Prelude.Maybe JobProcessDetails)
job_jobProcessDetails :: (Maybe JobProcessDetails -> f (Maybe JobProcessDetails))
-> Job -> f Job
job_jobProcessDetails = (Job -> Maybe JobProcessDetails)
-> (Job -> Maybe JobProcessDetails -> Job)
-> Lens Job Job (Maybe JobProcessDetails) (Maybe JobProcessDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe JobProcessDetails
jobProcessDetails :: Maybe JobProcessDetails
$sel:jobProcessDetails:Job' :: Job -> Maybe JobProcessDetails
jobProcessDetails} -> Maybe JobProcessDetails
jobProcessDetails) (\s :: Job
s@Job' {} Maybe JobProcessDetails
a -> Job
s {$sel:jobProcessDetails:Job' :: Maybe JobProcessDetails
jobProcessDetails = Maybe JobProcessDetails
a} :: Job)
job_namespaceId :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_namespaceId :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_namespaceId = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
namespaceId :: Maybe Text
$sel:namespaceId:Job' :: Job -> Maybe Text
namespaceId} -> Maybe Text
namespaceId) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:namespaceId:Job' :: Maybe Text
namespaceId = Maybe Text
a} :: Job)
job_reasonCode :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_reasonCode :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_reasonCode = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
reasonCode :: Maybe Text
$sel:reasonCode:Job' :: Job -> Maybe Text
reasonCode} -> Maybe Text
reasonCode) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:reasonCode:Job' :: Maybe Text
reasonCode = Maybe Text
a} :: Job)
job_presignedUrlConfig :: Lens.Lens' Job (Prelude.Maybe PresignedUrlConfig)
job_presignedUrlConfig :: (Maybe PresignedUrlConfig -> f (Maybe PresignedUrlConfig))
-> Job -> f Job
job_presignedUrlConfig = (Job -> Maybe PresignedUrlConfig)
-> (Job -> Maybe PresignedUrlConfig -> Job)
-> Lens
Job Job (Maybe PresignedUrlConfig) (Maybe PresignedUrlConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe PresignedUrlConfig
presignedUrlConfig :: Maybe PresignedUrlConfig
$sel:presignedUrlConfig:Job' :: Job -> Maybe PresignedUrlConfig
presignedUrlConfig} -> Maybe PresignedUrlConfig
presignedUrlConfig) (\s :: Job
s@Job' {} Maybe PresignedUrlConfig
a -> Job
s {$sel:presignedUrlConfig:Job' :: Maybe PresignedUrlConfig
presignedUrlConfig = Maybe PresignedUrlConfig
a} :: Job)
job_forceCanceled :: Lens.Lens' Job (Prelude.Maybe Prelude.Bool)
job_forceCanceled :: (Maybe Bool -> f (Maybe Bool)) -> Job -> f Job
job_forceCanceled = (Job -> Maybe Bool)
-> (Job -> Maybe Bool -> Job)
-> Lens Job Job (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Bool
forceCanceled :: Maybe Bool
$sel:forceCanceled:Job' :: Job -> Maybe Bool
forceCanceled} -> Maybe Bool
forceCanceled) (\s :: Job
s@Job' {} Maybe Bool
a -> Job
s {$sel:forceCanceled:Job' :: Maybe Bool
forceCanceled = Maybe Bool
a} :: Job)
job_jobTemplateArn :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_jobTemplateArn :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_jobTemplateArn = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
jobTemplateArn :: Maybe Text
$sel:jobTemplateArn:Job' :: Job -> Maybe Text
jobTemplateArn} -> Maybe Text
jobTemplateArn) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:jobTemplateArn:Job' :: Maybe Text
jobTemplateArn = Maybe Text
a} :: Job)
job_targets :: Lens.Lens' Job (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
job_targets :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Job -> f Job
job_targets = (Job -> Maybe (NonEmpty Text))
-> (Job -> Maybe (NonEmpty Text) -> Job)
-> Lens Job Job (Maybe (NonEmpty Text)) (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe (NonEmpty Text)
targets :: Maybe (NonEmpty Text)
$sel:targets:Job' :: Job -> Maybe (NonEmpty Text)
targets} -> Maybe (NonEmpty Text)
targets) (\s :: Job
s@Job' {} Maybe (NonEmpty Text)
a -> Job
s {$sel:targets:Job' :: Maybe (NonEmpty Text)
targets = Maybe (NonEmpty Text)
a} :: Job) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Job -> f Job)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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 AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
job_completedAt :: Lens.Lens' Job (Prelude.Maybe Prelude.UTCTime)
job_completedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Job -> f Job
job_completedAt = (Job -> Maybe POSIX)
-> (Job -> Maybe POSIX -> Job)
-> Lens Job Job (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe POSIX
completedAt :: Maybe POSIX
$sel:completedAt:Job' :: Job -> Maybe POSIX
completedAt} -> Maybe POSIX
completedAt) (\s :: Job
s@Job' {} Maybe POSIX
a -> Job
s {$sel:completedAt:Job' :: Maybe POSIX
completedAt = Maybe POSIX
a} :: Job) ((Maybe POSIX -> f (Maybe POSIX)) -> Job -> f Job)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Job
-> f Job
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
job_comment :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
= (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
comment :: Maybe Text
$sel:comment:Job' :: Job -> Maybe Text
comment} -> Maybe Text
comment) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:comment:Job' :: Maybe Text
comment = Maybe Text
a} :: Job)
job_description :: Lens.Lens' Job (Prelude.Maybe Prelude.Text)
job_description :: (Maybe Text -> f (Maybe Text)) -> Job -> f Job
job_description = (Job -> Maybe Text)
-> (Job -> Maybe Text -> Job)
-> Lens Job Job (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe Text
description :: Maybe Text
$sel:description:Job' :: Job -> Maybe Text
description} -> Maybe Text
description) (\s :: Job
s@Job' {} Maybe Text
a -> Job
s {$sel:description:Job' :: Maybe Text
description = Maybe Text
a} :: Job)
job_targetSelection :: Lens.Lens' Job (Prelude.Maybe TargetSelection)
job_targetSelection :: (Maybe TargetSelection -> f (Maybe TargetSelection))
-> Job -> f Job
job_targetSelection = (Job -> Maybe TargetSelection)
-> (Job -> Maybe TargetSelection -> Job)
-> Lens Job Job (Maybe TargetSelection) (Maybe TargetSelection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe TargetSelection
targetSelection :: Maybe TargetSelection
$sel:targetSelection:Job' :: Job -> Maybe TargetSelection
targetSelection} -> Maybe TargetSelection
targetSelection) (\s :: Job
s@Job' {} Maybe TargetSelection
a -> Job
s {$sel:targetSelection:Job' :: Maybe TargetSelection
targetSelection = Maybe TargetSelection
a} :: Job)
job_timeoutConfig :: Lens.Lens' Job (Prelude.Maybe TimeoutConfig)
job_timeoutConfig :: (Maybe TimeoutConfig -> f (Maybe TimeoutConfig)) -> Job -> f Job
job_timeoutConfig = (Job -> Maybe TimeoutConfig)
-> (Job -> Maybe TimeoutConfig -> Job)
-> Lens Job Job (Maybe TimeoutConfig) (Maybe TimeoutConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Job' {Maybe TimeoutConfig
timeoutConfig :: Maybe TimeoutConfig
$sel:timeoutConfig:Job' :: Job -> Maybe TimeoutConfig
timeoutConfig} -> Maybe TimeoutConfig
timeoutConfig) (\s :: Job
s@Job' {} Maybe TimeoutConfig
a -> Job
s {$sel:timeoutConfig:Job' :: Maybe TimeoutConfig
timeoutConfig = Maybe TimeoutConfig
a} :: Job)
instance Core.FromJSON Job where
parseJSON :: Value -> Parser Job
parseJSON =
String -> (Object -> Parser Job) -> Value -> Parser Job
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Job"
( \Object
x ->
Maybe JobStatus
-> Maybe JobExecutionsRolloutConfig
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job
Job'
(Maybe JobStatus
-> Maybe JobExecutionsRolloutConfig
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe JobStatus)
-> Parser
(Maybe JobExecutionsRolloutConfig
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe JobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe JobExecutionsRolloutConfig
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe JobExecutionsRolloutConfig)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobExecutionsRolloutConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobExecutionsRolloutConfig")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobId")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdatedAt")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobArn")
Parser
(Maybe POSIX
-> Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe POSIX)
-> Parser
(Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
Parser
(Maybe AbortConfig
-> Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe AbortConfig)
-> Parser
(Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AbortConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"abortConfig")
Parser
(Maybe JobProcessDetails
-> Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe JobProcessDetails)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobProcessDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobProcessDetails")
Parser
(Maybe Text
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"namespaceId")
Parser
(Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe Text)
-> Parser
(Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"reasonCode")
Parser
(Maybe PresignedUrlConfig
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe PresignedUrlConfig)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PresignedUrlConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"presignedUrlConfig")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"forceCanceled")
Parser
(Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe Text)
-> Parser
(Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobTemplateArn")
Parser
(Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe (NonEmpty Text))
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"targets")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"completedAt")
Parser
(Maybe Text
-> Maybe Text
-> Maybe TargetSelection
-> Maybe TimeoutConfig
-> Job)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe TargetSelection -> Maybe TimeoutConfig -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"comment")
Parser
(Maybe Text -> Maybe TargetSelection -> Maybe TimeoutConfig -> Job)
-> Parser (Maybe Text)
-> Parser (Maybe TargetSelection -> Maybe TimeoutConfig -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
Parser (Maybe TargetSelection -> Maybe TimeoutConfig -> Job)
-> Parser (Maybe TargetSelection)
-> Parser (Maybe TimeoutConfig -> Job)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TargetSelection)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"targetSelection")
Parser (Maybe TimeoutConfig -> Job)
-> Parser (Maybe TimeoutConfig) -> Parser Job
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TimeoutConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timeoutConfig")
)
instance Prelude.Hashable Job
instance Prelude.NFData Job