{-# 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.MaintenanceWindowExecutionTaskIdentity
-- 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.MaintenanceWindowExecutionTaskIdentity where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.MaintenanceWindowExecutionStatus
import Amazonka.SSM.Types.MaintenanceWindowTaskType

-- | Information about a task execution performed as part of a maintenance
-- window execution.
--
-- /See:/ 'newMaintenanceWindowExecutionTaskIdentity' smart constructor.
data MaintenanceWindowExecutionTaskIdentity = MaintenanceWindowExecutionTaskIdentity'
  { -- | The status of the task execution.
    MaintenanceWindowExecutionTaskIdentity
-> Maybe MaintenanceWindowExecutionStatus
status :: Prelude.Maybe MaintenanceWindowExecutionStatus,
    -- | The ID of the specific task execution in the maintenance window
    -- execution.
    MaintenanceWindowExecutionTaskIdentity -> Maybe Text
taskExecutionId :: Prelude.Maybe Prelude.Text,
    -- | The time the task execution started.
    MaintenanceWindowExecutionTaskIdentity -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | The type of task that ran.
    MaintenanceWindowExecutionTaskIdentity
-> Maybe MaintenanceWindowTaskType
taskType :: Prelude.Maybe MaintenanceWindowTaskType,
    -- | The Amazon Resource Name (ARN) of the task that ran.
    MaintenanceWindowExecutionTaskIdentity -> Maybe Text
taskArn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the maintenance window execution that ran the task.
    MaintenanceWindowExecutionTaskIdentity -> Maybe Text
windowExecutionId :: Prelude.Maybe Prelude.Text,
    -- | The details explaining the status of the task execution. Not available
    -- for all status values.
    MaintenanceWindowExecutionTaskIdentity -> Maybe Text
statusDetails :: Prelude.Maybe Prelude.Text,
    -- | The time the task execution finished.
    MaintenanceWindowExecutionTaskIdentity -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX
  }
  deriving (MaintenanceWindowExecutionTaskIdentity
-> MaintenanceWindowExecutionTaskIdentity -> Bool
(MaintenanceWindowExecutionTaskIdentity
 -> MaintenanceWindowExecutionTaskIdentity -> Bool)
-> (MaintenanceWindowExecutionTaskIdentity
    -> MaintenanceWindowExecutionTaskIdentity -> Bool)
-> Eq MaintenanceWindowExecutionTaskIdentity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceWindowExecutionTaskIdentity
-> MaintenanceWindowExecutionTaskIdentity -> Bool
$c/= :: MaintenanceWindowExecutionTaskIdentity
-> MaintenanceWindowExecutionTaskIdentity -> Bool
== :: MaintenanceWindowExecutionTaskIdentity
-> MaintenanceWindowExecutionTaskIdentity -> Bool
$c== :: MaintenanceWindowExecutionTaskIdentity
-> MaintenanceWindowExecutionTaskIdentity -> Bool
Prelude.Eq, ReadPrec [MaintenanceWindowExecutionTaskIdentity]
ReadPrec MaintenanceWindowExecutionTaskIdentity
Int -> ReadS MaintenanceWindowExecutionTaskIdentity
ReadS [MaintenanceWindowExecutionTaskIdentity]
(Int -> ReadS MaintenanceWindowExecutionTaskIdentity)
-> ReadS [MaintenanceWindowExecutionTaskIdentity]
-> ReadPrec MaintenanceWindowExecutionTaskIdentity
-> ReadPrec [MaintenanceWindowExecutionTaskIdentity]
-> Read MaintenanceWindowExecutionTaskIdentity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MaintenanceWindowExecutionTaskIdentity]
$creadListPrec :: ReadPrec [MaintenanceWindowExecutionTaskIdentity]
readPrec :: ReadPrec MaintenanceWindowExecutionTaskIdentity
$creadPrec :: ReadPrec MaintenanceWindowExecutionTaskIdentity
readList :: ReadS [MaintenanceWindowExecutionTaskIdentity]
$creadList :: ReadS [MaintenanceWindowExecutionTaskIdentity]
readsPrec :: Int -> ReadS MaintenanceWindowExecutionTaskIdentity
$creadsPrec :: Int -> ReadS MaintenanceWindowExecutionTaskIdentity
Prelude.Read, Int -> MaintenanceWindowExecutionTaskIdentity -> ShowS
[MaintenanceWindowExecutionTaskIdentity] -> ShowS
MaintenanceWindowExecutionTaskIdentity -> String
(Int -> MaintenanceWindowExecutionTaskIdentity -> ShowS)
-> (MaintenanceWindowExecutionTaskIdentity -> String)
-> ([MaintenanceWindowExecutionTaskIdentity] -> ShowS)
-> Show MaintenanceWindowExecutionTaskIdentity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceWindowExecutionTaskIdentity] -> ShowS
$cshowList :: [MaintenanceWindowExecutionTaskIdentity] -> ShowS
show :: MaintenanceWindowExecutionTaskIdentity -> String
$cshow :: MaintenanceWindowExecutionTaskIdentity -> String
showsPrec :: Int -> MaintenanceWindowExecutionTaskIdentity -> ShowS
$cshowsPrec :: Int -> MaintenanceWindowExecutionTaskIdentity -> ShowS
Prelude.Show, (forall x.
 MaintenanceWindowExecutionTaskIdentity
 -> Rep MaintenanceWindowExecutionTaskIdentity x)
-> (forall x.
    Rep MaintenanceWindowExecutionTaskIdentity x
    -> MaintenanceWindowExecutionTaskIdentity)
-> Generic MaintenanceWindowExecutionTaskIdentity
forall x.
Rep MaintenanceWindowExecutionTaskIdentity x
-> MaintenanceWindowExecutionTaskIdentity
forall x.
MaintenanceWindowExecutionTaskIdentity
-> Rep MaintenanceWindowExecutionTaskIdentity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MaintenanceWindowExecutionTaskIdentity x
-> MaintenanceWindowExecutionTaskIdentity
$cfrom :: forall x.
MaintenanceWindowExecutionTaskIdentity
-> Rep MaintenanceWindowExecutionTaskIdentity x
Prelude.Generic)

-- |
-- Create a value of 'MaintenanceWindowExecutionTaskIdentity' 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:
--
-- 'status', 'maintenanceWindowExecutionTaskIdentity_status' - The status of the task execution.
--
-- 'taskExecutionId', 'maintenanceWindowExecutionTaskIdentity_taskExecutionId' - The ID of the specific task execution in the maintenance window
-- execution.
--
-- 'startTime', 'maintenanceWindowExecutionTaskIdentity_startTime' - The time the task execution started.
--
-- 'taskType', 'maintenanceWindowExecutionTaskIdentity_taskType' - The type of task that ran.
--
-- 'taskArn', 'maintenanceWindowExecutionTaskIdentity_taskArn' - The Amazon Resource Name (ARN) of the task that ran.
--
-- 'windowExecutionId', 'maintenanceWindowExecutionTaskIdentity_windowExecutionId' - The ID of the maintenance window execution that ran the task.
--
-- 'statusDetails', 'maintenanceWindowExecutionTaskIdentity_statusDetails' - The details explaining the status of the task execution. Not available
-- for all status values.
--
-- 'endTime', 'maintenanceWindowExecutionTaskIdentity_endTime' - The time the task execution finished.
newMaintenanceWindowExecutionTaskIdentity ::
  MaintenanceWindowExecutionTaskIdentity
newMaintenanceWindowExecutionTaskIdentity :: MaintenanceWindowExecutionTaskIdentity
newMaintenanceWindowExecutionTaskIdentity =
  MaintenanceWindowExecutionTaskIdentity' :: Maybe MaintenanceWindowExecutionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe MaintenanceWindowTaskType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> MaintenanceWindowExecutionTaskIdentity
MaintenanceWindowExecutionTaskIdentity'
    { $sel:status:MaintenanceWindowExecutionTaskIdentity' :: Maybe MaintenanceWindowExecutionStatus
status =
        Maybe MaintenanceWindowExecutionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:taskExecutionId:MaintenanceWindowExecutionTaskIdentity' :: Maybe Text
taskExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:MaintenanceWindowExecutionTaskIdentity' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:taskType:MaintenanceWindowExecutionTaskIdentity' :: Maybe MaintenanceWindowTaskType
taskType = Maybe MaintenanceWindowTaskType
forall a. Maybe a
Prelude.Nothing,
      $sel:taskArn:MaintenanceWindowExecutionTaskIdentity' :: Maybe Text
taskArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:windowExecutionId:MaintenanceWindowExecutionTaskIdentity' :: Maybe Text
windowExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusDetails:MaintenanceWindowExecutionTaskIdentity' :: Maybe Text
statusDetails = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:MaintenanceWindowExecutionTaskIdentity' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the task execution.
maintenanceWindowExecutionTaskIdentity_status :: Lens.Lens' MaintenanceWindowExecutionTaskIdentity (Prelude.Maybe MaintenanceWindowExecutionStatus)
maintenanceWindowExecutionTaskIdentity_status :: (Maybe MaintenanceWindowExecutionStatus
 -> f (Maybe MaintenanceWindowExecutionStatus))
-> MaintenanceWindowExecutionTaskIdentity
-> f MaintenanceWindowExecutionTaskIdentity
maintenanceWindowExecutionTaskIdentity_status = (MaintenanceWindowExecutionTaskIdentity
 -> Maybe MaintenanceWindowExecutionStatus)
-> (MaintenanceWindowExecutionTaskIdentity
    -> Maybe MaintenanceWindowExecutionStatus
    -> MaintenanceWindowExecutionTaskIdentity)
-> Lens
     MaintenanceWindowExecutionTaskIdentity
     MaintenanceWindowExecutionTaskIdentity
     (Maybe MaintenanceWindowExecutionStatus)
     (Maybe MaintenanceWindowExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecutionTaskIdentity' {Maybe MaintenanceWindowExecutionStatus
status :: Maybe MaintenanceWindowExecutionStatus
$sel:status:MaintenanceWindowExecutionTaskIdentity' :: MaintenanceWindowExecutionTaskIdentity
-> Maybe MaintenanceWindowExecutionStatus
status} -> Maybe MaintenanceWindowExecutionStatus
status) (\s :: MaintenanceWindowExecutionTaskIdentity
s@MaintenanceWindowExecutionTaskIdentity' {} Maybe MaintenanceWindowExecutionStatus
a -> MaintenanceWindowExecutionTaskIdentity
s {$sel:status:MaintenanceWindowExecutionTaskIdentity' :: Maybe MaintenanceWindowExecutionStatus
status = Maybe MaintenanceWindowExecutionStatus
a} :: MaintenanceWindowExecutionTaskIdentity)

-- | The ID of the specific task execution in the maintenance window
-- execution.
maintenanceWindowExecutionTaskIdentity_taskExecutionId :: Lens.Lens' MaintenanceWindowExecutionTaskIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowExecutionTaskIdentity_taskExecutionId :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowExecutionTaskIdentity
-> f MaintenanceWindowExecutionTaskIdentity
maintenanceWindowExecutionTaskIdentity_taskExecutionId = (MaintenanceWindowExecutionTaskIdentity -> Maybe Text)
-> (MaintenanceWindowExecutionTaskIdentity
    -> Maybe Text -> MaintenanceWindowExecutionTaskIdentity)
-> Lens
     MaintenanceWindowExecutionTaskIdentity
     MaintenanceWindowExecutionTaskIdentity
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecutionTaskIdentity' {Maybe Text
taskExecutionId :: Maybe Text
$sel:taskExecutionId:MaintenanceWindowExecutionTaskIdentity' :: MaintenanceWindowExecutionTaskIdentity -> Maybe Text
taskExecutionId} -> Maybe Text
taskExecutionId) (\s :: MaintenanceWindowExecutionTaskIdentity
s@MaintenanceWindowExecutionTaskIdentity' {} Maybe Text
a -> MaintenanceWindowExecutionTaskIdentity
s {$sel:taskExecutionId:MaintenanceWindowExecutionTaskIdentity' :: Maybe Text
taskExecutionId = Maybe Text
a} :: MaintenanceWindowExecutionTaskIdentity)

-- | The time the task execution started.
maintenanceWindowExecutionTaskIdentity_startTime :: Lens.Lens' MaintenanceWindowExecutionTaskIdentity (Prelude.Maybe Prelude.UTCTime)
maintenanceWindowExecutionTaskIdentity_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MaintenanceWindowExecutionTaskIdentity
-> f MaintenanceWindowExecutionTaskIdentity
maintenanceWindowExecutionTaskIdentity_startTime = (MaintenanceWindowExecutionTaskIdentity -> Maybe POSIX)
-> (MaintenanceWindowExecutionTaskIdentity
    -> Maybe POSIX -> MaintenanceWindowExecutionTaskIdentity)
-> Lens
     MaintenanceWindowExecutionTaskIdentity
     MaintenanceWindowExecutionTaskIdentity
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecutionTaskIdentity' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:MaintenanceWindowExecutionTaskIdentity' :: MaintenanceWindowExecutionTaskIdentity -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: MaintenanceWindowExecutionTaskIdentity
s@MaintenanceWindowExecutionTaskIdentity' {} Maybe POSIX
a -> MaintenanceWindowExecutionTaskIdentity
s {$sel:startTime:MaintenanceWindowExecutionTaskIdentity' :: Maybe POSIX
startTime = Maybe POSIX
a} :: MaintenanceWindowExecutionTaskIdentity) ((Maybe POSIX -> f (Maybe POSIX))
 -> MaintenanceWindowExecutionTaskIdentity
 -> f MaintenanceWindowExecutionTaskIdentity)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MaintenanceWindowExecutionTaskIdentity
-> f MaintenanceWindowExecutionTaskIdentity
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 type of task that ran.
maintenanceWindowExecutionTaskIdentity_taskType :: Lens.Lens' MaintenanceWindowExecutionTaskIdentity (Prelude.Maybe MaintenanceWindowTaskType)
maintenanceWindowExecutionTaskIdentity_taskType :: (Maybe MaintenanceWindowTaskType
 -> f (Maybe MaintenanceWindowTaskType))
-> MaintenanceWindowExecutionTaskIdentity
-> f MaintenanceWindowExecutionTaskIdentity
maintenanceWindowExecutionTaskIdentity_taskType = (MaintenanceWindowExecutionTaskIdentity
 -> Maybe MaintenanceWindowTaskType)
-> (MaintenanceWindowExecutionTaskIdentity
    -> Maybe MaintenanceWindowTaskType
    -> MaintenanceWindowExecutionTaskIdentity)
-> Lens
     MaintenanceWindowExecutionTaskIdentity
     MaintenanceWindowExecutionTaskIdentity
     (Maybe MaintenanceWindowTaskType)
     (Maybe MaintenanceWindowTaskType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecutionTaskIdentity' {Maybe MaintenanceWindowTaskType
taskType :: Maybe MaintenanceWindowTaskType
$sel:taskType:MaintenanceWindowExecutionTaskIdentity' :: MaintenanceWindowExecutionTaskIdentity
-> Maybe MaintenanceWindowTaskType
taskType} -> Maybe MaintenanceWindowTaskType
taskType) (\s :: MaintenanceWindowExecutionTaskIdentity
s@MaintenanceWindowExecutionTaskIdentity' {} Maybe MaintenanceWindowTaskType
a -> MaintenanceWindowExecutionTaskIdentity
s {$sel:taskType:MaintenanceWindowExecutionTaskIdentity' :: Maybe MaintenanceWindowTaskType
taskType = Maybe MaintenanceWindowTaskType
a} :: MaintenanceWindowExecutionTaskIdentity)

-- | The Amazon Resource Name (ARN) of the task that ran.
maintenanceWindowExecutionTaskIdentity_taskArn :: Lens.Lens' MaintenanceWindowExecutionTaskIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowExecutionTaskIdentity_taskArn :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowExecutionTaskIdentity
-> f MaintenanceWindowExecutionTaskIdentity
maintenanceWindowExecutionTaskIdentity_taskArn = (MaintenanceWindowExecutionTaskIdentity -> Maybe Text)
-> (MaintenanceWindowExecutionTaskIdentity
    -> Maybe Text -> MaintenanceWindowExecutionTaskIdentity)
-> Lens
     MaintenanceWindowExecutionTaskIdentity
     MaintenanceWindowExecutionTaskIdentity
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecutionTaskIdentity' {Maybe Text
taskArn :: Maybe Text
$sel:taskArn:MaintenanceWindowExecutionTaskIdentity' :: MaintenanceWindowExecutionTaskIdentity -> Maybe Text
taskArn} -> Maybe Text
taskArn) (\s :: MaintenanceWindowExecutionTaskIdentity
s@MaintenanceWindowExecutionTaskIdentity' {} Maybe Text
a -> MaintenanceWindowExecutionTaskIdentity
s {$sel:taskArn:MaintenanceWindowExecutionTaskIdentity' :: Maybe Text
taskArn = Maybe Text
a} :: MaintenanceWindowExecutionTaskIdentity)

-- | The ID of the maintenance window execution that ran the task.
maintenanceWindowExecutionTaskIdentity_windowExecutionId :: Lens.Lens' MaintenanceWindowExecutionTaskIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowExecutionTaskIdentity_windowExecutionId :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowExecutionTaskIdentity
-> f MaintenanceWindowExecutionTaskIdentity
maintenanceWindowExecutionTaskIdentity_windowExecutionId = (MaintenanceWindowExecutionTaskIdentity -> Maybe Text)
-> (MaintenanceWindowExecutionTaskIdentity
    -> Maybe Text -> MaintenanceWindowExecutionTaskIdentity)
-> Lens
     MaintenanceWindowExecutionTaskIdentity
     MaintenanceWindowExecutionTaskIdentity
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecutionTaskIdentity' {Maybe Text
windowExecutionId :: Maybe Text
$sel:windowExecutionId:MaintenanceWindowExecutionTaskIdentity' :: MaintenanceWindowExecutionTaskIdentity -> Maybe Text
windowExecutionId} -> Maybe Text
windowExecutionId) (\s :: MaintenanceWindowExecutionTaskIdentity
s@MaintenanceWindowExecutionTaskIdentity' {} Maybe Text
a -> MaintenanceWindowExecutionTaskIdentity
s {$sel:windowExecutionId:MaintenanceWindowExecutionTaskIdentity' :: Maybe Text
windowExecutionId = Maybe Text
a} :: MaintenanceWindowExecutionTaskIdentity)

-- | The details explaining the status of the task execution. Not available
-- for all status values.
maintenanceWindowExecutionTaskIdentity_statusDetails :: Lens.Lens' MaintenanceWindowExecutionTaskIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowExecutionTaskIdentity_statusDetails :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowExecutionTaskIdentity
-> f MaintenanceWindowExecutionTaskIdentity
maintenanceWindowExecutionTaskIdentity_statusDetails = (MaintenanceWindowExecutionTaskIdentity -> Maybe Text)
-> (MaintenanceWindowExecutionTaskIdentity
    -> Maybe Text -> MaintenanceWindowExecutionTaskIdentity)
-> Lens
     MaintenanceWindowExecutionTaskIdentity
     MaintenanceWindowExecutionTaskIdentity
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecutionTaskIdentity' {Maybe Text
statusDetails :: Maybe Text
$sel:statusDetails:MaintenanceWindowExecutionTaskIdentity' :: MaintenanceWindowExecutionTaskIdentity -> Maybe Text
statusDetails} -> Maybe Text
statusDetails) (\s :: MaintenanceWindowExecutionTaskIdentity
s@MaintenanceWindowExecutionTaskIdentity' {} Maybe Text
a -> MaintenanceWindowExecutionTaskIdentity
s {$sel:statusDetails:MaintenanceWindowExecutionTaskIdentity' :: Maybe Text
statusDetails = Maybe Text
a} :: MaintenanceWindowExecutionTaskIdentity)

-- | The time the task execution finished.
maintenanceWindowExecutionTaskIdentity_endTime :: Lens.Lens' MaintenanceWindowExecutionTaskIdentity (Prelude.Maybe Prelude.UTCTime)
maintenanceWindowExecutionTaskIdentity_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MaintenanceWindowExecutionTaskIdentity
-> f MaintenanceWindowExecutionTaskIdentity
maintenanceWindowExecutionTaskIdentity_endTime = (MaintenanceWindowExecutionTaskIdentity -> Maybe POSIX)
-> (MaintenanceWindowExecutionTaskIdentity
    -> Maybe POSIX -> MaintenanceWindowExecutionTaskIdentity)
-> Lens
     MaintenanceWindowExecutionTaskIdentity
     MaintenanceWindowExecutionTaskIdentity
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecutionTaskIdentity' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:MaintenanceWindowExecutionTaskIdentity' :: MaintenanceWindowExecutionTaskIdentity -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: MaintenanceWindowExecutionTaskIdentity
s@MaintenanceWindowExecutionTaskIdentity' {} Maybe POSIX
a -> MaintenanceWindowExecutionTaskIdentity
s {$sel:endTime:MaintenanceWindowExecutionTaskIdentity' :: Maybe POSIX
endTime = Maybe POSIX
a} :: MaintenanceWindowExecutionTaskIdentity) ((Maybe POSIX -> f (Maybe POSIX))
 -> MaintenanceWindowExecutionTaskIdentity
 -> f MaintenanceWindowExecutionTaskIdentity)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MaintenanceWindowExecutionTaskIdentity
-> f MaintenanceWindowExecutionTaskIdentity
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

instance
  Core.FromJSON
    MaintenanceWindowExecutionTaskIdentity
  where
  parseJSON :: Value -> Parser MaintenanceWindowExecutionTaskIdentity
parseJSON =
    String
-> (Object -> Parser MaintenanceWindowExecutionTaskIdentity)
-> Value
-> Parser MaintenanceWindowExecutionTaskIdentity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MaintenanceWindowExecutionTaskIdentity"
      ( \Object
x ->
          Maybe MaintenanceWindowExecutionStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe MaintenanceWindowTaskType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> MaintenanceWindowExecutionTaskIdentity
MaintenanceWindowExecutionTaskIdentity'
            (Maybe MaintenanceWindowExecutionStatus
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe MaintenanceWindowTaskType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> MaintenanceWindowExecutionTaskIdentity)
-> Parser (Maybe MaintenanceWindowExecutionStatus)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe MaintenanceWindowTaskType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> MaintenanceWindowExecutionTaskIdentity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MaintenanceWindowExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe MaintenanceWindowTaskType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> MaintenanceWindowExecutionTaskIdentity)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe MaintenanceWindowTaskType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> MaintenanceWindowExecutionTaskIdentity)
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
"TaskExecutionId")
            Parser
  (Maybe POSIX
   -> Maybe MaintenanceWindowTaskType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> MaintenanceWindowExecutionTaskIdentity)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe MaintenanceWindowTaskType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> MaintenanceWindowExecutionTaskIdentity)
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
"StartTime")
            Parser
  (Maybe MaintenanceWindowTaskType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> MaintenanceWindowExecutionTaskIdentity)
-> Parser (Maybe MaintenanceWindowTaskType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> MaintenanceWindowExecutionTaskIdentity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MaintenanceWindowTaskType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TaskType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> MaintenanceWindowExecutionTaskIdentity)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> MaintenanceWindowExecutionTaskIdentity)
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
"TaskArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> MaintenanceWindowExecutionTaskIdentity)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX -> MaintenanceWindowExecutionTaskIdentity)
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
"WindowExecutionId")
            Parser
  (Maybe Text
   -> Maybe POSIX -> MaintenanceWindowExecutionTaskIdentity)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> MaintenanceWindowExecutionTaskIdentity)
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
"StatusDetails")
            Parser (Maybe POSIX -> MaintenanceWindowExecutionTaskIdentity)
-> Parser (Maybe POSIX)
-> Parser MaintenanceWindowExecutionTaskIdentity
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
"EndTime")
      )

instance
  Prelude.Hashable
    MaintenanceWindowExecutionTaskIdentity

instance
  Prelude.NFData
    MaintenanceWindowExecutionTaskIdentity