{-# 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.RobOMaker.Types.DeploymentJob
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.RobOMaker.Types.DeploymentJob where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RobOMaker.Types.DeploymentApplicationConfig
import Amazonka.RobOMaker.Types.DeploymentConfig
import Amazonka.RobOMaker.Types.DeploymentJobErrorCode
import Amazonka.RobOMaker.Types.DeploymentStatus

-- | Information about a deployment job.
--
-- /See:/ 'newDeploymentJob' smart constructor.
data DeploymentJob = DeploymentJob'
  { -- | A short description of the reason why the deployment job failed.
    DeploymentJob -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The status of the deployment job.
    DeploymentJob -> Maybe DeploymentStatus
status :: Prelude.Maybe DeploymentStatus,
    -- | The deployment application configuration.
    DeploymentJob -> Maybe (NonEmpty DeploymentApplicationConfig)
deploymentApplicationConfigs :: Prelude.Maybe (Prelude.NonEmpty DeploymentApplicationConfig),
    -- | The Amazon Resource Name (ARN) of the deployment job.
    DeploymentJob -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the deployment job was
    -- created.
    DeploymentJob -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The deployment job failure code.
    DeploymentJob -> Maybe DeploymentJobErrorCode
failureCode :: Prelude.Maybe DeploymentJobErrorCode,
    -- | The deployment configuration.
    DeploymentJob -> Maybe DeploymentConfig
deploymentConfig :: Prelude.Maybe DeploymentConfig,
    -- | The Amazon Resource Name (ARN) of the fleet.
    DeploymentJob -> Maybe Text
fleet :: Prelude.Maybe Prelude.Text
  }
  deriving (DeploymentJob -> DeploymentJob -> Bool
(DeploymentJob -> DeploymentJob -> Bool)
-> (DeploymentJob -> DeploymentJob -> Bool) -> Eq DeploymentJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentJob -> DeploymentJob -> Bool
$c/= :: DeploymentJob -> DeploymentJob -> Bool
== :: DeploymentJob -> DeploymentJob -> Bool
$c== :: DeploymentJob -> DeploymentJob -> Bool
Prelude.Eq, ReadPrec [DeploymentJob]
ReadPrec DeploymentJob
Int -> ReadS DeploymentJob
ReadS [DeploymentJob]
(Int -> ReadS DeploymentJob)
-> ReadS [DeploymentJob]
-> ReadPrec DeploymentJob
-> ReadPrec [DeploymentJob]
-> Read DeploymentJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeploymentJob]
$creadListPrec :: ReadPrec [DeploymentJob]
readPrec :: ReadPrec DeploymentJob
$creadPrec :: ReadPrec DeploymentJob
readList :: ReadS [DeploymentJob]
$creadList :: ReadS [DeploymentJob]
readsPrec :: Int -> ReadS DeploymentJob
$creadsPrec :: Int -> ReadS DeploymentJob
Prelude.Read, Int -> DeploymentJob -> ShowS
[DeploymentJob] -> ShowS
DeploymentJob -> String
(Int -> DeploymentJob -> ShowS)
-> (DeploymentJob -> String)
-> ([DeploymentJob] -> ShowS)
-> Show DeploymentJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentJob] -> ShowS
$cshowList :: [DeploymentJob] -> ShowS
show :: DeploymentJob -> String
$cshow :: DeploymentJob -> String
showsPrec :: Int -> DeploymentJob -> ShowS
$cshowsPrec :: Int -> DeploymentJob -> ShowS
Prelude.Show, (forall x. DeploymentJob -> Rep DeploymentJob x)
-> (forall x. Rep DeploymentJob x -> DeploymentJob)
-> Generic DeploymentJob
forall x. Rep DeploymentJob x -> DeploymentJob
forall x. DeploymentJob -> Rep DeploymentJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeploymentJob x -> DeploymentJob
$cfrom :: forall x. DeploymentJob -> Rep DeploymentJob x
Prelude.Generic)

-- |
-- Create a value of 'DeploymentJob' 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:
--
-- 'failureReason', 'deploymentJob_failureReason' - A short description of the reason why the deployment job failed.
--
-- 'status', 'deploymentJob_status' - The status of the deployment job.
--
-- 'deploymentApplicationConfigs', 'deploymentJob_deploymentApplicationConfigs' - The deployment application configuration.
--
-- 'arn', 'deploymentJob_arn' - The Amazon Resource Name (ARN) of the deployment job.
--
-- 'createdAt', 'deploymentJob_createdAt' - The time, in milliseconds since the epoch, when the deployment job was
-- created.
--
-- 'failureCode', 'deploymentJob_failureCode' - The deployment job failure code.
--
-- 'deploymentConfig', 'deploymentJob_deploymentConfig' - The deployment configuration.
--
-- 'fleet', 'deploymentJob_fleet' - The Amazon Resource Name (ARN) of the fleet.
newDeploymentJob ::
  DeploymentJob
newDeploymentJob :: DeploymentJob
newDeploymentJob =
  DeploymentJob' :: Maybe Text
-> Maybe DeploymentStatus
-> Maybe (NonEmpty DeploymentApplicationConfig)
-> Maybe Text
-> Maybe POSIX
-> Maybe DeploymentJobErrorCode
-> Maybe DeploymentConfig
-> Maybe Text
-> DeploymentJob
DeploymentJob'
    { $sel:failureReason:DeploymentJob' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DeploymentJob' :: Maybe DeploymentStatus
status = Maybe DeploymentStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentApplicationConfigs:DeploymentJob' :: Maybe (NonEmpty DeploymentApplicationConfig)
deploymentApplicationConfigs = Maybe (NonEmpty DeploymentApplicationConfig)
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DeploymentJob' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:DeploymentJob' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:failureCode:DeploymentJob' :: Maybe DeploymentJobErrorCode
failureCode = Maybe DeploymentJobErrorCode
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentConfig:DeploymentJob' :: Maybe DeploymentConfig
deploymentConfig = Maybe DeploymentConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:fleet:DeploymentJob' :: Maybe Text
fleet = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A short description of the reason why the deployment job failed.
deploymentJob_failureReason :: Lens.Lens' DeploymentJob (Prelude.Maybe Prelude.Text)
deploymentJob_failureReason :: (Maybe Text -> f (Maybe Text)) -> DeploymentJob -> f DeploymentJob
deploymentJob_failureReason = (DeploymentJob -> Maybe Text)
-> (DeploymentJob -> Maybe Text -> DeploymentJob)
-> Lens DeploymentJob DeploymentJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentJob' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:DeploymentJob' :: DeploymentJob -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: DeploymentJob
s@DeploymentJob' {} Maybe Text
a -> DeploymentJob
s {$sel:failureReason:DeploymentJob' :: Maybe Text
failureReason = Maybe Text
a} :: DeploymentJob)

-- | The status of the deployment job.
deploymentJob_status :: Lens.Lens' DeploymentJob (Prelude.Maybe DeploymentStatus)
deploymentJob_status :: (Maybe DeploymentStatus -> f (Maybe DeploymentStatus))
-> DeploymentJob -> f DeploymentJob
deploymentJob_status = (DeploymentJob -> Maybe DeploymentStatus)
-> (DeploymentJob -> Maybe DeploymentStatus -> DeploymentJob)
-> Lens
     DeploymentJob
     DeploymentJob
     (Maybe DeploymentStatus)
     (Maybe DeploymentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentJob' {Maybe DeploymentStatus
status :: Maybe DeploymentStatus
$sel:status:DeploymentJob' :: DeploymentJob -> Maybe DeploymentStatus
status} -> Maybe DeploymentStatus
status) (\s :: DeploymentJob
s@DeploymentJob' {} Maybe DeploymentStatus
a -> DeploymentJob
s {$sel:status:DeploymentJob' :: Maybe DeploymentStatus
status = Maybe DeploymentStatus
a} :: DeploymentJob)

-- | The deployment application configuration.
deploymentJob_deploymentApplicationConfigs :: Lens.Lens' DeploymentJob (Prelude.Maybe (Prelude.NonEmpty DeploymentApplicationConfig))
deploymentJob_deploymentApplicationConfigs :: (Maybe (NonEmpty DeploymentApplicationConfig)
 -> f (Maybe (NonEmpty DeploymentApplicationConfig)))
-> DeploymentJob -> f DeploymentJob
deploymentJob_deploymentApplicationConfigs = (DeploymentJob -> Maybe (NonEmpty DeploymentApplicationConfig))
-> (DeploymentJob
    -> Maybe (NonEmpty DeploymentApplicationConfig) -> DeploymentJob)
-> Lens
     DeploymentJob
     DeploymentJob
     (Maybe (NonEmpty DeploymentApplicationConfig))
     (Maybe (NonEmpty DeploymentApplicationConfig))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentJob' {Maybe (NonEmpty DeploymentApplicationConfig)
deploymentApplicationConfigs :: Maybe (NonEmpty DeploymentApplicationConfig)
$sel:deploymentApplicationConfigs:DeploymentJob' :: DeploymentJob -> Maybe (NonEmpty DeploymentApplicationConfig)
deploymentApplicationConfigs} -> Maybe (NonEmpty DeploymentApplicationConfig)
deploymentApplicationConfigs) (\s :: DeploymentJob
s@DeploymentJob' {} Maybe (NonEmpty DeploymentApplicationConfig)
a -> DeploymentJob
s {$sel:deploymentApplicationConfigs:DeploymentJob' :: Maybe (NonEmpty DeploymentApplicationConfig)
deploymentApplicationConfigs = Maybe (NonEmpty DeploymentApplicationConfig)
a} :: DeploymentJob) ((Maybe (NonEmpty DeploymentApplicationConfig)
  -> f (Maybe (NonEmpty DeploymentApplicationConfig)))
 -> DeploymentJob -> f DeploymentJob)
-> ((Maybe (NonEmpty DeploymentApplicationConfig)
     -> f (Maybe (NonEmpty DeploymentApplicationConfig)))
    -> Maybe (NonEmpty DeploymentApplicationConfig)
    -> f (Maybe (NonEmpty DeploymentApplicationConfig)))
-> (Maybe (NonEmpty DeploymentApplicationConfig)
    -> f (Maybe (NonEmpty DeploymentApplicationConfig)))
-> DeploymentJob
-> f DeploymentJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty DeploymentApplicationConfig)
  (NonEmpty DeploymentApplicationConfig)
  (NonEmpty DeploymentApplicationConfig)
  (NonEmpty DeploymentApplicationConfig)
-> Iso
     (Maybe (NonEmpty DeploymentApplicationConfig))
     (Maybe (NonEmpty DeploymentApplicationConfig))
     (Maybe (NonEmpty DeploymentApplicationConfig))
     (Maybe (NonEmpty DeploymentApplicationConfig))
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 DeploymentApplicationConfig)
  (NonEmpty DeploymentApplicationConfig)
  (NonEmpty DeploymentApplicationConfig)
  (NonEmpty DeploymentApplicationConfig)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the deployment job.
deploymentJob_arn :: Lens.Lens' DeploymentJob (Prelude.Maybe Prelude.Text)
deploymentJob_arn :: (Maybe Text -> f (Maybe Text)) -> DeploymentJob -> f DeploymentJob
deploymentJob_arn = (DeploymentJob -> Maybe Text)
-> (DeploymentJob -> Maybe Text -> DeploymentJob)
-> Lens DeploymentJob DeploymentJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentJob' {Maybe Text
arn :: Maybe Text
$sel:arn:DeploymentJob' :: DeploymentJob -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DeploymentJob
s@DeploymentJob' {} Maybe Text
a -> DeploymentJob
s {$sel:arn:DeploymentJob' :: Maybe Text
arn = Maybe Text
a} :: DeploymentJob)

-- | The time, in milliseconds since the epoch, when the deployment job was
-- created.
deploymentJob_createdAt :: Lens.Lens' DeploymentJob (Prelude.Maybe Prelude.UTCTime)
deploymentJob_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeploymentJob -> f DeploymentJob
deploymentJob_createdAt = (DeploymentJob -> Maybe POSIX)
-> (DeploymentJob -> Maybe POSIX -> DeploymentJob)
-> Lens DeploymentJob DeploymentJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentJob' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DeploymentJob' :: DeploymentJob -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DeploymentJob
s@DeploymentJob' {} Maybe POSIX
a -> DeploymentJob
s {$sel:createdAt:DeploymentJob' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DeploymentJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeploymentJob -> f DeploymentJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeploymentJob
-> f DeploymentJob
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

-- | The deployment job failure code.
deploymentJob_failureCode :: Lens.Lens' DeploymentJob (Prelude.Maybe DeploymentJobErrorCode)
deploymentJob_failureCode :: (Maybe DeploymentJobErrorCode -> f (Maybe DeploymentJobErrorCode))
-> DeploymentJob -> f DeploymentJob
deploymentJob_failureCode = (DeploymentJob -> Maybe DeploymentJobErrorCode)
-> (DeploymentJob -> Maybe DeploymentJobErrorCode -> DeploymentJob)
-> Lens
     DeploymentJob
     DeploymentJob
     (Maybe DeploymentJobErrorCode)
     (Maybe DeploymentJobErrorCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentJob' {Maybe DeploymentJobErrorCode
failureCode :: Maybe DeploymentJobErrorCode
$sel:failureCode:DeploymentJob' :: DeploymentJob -> Maybe DeploymentJobErrorCode
failureCode} -> Maybe DeploymentJobErrorCode
failureCode) (\s :: DeploymentJob
s@DeploymentJob' {} Maybe DeploymentJobErrorCode
a -> DeploymentJob
s {$sel:failureCode:DeploymentJob' :: Maybe DeploymentJobErrorCode
failureCode = Maybe DeploymentJobErrorCode
a} :: DeploymentJob)

-- | The deployment configuration.
deploymentJob_deploymentConfig :: Lens.Lens' DeploymentJob (Prelude.Maybe DeploymentConfig)
deploymentJob_deploymentConfig :: (Maybe DeploymentConfig -> f (Maybe DeploymentConfig))
-> DeploymentJob -> f DeploymentJob
deploymentJob_deploymentConfig = (DeploymentJob -> Maybe DeploymentConfig)
-> (DeploymentJob -> Maybe DeploymentConfig -> DeploymentJob)
-> Lens
     DeploymentJob
     DeploymentJob
     (Maybe DeploymentConfig)
     (Maybe DeploymentConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentJob' {Maybe DeploymentConfig
deploymentConfig :: Maybe DeploymentConfig
$sel:deploymentConfig:DeploymentJob' :: DeploymentJob -> Maybe DeploymentConfig
deploymentConfig} -> Maybe DeploymentConfig
deploymentConfig) (\s :: DeploymentJob
s@DeploymentJob' {} Maybe DeploymentConfig
a -> DeploymentJob
s {$sel:deploymentConfig:DeploymentJob' :: Maybe DeploymentConfig
deploymentConfig = Maybe DeploymentConfig
a} :: DeploymentJob)

-- | The Amazon Resource Name (ARN) of the fleet.
deploymentJob_fleet :: Lens.Lens' DeploymentJob (Prelude.Maybe Prelude.Text)
deploymentJob_fleet :: (Maybe Text -> f (Maybe Text)) -> DeploymentJob -> f DeploymentJob
deploymentJob_fleet = (DeploymentJob -> Maybe Text)
-> (DeploymentJob -> Maybe Text -> DeploymentJob)
-> Lens DeploymentJob DeploymentJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentJob' {Maybe Text
fleet :: Maybe Text
$sel:fleet:DeploymentJob' :: DeploymentJob -> Maybe Text
fleet} -> Maybe Text
fleet) (\s :: DeploymentJob
s@DeploymentJob' {} Maybe Text
a -> DeploymentJob
s {$sel:fleet:DeploymentJob' :: Maybe Text
fleet = Maybe Text
a} :: DeploymentJob)

instance Core.FromJSON DeploymentJob where
  parseJSON :: Value -> Parser DeploymentJob
parseJSON =
    String
-> (Object -> Parser DeploymentJob)
-> Value
-> Parser DeploymentJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DeploymentJob"
      ( \Object
x ->
          Maybe Text
-> Maybe DeploymentStatus
-> Maybe (NonEmpty DeploymentApplicationConfig)
-> Maybe Text
-> Maybe POSIX
-> Maybe DeploymentJobErrorCode
-> Maybe DeploymentConfig
-> Maybe Text
-> DeploymentJob
DeploymentJob'
            (Maybe Text
 -> Maybe DeploymentStatus
 -> Maybe (NonEmpty DeploymentApplicationConfig)
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe DeploymentJobErrorCode
 -> Maybe DeploymentConfig
 -> Maybe Text
 -> DeploymentJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe DeploymentStatus
      -> Maybe (NonEmpty DeploymentApplicationConfig)
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe DeploymentJobErrorCode
      -> Maybe DeploymentConfig
      -> Maybe Text
      -> DeploymentJob)
forall (f :: * -> *) a b. Functor 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
"failureReason")
            Parser
  (Maybe DeploymentStatus
   -> Maybe (NonEmpty DeploymentApplicationConfig)
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe DeploymentJobErrorCode
   -> Maybe DeploymentConfig
   -> Maybe Text
   -> DeploymentJob)
-> Parser (Maybe DeploymentStatus)
-> Parser
     (Maybe (NonEmpty DeploymentApplicationConfig)
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe DeploymentJobErrorCode
      -> Maybe DeploymentConfig
      -> Maybe Text
      -> DeploymentJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeploymentStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe (NonEmpty DeploymentApplicationConfig)
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe DeploymentJobErrorCode
   -> Maybe DeploymentConfig
   -> Maybe Text
   -> DeploymentJob)
-> Parser (Maybe (NonEmpty DeploymentApplicationConfig))
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe DeploymentJobErrorCode
      -> Maybe DeploymentConfig
      -> Maybe Text
      -> DeploymentJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (NonEmpty DeploymentApplicationConfig))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deploymentApplicationConfigs")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe DeploymentJobErrorCode
   -> Maybe DeploymentConfig
   -> Maybe Text
   -> DeploymentJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe DeploymentJobErrorCode
      -> Maybe DeploymentConfig
      -> Maybe Text
      -> DeploymentJob)
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
"arn")
            Parser
  (Maybe POSIX
   -> Maybe DeploymentJobErrorCode
   -> Maybe DeploymentConfig
   -> Maybe Text
   -> DeploymentJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe DeploymentJobErrorCode
      -> Maybe DeploymentConfig -> Maybe Text -> DeploymentJob)
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 DeploymentJobErrorCode
   -> Maybe DeploymentConfig -> Maybe Text -> DeploymentJob)
-> Parser (Maybe DeploymentJobErrorCode)
-> Parser (Maybe DeploymentConfig -> Maybe Text -> DeploymentJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeploymentJobErrorCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"failureCode")
            Parser (Maybe DeploymentConfig -> Maybe Text -> DeploymentJob)
-> Parser (Maybe DeploymentConfig)
-> Parser (Maybe Text -> DeploymentJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DeploymentConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deploymentConfig")
            Parser (Maybe Text -> DeploymentJob)
-> Parser (Maybe Text) -> Parser DeploymentJob
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
"fleet")
      )

instance Prelude.Hashable DeploymentJob

instance Prelude.NFData DeploymentJob