{-# 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.GreengrassV2.Types.EffectiveDeployment
-- 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.GreengrassV2.Types.EffectiveDeployment where

import qualified Amazonka.Core as Core
import Amazonka.GreengrassV2.Types.EffectiveDeploymentExecutionStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains information about a deployment job that IoT Greengrass sends to
-- a Greengrass core device.
--
-- /See:/ 'newEffectiveDeployment' smart constructor.
data EffectiveDeployment = EffectiveDeployment'
  { -- | The ID of the IoT job that applies the deployment to target devices.
    EffectiveDeployment -> Maybe Text
iotJobId :: Prelude.Maybe Prelude.Text,
    -- | The
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
    -- of the IoT job that applies the deployment to target devices.
    EffectiveDeployment -> Maybe Text
iotJobArn :: Prelude.Maybe Prelude.Text,
    -- | The reason code for the update, if the job was updated.
    EffectiveDeployment -> Maybe Text
reason :: Prelude.Maybe Prelude.Text,
    -- | The description of the deployment job.
    EffectiveDeployment -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The ID of the deployment.
    EffectiveDeployment -> Text
deploymentId :: Prelude.Text,
    -- | The name of the deployment.
    EffectiveDeployment -> Text
deploymentName :: Prelude.Text,
    -- | The
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
    -- of the target IoT thing or thing group.
    EffectiveDeployment -> Text
targetArn :: Prelude.Text,
    -- | The status of the deployment job on the Greengrass core device.
    EffectiveDeployment -> EffectiveDeploymentExecutionStatus
coreDeviceExecutionStatus :: EffectiveDeploymentExecutionStatus,
    -- | The time at which the deployment was created, expressed in ISO 8601
    -- format.
    EffectiveDeployment -> POSIX
creationTimestamp :: Core.POSIX,
    -- | The time at which the deployment job was last modified, expressed in ISO
    -- 8601 format.
    EffectiveDeployment -> POSIX
modifiedTimestamp :: Core.POSIX
  }
  deriving (EffectiveDeployment -> EffectiveDeployment -> Bool
(EffectiveDeployment -> EffectiveDeployment -> Bool)
-> (EffectiveDeployment -> EffectiveDeployment -> Bool)
-> Eq EffectiveDeployment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EffectiveDeployment -> EffectiveDeployment -> Bool
$c/= :: EffectiveDeployment -> EffectiveDeployment -> Bool
== :: EffectiveDeployment -> EffectiveDeployment -> Bool
$c== :: EffectiveDeployment -> EffectiveDeployment -> Bool
Prelude.Eq, ReadPrec [EffectiveDeployment]
ReadPrec EffectiveDeployment
Int -> ReadS EffectiveDeployment
ReadS [EffectiveDeployment]
(Int -> ReadS EffectiveDeployment)
-> ReadS [EffectiveDeployment]
-> ReadPrec EffectiveDeployment
-> ReadPrec [EffectiveDeployment]
-> Read EffectiveDeployment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EffectiveDeployment]
$creadListPrec :: ReadPrec [EffectiveDeployment]
readPrec :: ReadPrec EffectiveDeployment
$creadPrec :: ReadPrec EffectiveDeployment
readList :: ReadS [EffectiveDeployment]
$creadList :: ReadS [EffectiveDeployment]
readsPrec :: Int -> ReadS EffectiveDeployment
$creadsPrec :: Int -> ReadS EffectiveDeployment
Prelude.Read, Int -> EffectiveDeployment -> ShowS
[EffectiveDeployment] -> ShowS
EffectiveDeployment -> String
(Int -> EffectiveDeployment -> ShowS)
-> (EffectiveDeployment -> String)
-> ([EffectiveDeployment] -> ShowS)
-> Show EffectiveDeployment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EffectiveDeployment] -> ShowS
$cshowList :: [EffectiveDeployment] -> ShowS
show :: EffectiveDeployment -> String
$cshow :: EffectiveDeployment -> String
showsPrec :: Int -> EffectiveDeployment -> ShowS
$cshowsPrec :: Int -> EffectiveDeployment -> ShowS
Prelude.Show, (forall x. EffectiveDeployment -> Rep EffectiveDeployment x)
-> (forall x. Rep EffectiveDeployment x -> EffectiveDeployment)
-> Generic EffectiveDeployment
forall x. Rep EffectiveDeployment x -> EffectiveDeployment
forall x. EffectiveDeployment -> Rep EffectiveDeployment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EffectiveDeployment x -> EffectiveDeployment
$cfrom :: forall x. EffectiveDeployment -> Rep EffectiveDeployment x
Prelude.Generic)

-- |
-- Create a value of 'EffectiveDeployment' 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:
--
-- 'iotJobId', 'effectiveDeployment_iotJobId' - The ID of the IoT job that applies the deployment to target devices.
--
-- 'iotJobArn', 'effectiveDeployment_iotJobArn' - The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the IoT job that applies the deployment to target devices.
--
-- 'reason', 'effectiveDeployment_reason' - The reason code for the update, if the job was updated.
--
-- 'description', 'effectiveDeployment_description' - The description of the deployment job.
--
-- 'deploymentId', 'effectiveDeployment_deploymentId' - The ID of the deployment.
--
-- 'deploymentName', 'effectiveDeployment_deploymentName' - The name of the deployment.
--
-- 'targetArn', 'effectiveDeployment_targetArn' - The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the target IoT thing or thing group.
--
-- 'coreDeviceExecutionStatus', 'effectiveDeployment_coreDeviceExecutionStatus' - The status of the deployment job on the Greengrass core device.
--
-- 'creationTimestamp', 'effectiveDeployment_creationTimestamp' - The time at which the deployment was created, expressed in ISO 8601
-- format.
--
-- 'modifiedTimestamp', 'effectiveDeployment_modifiedTimestamp' - The time at which the deployment job was last modified, expressed in ISO
-- 8601 format.
newEffectiveDeployment ::
  -- | 'deploymentId'
  Prelude.Text ->
  -- | 'deploymentName'
  Prelude.Text ->
  -- | 'targetArn'
  Prelude.Text ->
  -- | 'coreDeviceExecutionStatus'
  EffectiveDeploymentExecutionStatus ->
  -- | 'creationTimestamp'
  Prelude.UTCTime ->
  -- | 'modifiedTimestamp'
  Prelude.UTCTime ->
  EffectiveDeployment
newEffectiveDeployment :: Text
-> Text
-> Text
-> EffectiveDeploymentExecutionStatus
-> UTCTime
-> UTCTime
-> EffectiveDeployment
newEffectiveDeployment
  Text
pDeploymentId_
  Text
pDeploymentName_
  Text
pTargetArn_
  EffectiveDeploymentExecutionStatus
pCoreDeviceExecutionStatus_
  UTCTime
pCreationTimestamp_
  UTCTime
pModifiedTimestamp_ =
    EffectiveDeployment' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> EffectiveDeploymentExecutionStatus
-> POSIX
-> POSIX
-> EffectiveDeployment
EffectiveDeployment'
      { $sel:iotJobId:EffectiveDeployment' :: Maybe Text
iotJobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:iotJobArn:EffectiveDeployment' :: Maybe Text
iotJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:reason:EffectiveDeployment' :: Maybe Text
reason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:description:EffectiveDeployment' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:deploymentId:EffectiveDeployment' :: Text
deploymentId = Text
pDeploymentId_,
        $sel:deploymentName:EffectiveDeployment' :: Text
deploymentName = Text
pDeploymentName_,
        $sel:targetArn:EffectiveDeployment' :: Text
targetArn = Text
pTargetArn_,
        $sel:coreDeviceExecutionStatus:EffectiveDeployment' :: EffectiveDeploymentExecutionStatus
coreDeviceExecutionStatus =
          EffectiveDeploymentExecutionStatus
pCoreDeviceExecutionStatus_,
        $sel:creationTimestamp:EffectiveDeployment' :: POSIX
creationTimestamp =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTimestamp_,
        $sel:modifiedTimestamp:EffectiveDeployment' :: POSIX
modifiedTimestamp =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pModifiedTimestamp_
      }

-- | The ID of the IoT job that applies the deployment to target devices.
effectiveDeployment_iotJobId :: Lens.Lens' EffectiveDeployment (Prelude.Maybe Prelude.Text)
effectiveDeployment_iotJobId :: (Maybe Text -> f (Maybe Text))
-> EffectiveDeployment -> f EffectiveDeployment
effectiveDeployment_iotJobId = (EffectiveDeployment -> Maybe Text)
-> (EffectiveDeployment -> Maybe Text -> EffectiveDeployment)
-> Lens
     EffectiveDeployment EffectiveDeployment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EffectiveDeployment' {Maybe Text
iotJobId :: Maybe Text
$sel:iotJobId:EffectiveDeployment' :: EffectiveDeployment -> Maybe Text
iotJobId} -> Maybe Text
iotJobId) (\s :: EffectiveDeployment
s@EffectiveDeployment' {} Maybe Text
a -> EffectiveDeployment
s {$sel:iotJobId:EffectiveDeployment' :: Maybe Text
iotJobId = Maybe Text
a} :: EffectiveDeployment)

-- | The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the IoT job that applies the deployment to target devices.
effectiveDeployment_iotJobArn :: Lens.Lens' EffectiveDeployment (Prelude.Maybe Prelude.Text)
effectiveDeployment_iotJobArn :: (Maybe Text -> f (Maybe Text))
-> EffectiveDeployment -> f EffectiveDeployment
effectiveDeployment_iotJobArn = (EffectiveDeployment -> Maybe Text)
-> (EffectiveDeployment -> Maybe Text -> EffectiveDeployment)
-> Lens
     EffectiveDeployment EffectiveDeployment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EffectiveDeployment' {Maybe Text
iotJobArn :: Maybe Text
$sel:iotJobArn:EffectiveDeployment' :: EffectiveDeployment -> Maybe Text
iotJobArn} -> Maybe Text
iotJobArn) (\s :: EffectiveDeployment
s@EffectiveDeployment' {} Maybe Text
a -> EffectiveDeployment
s {$sel:iotJobArn:EffectiveDeployment' :: Maybe Text
iotJobArn = Maybe Text
a} :: EffectiveDeployment)

-- | The reason code for the update, if the job was updated.
effectiveDeployment_reason :: Lens.Lens' EffectiveDeployment (Prelude.Maybe Prelude.Text)
effectiveDeployment_reason :: (Maybe Text -> f (Maybe Text))
-> EffectiveDeployment -> f EffectiveDeployment
effectiveDeployment_reason = (EffectiveDeployment -> Maybe Text)
-> (EffectiveDeployment -> Maybe Text -> EffectiveDeployment)
-> Lens
     EffectiveDeployment EffectiveDeployment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EffectiveDeployment' {Maybe Text
reason :: Maybe Text
$sel:reason:EffectiveDeployment' :: EffectiveDeployment -> Maybe Text
reason} -> Maybe Text
reason) (\s :: EffectiveDeployment
s@EffectiveDeployment' {} Maybe Text
a -> EffectiveDeployment
s {$sel:reason:EffectiveDeployment' :: Maybe Text
reason = Maybe Text
a} :: EffectiveDeployment)

-- | The description of the deployment job.
effectiveDeployment_description :: Lens.Lens' EffectiveDeployment (Prelude.Maybe Prelude.Text)
effectiveDeployment_description :: (Maybe Text -> f (Maybe Text))
-> EffectiveDeployment -> f EffectiveDeployment
effectiveDeployment_description = (EffectiveDeployment -> Maybe Text)
-> (EffectiveDeployment -> Maybe Text -> EffectiveDeployment)
-> Lens
     EffectiveDeployment EffectiveDeployment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EffectiveDeployment' {Maybe Text
description :: Maybe Text
$sel:description:EffectiveDeployment' :: EffectiveDeployment -> Maybe Text
description} -> Maybe Text
description) (\s :: EffectiveDeployment
s@EffectiveDeployment' {} Maybe Text
a -> EffectiveDeployment
s {$sel:description:EffectiveDeployment' :: Maybe Text
description = Maybe Text
a} :: EffectiveDeployment)

-- | The ID of the deployment.
effectiveDeployment_deploymentId :: Lens.Lens' EffectiveDeployment Prelude.Text
effectiveDeployment_deploymentId :: (Text -> f Text) -> EffectiveDeployment -> f EffectiveDeployment
effectiveDeployment_deploymentId = (EffectiveDeployment -> Text)
-> (EffectiveDeployment -> Text -> EffectiveDeployment)
-> Lens EffectiveDeployment EffectiveDeployment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EffectiveDeployment' {Text
deploymentId :: Text
$sel:deploymentId:EffectiveDeployment' :: EffectiveDeployment -> Text
deploymentId} -> Text
deploymentId) (\s :: EffectiveDeployment
s@EffectiveDeployment' {} Text
a -> EffectiveDeployment
s {$sel:deploymentId:EffectiveDeployment' :: Text
deploymentId = Text
a} :: EffectiveDeployment)

-- | The name of the deployment.
effectiveDeployment_deploymentName :: Lens.Lens' EffectiveDeployment Prelude.Text
effectiveDeployment_deploymentName :: (Text -> f Text) -> EffectiveDeployment -> f EffectiveDeployment
effectiveDeployment_deploymentName = (EffectiveDeployment -> Text)
-> (EffectiveDeployment -> Text -> EffectiveDeployment)
-> Lens EffectiveDeployment EffectiveDeployment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EffectiveDeployment' {Text
deploymentName :: Text
$sel:deploymentName:EffectiveDeployment' :: EffectiveDeployment -> Text
deploymentName} -> Text
deploymentName) (\s :: EffectiveDeployment
s@EffectiveDeployment' {} Text
a -> EffectiveDeployment
s {$sel:deploymentName:EffectiveDeployment' :: Text
deploymentName = Text
a} :: EffectiveDeployment)

-- | The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the target IoT thing or thing group.
effectiveDeployment_targetArn :: Lens.Lens' EffectiveDeployment Prelude.Text
effectiveDeployment_targetArn :: (Text -> f Text) -> EffectiveDeployment -> f EffectiveDeployment
effectiveDeployment_targetArn = (EffectiveDeployment -> Text)
-> (EffectiveDeployment -> Text -> EffectiveDeployment)
-> Lens EffectiveDeployment EffectiveDeployment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EffectiveDeployment' {Text
targetArn :: Text
$sel:targetArn:EffectiveDeployment' :: EffectiveDeployment -> Text
targetArn} -> Text
targetArn) (\s :: EffectiveDeployment
s@EffectiveDeployment' {} Text
a -> EffectiveDeployment
s {$sel:targetArn:EffectiveDeployment' :: Text
targetArn = Text
a} :: EffectiveDeployment)

-- | The status of the deployment job on the Greengrass core device.
effectiveDeployment_coreDeviceExecutionStatus :: Lens.Lens' EffectiveDeployment EffectiveDeploymentExecutionStatus
effectiveDeployment_coreDeviceExecutionStatus :: (EffectiveDeploymentExecutionStatus
 -> f EffectiveDeploymentExecutionStatus)
-> EffectiveDeployment -> f EffectiveDeployment
effectiveDeployment_coreDeviceExecutionStatus = (EffectiveDeployment -> EffectiveDeploymentExecutionStatus)
-> (EffectiveDeployment
    -> EffectiveDeploymentExecutionStatus -> EffectiveDeployment)
-> Lens
     EffectiveDeployment
     EffectiveDeployment
     EffectiveDeploymentExecutionStatus
     EffectiveDeploymentExecutionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EffectiveDeployment' {EffectiveDeploymentExecutionStatus
coreDeviceExecutionStatus :: EffectiveDeploymentExecutionStatus
$sel:coreDeviceExecutionStatus:EffectiveDeployment' :: EffectiveDeployment -> EffectiveDeploymentExecutionStatus
coreDeviceExecutionStatus} -> EffectiveDeploymentExecutionStatus
coreDeviceExecutionStatus) (\s :: EffectiveDeployment
s@EffectiveDeployment' {} EffectiveDeploymentExecutionStatus
a -> EffectiveDeployment
s {$sel:coreDeviceExecutionStatus:EffectiveDeployment' :: EffectiveDeploymentExecutionStatus
coreDeviceExecutionStatus = EffectiveDeploymentExecutionStatus
a} :: EffectiveDeployment)

-- | The time at which the deployment was created, expressed in ISO 8601
-- format.
effectiveDeployment_creationTimestamp :: Lens.Lens' EffectiveDeployment Prelude.UTCTime
effectiveDeployment_creationTimestamp :: (UTCTime -> f UTCTime)
-> EffectiveDeployment -> f EffectiveDeployment
effectiveDeployment_creationTimestamp = (EffectiveDeployment -> POSIX)
-> (EffectiveDeployment -> POSIX -> EffectiveDeployment)
-> Lens EffectiveDeployment EffectiveDeployment POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EffectiveDeployment' {POSIX
creationTimestamp :: POSIX
$sel:creationTimestamp:EffectiveDeployment' :: EffectiveDeployment -> POSIX
creationTimestamp} -> POSIX
creationTimestamp) (\s :: EffectiveDeployment
s@EffectiveDeployment' {} POSIX
a -> EffectiveDeployment
s {$sel:creationTimestamp:EffectiveDeployment' :: POSIX
creationTimestamp = POSIX
a} :: EffectiveDeployment) ((POSIX -> f POSIX)
 -> EffectiveDeployment -> f EffectiveDeployment)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EffectiveDeployment
-> f EffectiveDeployment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The time at which the deployment job was last modified, expressed in ISO
-- 8601 format.
effectiveDeployment_modifiedTimestamp :: Lens.Lens' EffectiveDeployment Prelude.UTCTime
effectiveDeployment_modifiedTimestamp :: (UTCTime -> f UTCTime)
-> EffectiveDeployment -> f EffectiveDeployment
effectiveDeployment_modifiedTimestamp = (EffectiveDeployment -> POSIX)
-> (EffectiveDeployment -> POSIX -> EffectiveDeployment)
-> Lens EffectiveDeployment EffectiveDeployment POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EffectiveDeployment' {POSIX
modifiedTimestamp :: POSIX
$sel:modifiedTimestamp:EffectiveDeployment' :: EffectiveDeployment -> POSIX
modifiedTimestamp} -> POSIX
modifiedTimestamp) (\s :: EffectiveDeployment
s@EffectiveDeployment' {} POSIX
a -> EffectiveDeployment
s {$sel:modifiedTimestamp:EffectiveDeployment' :: POSIX
modifiedTimestamp = POSIX
a} :: EffectiveDeployment) ((POSIX -> f POSIX)
 -> EffectiveDeployment -> f EffectiveDeployment)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> EffectiveDeployment
-> f EffectiveDeployment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON EffectiveDeployment where
  parseJSON :: Value -> Parser EffectiveDeployment
parseJSON =
    String
-> (Object -> Parser EffectiveDeployment)
-> Value
-> Parser EffectiveDeployment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EffectiveDeployment"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> EffectiveDeploymentExecutionStatus
-> POSIX
-> POSIX
-> EffectiveDeployment
EffectiveDeployment'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> Text
 -> EffectiveDeploymentExecutionStatus
 -> POSIX
 -> POSIX
 -> EffectiveDeployment)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> EffectiveDeploymentExecutionStatus
      -> POSIX
      -> POSIX
      -> EffectiveDeployment)
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
"iotJobId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> EffectiveDeploymentExecutionStatus
   -> POSIX
   -> POSIX
   -> EffectiveDeployment)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> EffectiveDeploymentExecutionStatus
      -> POSIX
      -> POSIX
      -> EffectiveDeployment)
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
"iotJobArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> EffectiveDeploymentExecutionStatus
   -> POSIX
   -> POSIX
   -> EffectiveDeployment)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Text
      -> Text
      -> Text
      -> EffectiveDeploymentExecutionStatus
      -> POSIX
      -> POSIX
      -> EffectiveDeployment)
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
"reason")
            Parser
  (Maybe Text
   -> Text
   -> Text
   -> Text
   -> EffectiveDeploymentExecutionStatus
   -> POSIX
   -> POSIX
   -> EffectiveDeployment)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Text
      -> Text
      -> EffectiveDeploymentExecutionStatus
      -> POSIX
      -> POSIX
      -> EffectiveDeployment)
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
  (Text
   -> Text
   -> Text
   -> EffectiveDeploymentExecutionStatus
   -> POSIX
   -> POSIX
   -> EffectiveDeployment)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> EffectiveDeploymentExecutionStatus
      -> POSIX
      -> POSIX
      -> EffectiveDeployment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"deploymentId")
            Parser
  (Text
   -> Text
   -> EffectiveDeploymentExecutionStatus
   -> POSIX
   -> POSIX
   -> EffectiveDeployment)
-> Parser Text
-> Parser
     (Text
      -> EffectiveDeploymentExecutionStatus
      -> POSIX
      -> POSIX
      -> EffectiveDeployment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"deploymentName")
            Parser
  (Text
   -> EffectiveDeploymentExecutionStatus
   -> POSIX
   -> POSIX
   -> EffectiveDeployment)
-> Parser Text
-> Parser
     (EffectiveDeploymentExecutionStatus
      -> POSIX -> POSIX -> EffectiveDeployment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"targetArn")
            Parser
  (EffectiveDeploymentExecutionStatus
   -> POSIX -> POSIX -> EffectiveDeployment)
-> Parser EffectiveDeploymentExecutionStatus
-> Parser (POSIX -> POSIX -> EffectiveDeployment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser EffectiveDeploymentExecutionStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"coreDeviceExecutionStatus")
            Parser (POSIX -> POSIX -> EffectiveDeployment)
-> Parser POSIX -> Parser (POSIX -> EffectiveDeployment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"creationTimestamp")
            Parser (POSIX -> EffectiveDeployment)
-> Parser POSIX -> Parser EffectiveDeployment
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"modifiedTimestamp")
      )

instance Prelude.Hashable EffectiveDeployment

instance Prelude.NFData EffectiveDeployment