{-# 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.SageMaker.Types.MonitoringExecutionSummary
-- 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.SageMaker.Types.MonitoringExecutionSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ExecutionStatus
import Amazonka.SageMaker.Types.MonitoringType

-- | Summary of information about the last monitoring job to run.
--
-- /See:/ 'newMonitoringExecutionSummary' smart constructor.
data MonitoringExecutionSummary = MonitoringExecutionSummary'
  { -- | The type of the monitoring job.
    MonitoringExecutionSummary -> Maybe MonitoringType
monitoringType :: Prelude.Maybe MonitoringType,
    -- | Contains the reason a monitoring job failed, if it failed.
    MonitoringExecutionSummary -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The name of the endpoint used to run the monitoring job.
    MonitoringExecutionSummary -> Maybe Text
endpointName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the monitoring job.
    MonitoringExecutionSummary -> Maybe Text
processingJobArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the monitoring job.
    MonitoringExecutionSummary -> Maybe Text
monitoringJobDefinitionName :: Prelude.Maybe Prelude.Text,
    -- | The name of the monitoring schedule.
    MonitoringExecutionSummary -> Text
monitoringScheduleName :: Prelude.Text,
    -- | The time the monitoring job was scheduled.
    MonitoringExecutionSummary -> POSIX
scheduledTime :: Core.POSIX,
    -- | The time at which the monitoring job was created.
    MonitoringExecutionSummary -> POSIX
creationTime :: Core.POSIX,
    -- | A timestamp that indicates the last time the monitoring job was
    -- modified.
    MonitoringExecutionSummary -> POSIX
lastModifiedTime :: Core.POSIX,
    -- | The status of the monitoring job.
    MonitoringExecutionSummary -> ExecutionStatus
monitoringExecutionStatus :: ExecutionStatus
  }
  deriving (MonitoringExecutionSummary -> MonitoringExecutionSummary -> Bool
(MonitoringExecutionSummary -> MonitoringExecutionSummary -> Bool)
-> (MonitoringExecutionSummary
    -> MonitoringExecutionSummary -> Bool)
-> Eq MonitoringExecutionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MonitoringExecutionSummary -> MonitoringExecutionSummary -> Bool
$c/= :: MonitoringExecutionSummary -> MonitoringExecutionSummary -> Bool
== :: MonitoringExecutionSummary -> MonitoringExecutionSummary -> Bool
$c== :: MonitoringExecutionSummary -> MonitoringExecutionSummary -> Bool
Prelude.Eq, ReadPrec [MonitoringExecutionSummary]
ReadPrec MonitoringExecutionSummary
Int -> ReadS MonitoringExecutionSummary
ReadS [MonitoringExecutionSummary]
(Int -> ReadS MonitoringExecutionSummary)
-> ReadS [MonitoringExecutionSummary]
-> ReadPrec MonitoringExecutionSummary
-> ReadPrec [MonitoringExecutionSummary]
-> Read MonitoringExecutionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MonitoringExecutionSummary]
$creadListPrec :: ReadPrec [MonitoringExecutionSummary]
readPrec :: ReadPrec MonitoringExecutionSummary
$creadPrec :: ReadPrec MonitoringExecutionSummary
readList :: ReadS [MonitoringExecutionSummary]
$creadList :: ReadS [MonitoringExecutionSummary]
readsPrec :: Int -> ReadS MonitoringExecutionSummary
$creadsPrec :: Int -> ReadS MonitoringExecutionSummary
Prelude.Read, Int -> MonitoringExecutionSummary -> ShowS
[MonitoringExecutionSummary] -> ShowS
MonitoringExecutionSummary -> String
(Int -> MonitoringExecutionSummary -> ShowS)
-> (MonitoringExecutionSummary -> String)
-> ([MonitoringExecutionSummary] -> ShowS)
-> Show MonitoringExecutionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MonitoringExecutionSummary] -> ShowS
$cshowList :: [MonitoringExecutionSummary] -> ShowS
show :: MonitoringExecutionSummary -> String
$cshow :: MonitoringExecutionSummary -> String
showsPrec :: Int -> MonitoringExecutionSummary -> ShowS
$cshowsPrec :: Int -> MonitoringExecutionSummary -> ShowS
Prelude.Show, (forall x.
 MonitoringExecutionSummary -> Rep MonitoringExecutionSummary x)
-> (forall x.
    Rep MonitoringExecutionSummary x -> MonitoringExecutionSummary)
-> Generic MonitoringExecutionSummary
forall x.
Rep MonitoringExecutionSummary x -> MonitoringExecutionSummary
forall x.
MonitoringExecutionSummary -> Rep MonitoringExecutionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MonitoringExecutionSummary x -> MonitoringExecutionSummary
$cfrom :: forall x.
MonitoringExecutionSummary -> Rep MonitoringExecutionSummary x
Prelude.Generic)

-- |
-- Create a value of 'MonitoringExecutionSummary' 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:
--
-- 'monitoringType', 'monitoringExecutionSummary_monitoringType' - The type of the monitoring job.
--
-- 'failureReason', 'monitoringExecutionSummary_failureReason' - Contains the reason a monitoring job failed, if it failed.
--
-- 'endpointName', 'monitoringExecutionSummary_endpointName' - The name of the endpoint used to run the monitoring job.
--
-- 'processingJobArn', 'monitoringExecutionSummary_processingJobArn' - The Amazon Resource Name (ARN) of the monitoring job.
--
-- 'monitoringJobDefinitionName', 'monitoringExecutionSummary_monitoringJobDefinitionName' - The name of the monitoring job.
--
-- 'monitoringScheduleName', 'monitoringExecutionSummary_monitoringScheduleName' - The name of the monitoring schedule.
--
-- 'scheduledTime', 'monitoringExecutionSummary_scheduledTime' - The time the monitoring job was scheduled.
--
-- 'creationTime', 'monitoringExecutionSummary_creationTime' - The time at which the monitoring job was created.
--
-- 'lastModifiedTime', 'monitoringExecutionSummary_lastModifiedTime' - A timestamp that indicates the last time the monitoring job was
-- modified.
--
-- 'monitoringExecutionStatus', 'monitoringExecutionSummary_monitoringExecutionStatus' - The status of the monitoring job.
newMonitoringExecutionSummary ::
  -- | 'monitoringScheduleName'
  Prelude.Text ->
  -- | 'scheduledTime'
  Prelude.UTCTime ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'lastModifiedTime'
  Prelude.UTCTime ->
  -- | 'monitoringExecutionStatus'
  ExecutionStatus ->
  MonitoringExecutionSummary
newMonitoringExecutionSummary :: Text
-> UTCTime
-> UTCTime
-> UTCTime
-> ExecutionStatus
-> MonitoringExecutionSummary
newMonitoringExecutionSummary
  Text
pMonitoringScheduleName_
  UTCTime
pScheduledTime_
  UTCTime
pCreationTime_
  UTCTime
pLastModifiedTime_
  ExecutionStatus
pMonitoringExecutionStatus_ =
    MonitoringExecutionSummary' :: Maybe MonitoringType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> POSIX
-> POSIX
-> POSIX
-> ExecutionStatus
-> MonitoringExecutionSummary
MonitoringExecutionSummary'
      { $sel:monitoringType:MonitoringExecutionSummary' :: Maybe MonitoringType
monitoringType =
          Maybe MonitoringType
forall a. Maybe a
Prelude.Nothing,
        $sel:failureReason:MonitoringExecutionSummary' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:endpointName:MonitoringExecutionSummary' :: Maybe Text
endpointName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:processingJobArn:MonitoringExecutionSummary' :: Maybe Text
processingJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:monitoringJobDefinitionName:MonitoringExecutionSummary' :: Maybe Text
monitoringJobDefinitionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:monitoringScheduleName:MonitoringExecutionSummary' :: Text
monitoringScheduleName =
          Text
pMonitoringScheduleName_,
        $sel:scheduledTime:MonitoringExecutionSummary' :: POSIX
scheduledTime =
          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
pScheduledTime_,
        $sel:creationTime:MonitoringExecutionSummary' :: POSIX
creationTime = 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
pCreationTime_,
        $sel:lastModifiedTime:MonitoringExecutionSummary' :: POSIX
lastModifiedTime =
          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
pLastModifiedTime_,
        $sel:monitoringExecutionStatus:MonitoringExecutionSummary' :: ExecutionStatus
monitoringExecutionStatus =
          ExecutionStatus
pMonitoringExecutionStatus_
      }

-- | The type of the monitoring job.
monitoringExecutionSummary_monitoringType :: Lens.Lens' MonitoringExecutionSummary (Prelude.Maybe MonitoringType)
monitoringExecutionSummary_monitoringType :: (Maybe MonitoringType -> f (Maybe MonitoringType))
-> MonitoringExecutionSummary -> f MonitoringExecutionSummary
monitoringExecutionSummary_monitoringType = (MonitoringExecutionSummary -> Maybe MonitoringType)
-> (MonitoringExecutionSummary
    -> Maybe MonitoringType -> MonitoringExecutionSummary)
-> Lens
     MonitoringExecutionSummary
     MonitoringExecutionSummary
     (Maybe MonitoringType)
     (Maybe MonitoringType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringExecutionSummary' {Maybe MonitoringType
monitoringType :: Maybe MonitoringType
$sel:monitoringType:MonitoringExecutionSummary' :: MonitoringExecutionSummary -> Maybe MonitoringType
monitoringType} -> Maybe MonitoringType
monitoringType) (\s :: MonitoringExecutionSummary
s@MonitoringExecutionSummary' {} Maybe MonitoringType
a -> MonitoringExecutionSummary
s {$sel:monitoringType:MonitoringExecutionSummary' :: Maybe MonitoringType
monitoringType = Maybe MonitoringType
a} :: MonitoringExecutionSummary)

-- | Contains the reason a monitoring job failed, if it failed.
monitoringExecutionSummary_failureReason :: Lens.Lens' MonitoringExecutionSummary (Prelude.Maybe Prelude.Text)
monitoringExecutionSummary_failureReason :: (Maybe Text -> f (Maybe Text))
-> MonitoringExecutionSummary -> f MonitoringExecutionSummary
monitoringExecutionSummary_failureReason = (MonitoringExecutionSummary -> Maybe Text)
-> (MonitoringExecutionSummary
    -> Maybe Text -> MonitoringExecutionSummary)
-> Lens
     MonitoringExecutionSummary
     MonitoringExecutionSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringExecutionSummary' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:MonitoringExecutionSummary' :: MonitoringExecutionSummary -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: MonitoringExecutionSummary
s@MonitoringExecutionSummary' {} Maybe Text
a -> MonitoringExecutionSummary
s {$sel:failureReason:MonitoringExecutionSummary' :: Maybe Text
failureReason = Maybe Text
a} :: MonitoringExecutionSummary)

-- | The name of the endpoint used to run the monitoring job.
monitoringExecutionSummary_endpointName :: Lens.Lens' MonitoringExecutionSummary (Prelude.Maybe Prelude.Text)
monitoringExecutionSummary_endpointName :: (Maybe Text -> f (Maybe Text))
-> MonitoringExecutionSummary -> f MonitoringExecutionSummary
monitoringExecutionSummary_endpointName = (MonitoringExecutionSummary -> Maybe Text)
-> (MonitoringExecutionSummary
    -> Maybe Text -> MonitoringExecutionSummary)
-> Lens
     MonitoringExecutionSummary
     MonitoringExecutionSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringExecutionSummary' {Maybe Text
endpointName :: Maybe Text
$sel:endpointName:MonitoringExecutionSummary' :: MonitoringExecutionSummary -> Maybe Text
endpointName} -> Maybe Text
endpointName) (\s :: MonitoringExecutionSummary
s@MonitoringExecutionSummary' {} Maybe Text
a -> MonitoringExecutionSummary
s {$sel:endpointName:MonitoringExecutionSummary' :: Maybe Text
endpointName = Maybe Text
a} :: MonitoringExecutionSummary)

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

-- | The name of the monitoring job.
monitoringExecutionSummary_monitoringJobDefinitionName :: Lens.Lens' MonitoringExecutionSummary (Prelude.Maybe Prelude.Text)
monitoringExecutionSummary_monitoringJobDefinitionName :: (Maybe Text -> f (Maybe Text))
-> MonitoringExecutionSummary -> f MonitoringExecutionSummary
monitoringExecutionSummary_monitoringJobDefinitionName = (MonitoringExecutionSummary -> Maybe Text)
-> (MonitoringExecutionSummary
    -> Maybe Text -> MonitoringExecutionSummary)
-> Lens
     MonitoringExecutionSummary
     MonitoringExecutionSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringExecutionSummary' {Maybe Text
monitoringJobDefinitionName :: Maybe Text
$sel:monitoringJobDefinitionName:MonitoringExecutionSummary' :: MonitoringExecutionSummary -> Maybe Text
monitoringJobDefinitionName} -> Maybe Text
monitoringJobDefinitionName) (\s :: MonitoringExecutionSummary
s@MonitoringExecutionSummary' {} Maybe Text
a -> MonitoringExecutionSummary
s {$sel:monitoringJobDefinitionName:MonitoringExecutionSummary' :: Maybe Text
monitoringJobDefinitionName = Maybe Text
a} :: MonitoringExecutionSummary)

-- | The name of the monitoring schedule.
monitoringExecutionSummary_monitoringScheduleName :: Lens.Lens' MonitoringExecutionSummary Prelude.Text
monitoringExecutionSummary_monitoringScheduleName :: (Text -> f Text)
-> MonitoringExecutionSummary -> f MonitoringExecutionSummary
monitoringExecutionSummary_monitoringScheduleName = (MonitoringExecutionSummary -> Text)
-> (MonitoringExecutionSummary
    -> Text -> MonitoringExecutionSummary)
-> Lens
     MonitoringExecutionSummary MonitoringExecutionSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringExecutionSummary' {Text
monitoringScheduleName :: Text
$sel:monitoringScheduleName:MonitoringExecutionSummary' :: MonitoringExecutionSummary -> Text
monitoringScheduleName} -> Text
monitoringScheduleName) (\s :: MonitoringExecutionSummary
s@MonitoringExecutionSummary' {} Text
a -> MonitoringExecutionSummary
s {$sel:monitoringScheduleName:MonitoringExecutionSummary' :: Text
monitoringScheduleName = Text
a} :: MonitoringExecutionSummary)

-- | The time the monitoring job was scheduled.
monitoringExecutionSummary_scheduledTime :: Lens.Lens' MonitoringExecutionSummary Prelude.UTCTime
monitoringExecutionSummary_scheduledTime :: (UTCTime -> f UTCTime)
-> MonitoringExecutionSummary -> f MonitoringExecutionSummary
monitoringExecutionSummary_scheduledTime = (MonitoringExecutionSummary -> POSIX)
-> (MonitoringExecutionSummary
    -> POSIX -> MonitoringExecutionSummary)
-> Lens
     MonitoringExecutionSummary MonitoringExecutionSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringExecutionSummary' {POSIX
scheduledTime :: POSIX
$sel:scheduledTime:MonitoringExecutionSummary' :: MonitoringExecutionSummary -> POSIX
scheduledTime} -> POSIX
scheduledTime) (\s :: MonitoringExecutionSummary
s@MonitoringExecutionSummary' {} POSIX
a -> MonitoringExecutionSummary
s {$sel:scheduledTime:MonitoringExecutionSummary' :: POSIX
scheduledTime = POSIX
a} :: MonitoringExecutionSummary) ((POSIX -> f POSIX)
 -> MonitoringExecutionSummary -> f MonitoringExecutionSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> MonitoringExecutionSummary
-> f MonitoringExecutionSummary
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 monitoring job was created.
monitoringExecutionSummary_creationTime :: Lens.Lens' MonitoringExecutionSummary Prelude.UTCTime
monitoringExecutionSummary_creationTime :: (UTCTime -> f UTCTime)
-> MonitoringExecutionSummary -> f MonitoringExecutionSummary
monitoringExecutionSummary_creationTime = (MonitoringExecutionSummary -> POSIX)
-> (MonitoringExecutionSummary
    -> POSIX -> MonitoringExecutionSummary)
-> Lens
     MonitoringExecutionSummary MonitoringExecutionSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringExecutionSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:MonitoringExecutionSummary' :: MonitoringExecutionSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: MonitoringExecutionSummary
s@MonitoringExecutionSummary' {} POSIX
a -> MonitoringExecutionSummary
s {$sel:creationTime:MonitoringExecutionSummary' :: POSIX
creationTime = POSIX
a} :: MonitoringExecutionSummary) ((POSIX -> f POSIX)
 -> MonitoringExecutionSummary -> f MonitoringExecutionSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> MonitoringExecutionSummary
-> f MonitoringExecutionSummary
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

-- | A timestamp that indicates the last time the monitoring job was
-- modified.
monitoringExecutionSummary_lastModifiedTime :: Lens.Lens' MonitoringExecutionSummary Prelude.UTCTime
monitoringExecutionSummary_lastModifiedTime :: (UTCTime -> f UTCTime)
-> MonitoringExecutionSummary -> f MonitoringExecutionSummary
monitoringExecutionSummary_lastModifiedTime = (MonitoringExecutionSummary -> POSIX)
-> (MonitoringExecutionSummary
    -> POSIX -> MonitoringExecutionSummary)
-> Lens
     MonitoringExecutionSummary MonitoringExecutionSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringExecutionSummary' {POSIX
lastModifiedTime :: POSIX
$sel:lastModifiedTime:MonitoringExecutionSummary' :: MonitoringExecutionSummary -> POSIX
lastModifiedTime} -> POSIX
lastModifiedTime) (\s :: MonitoringExecutionSummary
s@MonitoringExecutionSummary' {} POSIX
a -> MonitoringExecutionSummary
s {$sel:lastModifiedTime:MonitoringExecutionSummary' :: POSIX
lastModifiedTime = POSIX
a} :: MonitoringExecutionSummary) ((POSIX -> f POSIX)
 -> MonitoringExecutionSummary -> f MonitoringExecutionSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> MonitoringExecutionSummary
-> f MonitoringExecutionSummary
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 status of the monitoring job.
monitoringExecutionSummary_monitoringExecutionStatus :: Lens.Lens' MonitoringExecutionSummary ExecutionStatus
monitoringExecutionSummary_monitoringExecutionStatus :: (ExecutionStatus -> f ExecutionStatus)
-> MonitoringExecutionSummary -> f MonitoringExecutionSummary
monitoringExecutionSummary_monitoringExecutionStatus = (MonitoringExecutionSummary -> ExecutionStatus)
-> (MonitoringExecutionSummary
    -> ExecutionStatus -> MonitoringExecutionSummary)
-> Lens
     MonitoringExecutionSummary
     MonitoringExecutionSummary
     ExecutionStatus
     ExecutionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringExecutionSummary' {ExecutionStatus
monitoringExecutionStatus :: ExecutionStatus
$sel:monitoringExecutionStatus:MonitoringExecutionSummary' :: MonitoringExecutionSummary -> ExecutionStatus
monitoringExecutionStatus} -> ExecutionStatus
monitoringExecutionStatus) (\s :: MonitoringExecutionSummary
s@MonitoringExecutionSummary' {} ExecutionStatus
a -> MonitoringExecutionSummary
s {$sel:monitoringExecutionStatus:MonitoringExecutionSummary' :: ExecutionStatus
monitoringExecutionStatus = ExecutionStatus
a} :: MonitoringExecutionSummary)

instance Core.FromJSON MonitoringExecutionSummary where
  parseJSON :: Value -> Parser MonitoringExecutionSummary
parseJSON =
    String
-> (Object -> Parser MonitoringExecutionSummary)
-> Value
-> Parser MonitoringExecutionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MonitoringExecutionSummary"
      ( \Object
x ->
          Maybe MonitoringType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> POSIX
-> POSIX
-> POSIX
-> ExecutionStatus
-> MonitoringExecutionSummary
MonitoringExecutionSummary'
            (Maybe MonitoringType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> POSIX
 -> POSIX
 -> POSIX
 -> ExecutionStatus
 -> MonitoringExecutionSummary)
-> Parser (Maybe MonitoringType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> POSIX
      -> POSIX
      -> POSIX
      -> ExecutionStatus
      -> MonitoringExecutionSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MonitoringType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MonitoringType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> POSIX
   -> POSIX
   -> POSIX
   -> ExecutionStatus
   -> MonitoringExecutionSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> POSIX
      -> POSIX
      -> POSIX
      -> ExecutionStatus
      -> MonitoringExecutionSummary)
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
"FailureReason")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> POSIX
   -> POSIX
   -> POSIX
   -> ExecutionStatus
   -> MonitoringExecutionSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Text
      -> POSIX
      -> POSIX
      -> POSIX
      -> ExecutionStatus
      -> MonitoringExecutionSummary)
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
"EndpointName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Text
   -> POSIX
   -> POSIX
   -> POSIX
   -> ExecutionStatus
   -> MonitoringExecutionSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Text
      -> POSIX
      -> POSIX
      -> POSIX
      -> ExecutionStatus
      -> MonitoringExecutionSummary)
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
"ProcessingJobArn")
            Parser
  (Maybe Text
   -> Text
   -> POSIX
   -> POSIX
   -> POSIX
   -> ExecutionStatus
   -> MonitoringExecutionSummary)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> POSIX
      -> POSIX
      -> POSIX
      -> ExecutionStatus
      -> MonitoringExecutionSummary)
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
"MonitoringJobDefinitionName")
            Parser
  (Text
   -> POSIX
   -> POSIX
   -> POSIX
   -> ExecutionStatus
   -> MonitoringExecutionSummary)
-> Parser Text
-> Parser
     (POSIX
      -> POSIX -> POSIX -> ExecutionStatus -> MonitoringExecutionSummary)
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
"MonitoringScheduleName")
            Parser
  (POSIX
   -> POSIX -> POSIX -> ExecutionStatus -> MonitoringExecutionSummary)
-> Parser POSIX
-> Parser
     (POSIX -> POSIX -> ExecutionStatus -> MonitoringExecutionSummary)
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
"ScheduledTime")
            Parser
  (POSIX -> POSIX -> ExecutionStatus -> MonitoringExecutionSummary)
-> Parser POSIX
-> Parser (POSIX -> ExecutionStatus -> MonitoringExecutionSummary)
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
"CreationTime")
            Parser (POSIX -> ExecutionStatus -> MonitoringExecutionSummary)
-> Parser POSIX
-> Parser (ExecutionStatus -> MonitoringExecutionSummary)
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
"LastModifiedTime")
            Parser (ExecutionStatus -> MonitoringExecutionSummary)
-> Parser ExecutionStatus -> Parser MonitoringExecutionSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ExecutionStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MonitoringExecutionStatus")
      )

instance Prelude.Hashable MonitoringExecutionSummary

instance Prelude.NFData MonitoringExecutionSummary