{-# 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.SSM.Types.AssociationExecutionTarget
-- 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.SSM.Types.AssociationExecutionTarget where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.OutputSource

-- | Includes information about the specified association execution.
--
-- /See:/ 'newAssociationExecutionTarget' smart constructor.
data AssociationExecutionTarget = AssociationExecutionTarget'
  { -- | The association ID.
    AssociationExecutionTarget -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
    -- | Detailed information about the execution status.
    AssociationExecutionTarget -> Maybe Text
detailedStatus :: Prelude.Maybe Prelude.Text,
    -- | The association execution status.
    AssociationExecutionTarget -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The execution ID.
    AssociationExecutionTarget -> Maybe Text
executionId :: Prelude.Maybe Prelude.Text,
    -- | The resource ID, for example, the instance ID where the association ran.
    AssociationExecutionTarget -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | The resource type, for example, instance.
    AssociationExecutionTarget -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
    -- | The location where the association details are saved.
    AssociationExecutionTarget -> Maybe OutputSource
outputSource :: Prelude.Maybe OutputSource,
    -- | The date of the last execution.
    AssociationExecutionTarget -> Maybe POSIX
lastExecutionDate :: Prelude.Maybe Core.POSIX,
    -- | The association version.
    AssociationExecutionTarget -> Maybe Text
associationVersion :: Prelude.Maybe Prelude.Text
  }
  deriving (AssociationExecutionTarget -> AssociationExecutionTarget -> Bool
(AssociationExecutionTarget -> AssociationExecutionTarget -> Bool)
-> (AssociationExecutionTarget
    -> AssociationExecutionTarget -> Bool)
-> Eq AssociationExecutionTarget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociationExecutionTarget -> AssociationExecutionTarget -> Bool
$c/= :: AssociationExecutionTarget -> AssociationExecutionTarget -> Bool
== :: AssociationExecutionTarget -> AssociationExecutionTarget -> Bool
$c== :: AssociationExecutionTarget -> AssociationExecutionTarget -> Bool
Prelude.Eq, ReadPrec [AssociationExecutionTarget]
ReadPrec AssociationExecutionTarget
Int -> ReadS AssociationExecutionTarget
ReadS [AssociationExecutionTarget]
(Int -> ReadS AssociationExecutionTarget)
-> ReadS [AssociationExecutionTarget]
-> ReadPrec AssociationExecutionTarget
-> ReadPrec [AssociationExecutionTarget]
-> Read AssociationExecutionTarget
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociationExecutionTarget]
$creadListPrec :: ReadPrec [AssociationExecutionTarget]
readPrec :: ReadPrec AssociationExecutionTarget
$creadPrec :: ReadPrec AssociationExecutionTarget
readList :: ReadS [AssociationExecutionTarget]
$creadList :: ReadS [AssociationExecutionTarget]
readsPrec :: Int -> ReadS AssociationExecutionTarget
$creadsPrec :: Int -> ReadS AssociationExecutionTarget
Prelude.Read, Int -> AssociationExecutionTarget -> ShowS
[AssociationExecutionTarget] -> ShowS
AssociationExecutionTarget -> String
(Int -> AssociationExecutionTarget -> ShowS)
-> (AssociationExecutionTarget -> String)
-> ([AssociationExecutionTarget] -> ShowS)
-> Show AssociationExecutionTarget
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociationExecutionTarget] -> ShowS
$cshowList :: [AssociationExecutionTarget] -> ShowS
show :: AssociationExecutionTarget -> String
$cshow :: AssociationExecutionTarget -> String
showsPrec :: Int -> AssociationExecutionTarget -> ShowS
$cshowsPrec :: Int -> AssociationExecutionTarget -> ShowS
Prelude.Show, (forall x.
 AssociationExecutionTarget -> Rep AssociationExecutionTarget x)
-> (forall x.
    Rep AssociationExecutionTarget x -> AssociationExecutionTarget)
-> Generic AssociationExecutionTarget
forall x.
Rep AssociationExecutionTarget x -> AssociationExecutionTarget
forall x.
AssociationExecutionTarget -> Rep AssociationExecutionTarget x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociationExecutionTarget x -> AssociationExecutionTarget
$cfrom :: forall x.
AssociationExecutionTarget -> Rep AssociationExecutionTarget x
Prelude.Generic)

-- |
-- Create a value of 'AssociationExecutionTarget' 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:
--
-- 'associationId', 'associationExecutionTarget_associationId' - The association ID.
--
-- 'detailedStatus', 'associationExecutionTarget_detailedStatus' - Detailed information about the execution status.
--
-- 'status', 'associationExecutionTarget_status' - The association execution status.
--
-- 'executionId', 'associationExecutionTarget_executionId' - The execution ID.
--
-- 'resourceId', 'associationExecutionTarget_resourceId' - The resource ID, for example, the instance ID where the association ran.
--
-- 'resourceType', 'associationExecutionTarget_resourceType' - The resource type, for example, instance.
--
-- 'outputSource', 'associationExecutionTarget_outputSource' - The location where the association details are saved.
--
-- 'lastExecutionDate', 'associationExecutionTarget_lastExecutionDate' - The date of the last execution.
--
-- 'associationVersion', 'associationExecutionTarget_associationVersion' - The association version.
newAssociationExecutionTarget ::
  AssociationExecutionTarget
newAssociationExecutionTarget :: AssociationExecutionTarget
newAssociationExecutionTarget =
  AssociationExecutionTarget' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OutputSource
-> Maybe POSIX
-> Maybe Text
-> AssociationExecutionTarget
AssociationExecutionTarget'
    { $sel:associationId:AssociationExecutionTarget' :: Maybe Text
associationId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:detailedStatus:AssociationExecutionTarget' :: Maybe Text
detailedStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:AssociationExecutionTarget' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:executionId:AssociationExecutionTarget' :: Maybe Text
executionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceId:AssociationExecutionTarget' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:AssociationExecutionTarget' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputSource:AssociationExecutionTarget' :: Maybe OutputSource
outputSource = Maybe OutputSource
forall a. Maybe a
Prelude.Nothing,
      $sel:lastExecutionDate:AssociationExecutionTarget' :: Maybe POSIX
lastExecutionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:associationVersion:AssociationExecutionTarget' :: Maybe Text
associationVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The association ID.
associationExecutionTarget_associationId :: Lens.Lens' AssociationExecutionTarget (Prelude.Maybe Prelude.Text)
associationExecutionTarget_associationId :: (Maybe Text -> f (Maybe Text))
-> AssociationExecutionTarget -> f AssociationExecutionTarget
associationExecutionTarget_associationId = (AssociationExecutionTarget -> Maybe Text)
-> (AssociationExecutionTarget
    -> Maybe Text -> AssociationExecutionTarget)
-> Lens
     AssociationExecutionTarget
     AssociationExecutionTarget
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationExecutionTarget' {Maybe Text
associationId :: Maybe Text
$sel:associationId:AssociationExecutionTarget' :: AssociationExecutionTarget -> Maybe Text
associationId} -> Maybe Text
associationId) (\s :: AssociationExecutionTarget
s@AssociationExecutionTarget' {} Maybe Text
a -> AssociationExecutionTarget
s {$sel:associationId:AssociationExecutionTarget' :: Maybe Text
associationId = Maybe Text
a} :: AssociationExecutionTarget)

-- | Detailed information about the execution status.
associationExecutionTarget_detailedStatus :: Lens.Lens' AssociationExecutionTarget (Prelude.Maybe Prelude.Text)
associationExecutionTarget_detailedStatus :: (Maybe Text -> f (Maybe Text))
-> AssociationExecutionTarget -> f AssociationExecutionTarget
associationExecutionTarget_detailedStatus = (AssociationExecutionTarget -> Maybe Text)
-> (AssociationExecutionTarget
    -> Maybe Text -> AssociationExecutionTarget)
-> Lens
     AssociationExecutionTarget
     AssociationExecutionTarget
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationExecutionTarget' {Maybe Text
detailedStatus :: Maybe Text
$sel:detailedStatus:AssociationExecutionTarget' :: AssociationExecutionTarget -> Maybe Text
detailedStatus} -> Maybe Text
detailedStatus) (\s :: AssociationExecutionTarget
s@AssociationExecutionTarget' {} Maybe Text
a -> AssociationExecutionTarget
s {$sel:detailedStatus:AssociationExecutionTarget' :: Maybe Text
detailedStatus = Maybe Text
a} :: AssociationExecutionTarget)

-- | The association execution status.
associationExecutionTarget_status :: Lens.Lens' AssociationExecutionTarget (Prelude.Maybe Prelude.Text)
associationExecutionTarget_status :: (Maybe Text -> f (Maybe Text))
-> AssociationExecutionTarget -> f AssociationExecutionTarget
associationExecutionTarget_status = (AssociationExecutionTarget -> Maybe Text)
-> (AssociationExecutionTarget
    -> Maybe Text -> AssociationExecutionTarget)
-> Lens
     AssociationExecutionTarget
     AssociationExecutionTarget
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationExecutionTarget' {Maybe Text
status :: Maybe Text
$sel:status:AssociationExecutionTarget' :: AssociationExecutionTarget -> Maybe Text
status} -> Maybe Text
status) (\s :: AssociationExecutionTarget
s@AssociationExecutionTarget' {} Maybe Text
a -> AssociationExecutionTarget
s {$sel:status:AssociationExecutionTarget' :: Maybe Text
status = Maybe Text
a} :: AssociationExecutionTarget)

-- | The execution ID.
associationExecutionTarget_executionId :: Lens.Lens' AssociationExecutionTarget (Prelude.Maybe Prelude.Text)
associationExecutionTarget_executionId :: (Maybe Text -> f (Maybe Text))
-> AssociationExecutionTarget -> f AssociationExecutionTarget
associationExecutionTarget_executionId = (AssociationExecutionTarget -> Maybe Text)
-> (AssociationExecutionTarget
    -> Maybe Text -> AssociationExecutionTarget)
-> Lens
     AssociationExecutionTarget
     AssociationExecutionTarget
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationExecutionTarget' {Maybe Text
executionId :: Maybe Text
$sel:executionId:AssociationExecutionTarget' :: AssociationExecutionTarget -> Maybe Text
executionId} -> Maybe Text
executionId) (\s :: AssociationExecutionTarget
s@AssociationExecutionTarget' {} Maybe Text
a -> AssociationExecutionTarget
s {$sel:executionId:AssociationExecutionTarget' :: Maybe Text
executionId = Maybe Text
a} :: AssociationExecutionTarget)

-- | The resource ID, for example, the instance ID where the association ran.
associationExecutionTarget_resourceId :: Lens.Lens' AssociationExecutionTarget (Prelude.Maybe Prelude.Text)
associationExecutionTarget_resourceId :: (Maybe Text -> f (Maybe Text))
-> AssociationExecutionTarget -> f AssociationExecutionTarget
associationExecutionTarget_resourceId = (AssociationExecutionTarget -> Maybe Text)
-> (AssociationExecutionTarget
    -> Maybe Text -> AssociationExecutionTarget)
-> Lens
     AssociationExecutionTarget
     AssociationExecutionTarget
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationExecutionTarget' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:AssociationExecutionTarget' :: AssociationExecutionTarget -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: AssociationExecutionTarget
s@AssociationExecutionTarget' {} Maybe Text
a -> AssociationExecutionTarget
s {$sel:resourceId:AssociationExecutionTarget' :: Maybe Text
resourceId = Maybe Text
a} :: AssociationExecutionTarget)

-- | The resource type, for example, instance.
associationExecutionTarget_resourceType :: Lens.Lens' AssociationExecutionTarget (Prelude.Maybe Prelude.Text)
associationExecutionTarget_resourceType :: (Maybe Text -> f (Maybe Text))
-> AssociationExecutionTarget -> f AssociationExecutionTarget
associationExecutionTarget_resourceType = (AssociationExecutionTarget -> Maybe Text)
-> (AssociationExecutionTarget
    -> Maybe Text -> AssociationExecutionTarget)
-> Lens
     AssociationExecutionTarget
     AssociationExecutionTarget
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationExecutionTarget' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:AssociationExecutionTarget' :: AssociationExecutionTarget -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: AssociationExecutionTarget
s@AssociationExecutionTarget' {} Maybe Text
a -> AssociationExecutionTarget
s {$sel:resourceType:AssociationExecutionTarget' :: Maybe Text
resourceType = Maybe Text
a} :: AssociationExecutionTarget)

-- | The location where the association details are saved.
associationExecutionTarget_outputSource :: Lens.Lens' AssociationExecutionTarget (Prelude.Maybe OutputSource)
associationExecutionTarget_outputSource :: (Maybe OutputSource -> f (Maybe OutputSource))
-> AssociationExecutionTarget -> f AssociationExecutionTarget
associationExecutionTarget_outputSource = (AssociationExecutionTarget -> Maybe OutputSource)
-> (AssociationExecutionTarget
    -> Maybe OutputSource -> AssociationExecutionTarget)
-> Lens
     AssociationExecutionTarget
     AssociationExecutionTarget
     (Maybe OutputSource)
     (Maybe OutputSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationExecutionTarget' {Maybe OutputSource
outputSource :: Maybe OutputSource
$sel:outputSource:AssociationExecutionTarget' :: AssociationExecutionTarget -> Maybe OutputSource
outputSource} -> Maybe OutputSource
outputSource) (\s :: AssociationExecutionTarget
s@AssociationExecutionTarget' {} Maybe OutputSource
a -> AssociationExecutionTarget
s {$sel:outputSource:AssociationExecutionTarget' :: Maybe OutputSource
outputSource = Maybe OutputSource
a} :: AssociationExecutionTarget)

-- | The date of the last execution.
associationExecutionTarget_lastExecutionDate :: Lens.Lens' AssociationExecutionTarget (Prelude.Maybe Prelude.UTCTime)
associationExecutionTarget_lastExecutionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationExecutionTarget -> f AssociationExecutionTarget
associationExecutionTarget_lastExecutionDate = (AssociationExecutionTarget -> Maybe POSIX)
-> (AssociationExecutionTarget
    -> Maybe POSIX -> AssociationExecutionTarget)
-> Lens
     AssociationExecutionTarget
     AssociationExecutionTarget
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationExecutionTarget' {Maybe POSIX
lastExecutionDate :: Maybe POSIX
$sel:lastExecutionDate:AssociationExecutionTarget' :: AssociationExecutionTarget -> Maybe POSIX
lastExecutionDate} -> Maybe POSIX
lastExecutionDate) (\s :: AssociationExecutionTarget
s@AssociationExecutionTarget' {} Maybe POSIX
a -> AssociationExecutionTarget
s {$sel:lastExecutionDate:AssociationExecutionTarget' :: Maybe POSIX
lastExecutionDate = Maybe POSIX
a} :: AssociationExecutionTarget) ((Maybe POSIX -> f (Maybe POSIX))
 -> AssociationExecutionTarget -> f AssociationExecutionTarget)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationExecutionTarget
-> f AssociationExecutionTarget
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 association version.
associationExecutionTarget_associationVersion :: Lens.Lens' AssociationExecutionTarget (Prelude.Maybe Prelude.Text)
associationExecutionTarget_associationVersion :: (Maybe Text -> f (Maybe Text))
-> AssociationExecutionTarget -> f AssociationExecutionTarget
associationExecutionTarget_associationVersion = (AssociationExecutionTarget -> Maybe Text)
-> (AssociationExecutionTarget
    -> Maybe Text -> AssociationExecutionTarget)
-> Lens
     AssociationExecutionTarget
     AssociationExecutionTarget
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationExecutionTarget' {Maybe Text
associationVersion :: Maybe Text
$sel:associationVersion:AssociationExecutionTarget' :: AssociationExecutionTarget -> Maybe Text
associationVersion} -> Maybe Text
associationVersion) (\s :: AssociationExecutionTarget
s@AssociationExecutionTarget' {} Maybe Text
a -> AssociationExecutionTarget
s {$sel:associationVersion:AssociationExecutionTarget' :: Maybe Text
associationVersion = Maybe Text
a} :: AssociationExecutionTarget)

instance Core.FromJSON AssociationExecutionTarget where
  parseJSON :: Value -> Parser AssociationExecutionTarget
parseJSON =
    String
-> (Object -> Parser AssociationExecutionTarget)
-> Value
-> Parser AssociationExecutionTarget
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AssociationExecutionTarget"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OutputSource
-> Maybe POSIX
-> Maybe Text
-> AssociationExecutionTarget
AssociationExecutionTarget'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe OutputSource
 -> Maybe POSIX
 -> Maybe Text
 -> AssociationExecutionTarget)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputSource
      -> Maybe POSIX
      -> Maybe Text
      -> AssociationExecutionTarget)
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
"AssociationId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputSource
   -> Maybe POSIX
   -> Maybe Text
   -> AssociationExecutionTarget)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputSource
      -> Maybe POSIX
      -> Maybe Text
      -> AssociationExecutionTarget)
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
"DetailedStatus")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputSource
   -> Maybe POSIX
   -> Maybe Text
   -> AssociationExecutionTarget)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputSource
      -> Maybe POSIX
      -> Maybe Text
      -> AssociationExecutionTarget)
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
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputSource
   -> Maybe POSIX
   -> Maybe Text
   -> AssociationExecutionTarget)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe OutputSource
      -> Maybe POSIX
      -> Maybe Text
      -> AssociationExecutionTarget)
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
"ExecutionId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe OutputSource
   -> Maybe POSIX
   -> Maybe Text
   -> AssociationExecutionTarget)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe OutputSource
      -> Maybe POSIX
      -> Maybe Text
      -> AssociationExecutionTarget)
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
"ResourceId")
            Parser
  (Maybe Text
   -> Maybe OutputSource
   -> Maybe POSIX
   -> Maybe Text
   -> AssociationExecutionTarget)
-> Parser (Maybe Text)
-> Parser
     (Maybe OutputSource
      -> Maybe POSIX -> Maybe Text -> AssociationExecutionTarget)
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
"ResourceType")
            Parser
  (Maybe OutputSource
   -> Maybe POSIX -> Maybe Text -> AssociationExecutionTarget)
-> Parser (Maybe OutputSource)
-> Parser (Maybe POSIX -> Maybe Text -> AssociationExecutionTarget)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OutputSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputSource")
            Parser (Maybe POSIX -> Maybe Text -> AssociationExecutionTarget)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> AssociationExecutionTarget)
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
"LastExecutionDate")
            Parser (Maybe Text -> AssociationExecutionTarget)
-> Parser (Maybe Text) -> Parser AssociationExecutionTarget
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
"AssociationVersion")
      )

instance Prelude.Hashable AssociationExecutionTarget

instance Prelude.NFData AssociationExecutionTarget