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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.MonitoringExecutionSummary
import Amazonka.SageMaker.Types.MonitoringScheduleConfig
import Amazonka.SageMaker.Types.MonitoringType
import Amazonka.SageMaker.Types.ScheduleStatus
import Amazonka.SageMaker.Types.Tag

-- | A schedule for a model monitoring job. For information about model
-- monitor, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor.html Amazon SageMaker Model Monitor>.
--
-- /See:/ 'newMonitoringSchedule' smart constructor.
data MonitoringSchedule = MonitoringSchedule'
  { -- | The time that the monitoring schedule was created.
    MonitoringSchedule -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The type of the monitoring job definition to schedule.
    MonitoringSchedule -> Maybe MonitoringType
monitoringType :: Prelude.Maybe MonitoringType,
    -- | If the monitoring schedule failed, the reason it failed.
    MonitoringSchedule -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the monitoring schedule.
    MonitoringSchedule -> Maybe Text
monitoringScheduleArn :: Prelude.Maybe Prelude.Text,
    -- | The endpoint that hosts the model being monitored.
    MonitoringSchedule -> Maybe Text
endpointName :: Prelude.Maybe Prelude.Text,
    -- | The last time the monitoring schedule was changed.
    MonitoringSchedule -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The status of the monitoring schedule. This can be one of the following
    -- values.
    --
    -- -   @PENDING@ - The schedule is pending being created.
    --
    -- -   @FAILED@ - The schedule failed.
    --
    -- -   @SCHEDULED@ - The schedule was successfully created.
    --
    -- -   @STOPPED@ - The schedule was stopped.
    MonitoringSchedule -> Maybe ScheduleStatus
monitoringScheduleStatus :: Prelude.Maybe ScheduleStatus,
    MonitoringSchedule -> Maybe MonitoringExecutionSummary
lastMonitoringExecutionSummary :: Prelude.Maybe MonitoringExecutionSummary,
    MonitoringSchedule -> Maybe MonitoringScheduleConfig
monitoringScheduleConfig :: Prelude.Maybe MonitoringScheduleConfig,
    -- | The name of the monitoring schedule.
    MonitoringSchedule -> Maybe Text
monitoringScheduleName :: Prelude.Maybe Prelude.Text,
    -- | A list of the tags associated with the monitoring schedlue. For more
    -- information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>
    -- in the /Amazon Web Services General Reference Guide/.
    MonitoringSchedule -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (MonitoringSchedule -> MonitoringSchedule -> Bool
(MonitoringSchedule -> MonitoringSchedule -> Bool)
-> (MonitoringSchedule -> MonitoringSchedule -> Bool)
-> Eq MonitoringSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MonitoringSchedule -> MonitoringSchedule -> Bool
$c/= :: MonitoringSchedule -> MonitoringSchedule -> Bool
== :: MonitoringSchedule -> MonitoringSchedule -> Bool
$c== :: MonitoringSchedule -> MonitoringSchedule -> Bool
Prelude.Eq, ReadPrec [MonitoringSchedule]
ReadPrec MonitoringSchedule
Int -> ReadS MonitoringSchedule
ReadS [MonitoringSchedule]
(Int -> ReadS MonitoringSchedule)
-> ReadS [MonitoringSchedule]
-> ReadPrec MonitoringSchedule
-> ReadPrec [MonitoringSchedule]
-> Read MonitoringSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MonitoringSchedule]
$creadListPrec :: ReadPrec [MonitoringSchedule]
readPrec :: ReadPrec MonitoringSchedule
$creadPrec :: ReadPrec MonitoringSchedule
readList :: ReadS [MonitoringSchedule]
$creadList :: ReadS [MonitoringSchedule]
readsPrec :: Int -> ReadS MonitoringSchedule
$creadsPrec :: Int -> ReadS MonitoringSchedule
Prelude.Read, Int -> MonitoringSchedule -> ShowS
[MonitoringSchedule] -> ShowS
MonitoringSchedule -> String
(Int -> MonitoringSchedule -> ShowS)
-> (MonitoringSchedule -> String)
-> ([MonitoringSchedule] -> ShowS)
-> Show MonitoringSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MonitoringSchedule] -> ShowS
$cshowList :: [MonitoringSchedule] -> ShowS
show :: MonitoringSchedule -> String
$cshow :: MonitoringSchedule -> String
showsPrec :: Int -> MonitoringSchedule -> ShowS
$cshowsPrec :: Int -> MonitoringSchedule -> ShowS
Prelude.Show, (forall x. MonitoringSchedule -> Rep MonitoringSchedule x)
-> (forall x. Rep MonitoringSchedule x -> MonitoringSchedule)
-> Generic MonitoringSchedule
forall x. Rep MonitoringSchedule x -> MonitoringSchedule
forall x. MonitoringSchedule -> Rep MonitoringSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MonitoringSchedule x -> MonitoringSchedule
$cfrom :: forall x. MonitoringSchedule -> Rep MonitoringSchedule x
Prelude.Generic)

-- |
-- Create a value of 'MonitoringSchedule' 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:
--
-- 'creationTime', 'monitoringSchedule_creationTime' - The time that the monitoring schedule was created.
--
-- 'monitoringType', 'monitoringSchedule_monitoringType' - The type of the monitoring job definition to schedule.
--
-- 'failureReason', 'monitoringSchedule_failureReason' - If the monitoring schedule failed, the reason it failed.
--
-- 'monitoringScheduleArn', 'monitoringSchedule_monitoringScheduleArn' - The Amazon Resource Name (ARN) of the monitoring schedule.
--
-- 'endpointName', 'monitoringSchedule_endpointName' - The endpoint that hosts the model being monitored.
--
-- 'lastModifiedTime', 'monitoringSchedule_lastModifiedTime' - The last time the monitoring schedule was changed.
--
-- 'monitoringScheduleStatus', 'monitoringSchedule_monitoringScheduleStatus' - The status of the monitoring schedule. This can be one of the following
-- values.
--
-- -   @PENDING@ - The schedule is pending being created.
--
-- -   @FAILED@ - The schedule failed.
--
-- -   @SCHEDULED@ - The schedule was successfully created.
--
-- -   @STOPPED@ - The schedule was stopped.
--
-- 'lastMonitoringExecutionSummary', 'monitoringSchedule_lastMonitoringExecutionSummary' - Undocumented member.
--
-- 'monitoringScheduleConfig', 'monitoringSchedule_monitoringScheduleConfig' - Undocumented member.
--
-- 'monitoringScheduleName', 'monitoringSchedule_monitoringScheduleName' - The name of the monitoring schedule.
--
-- 'tags', 'monitoringSchedule_tags' - A list of the tags associated with the monitoring schedlue. For more
-- information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>
-- in the /Amazon Web Services General Reference Guide/.
newMonitoringSchedule ::
  MonitoringSchedule
newMonitoringSchedule :: MonitoringSchedule
newMonitoringSchedule =
  MonitoringSchedule' :: Maybe POSIX
-> Maybe MonitoringType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ScheduleStatus
-> Maybe MonitoringExecutionSummary
-> Maybe MonitoringScheduleConfig
-> Maybe Text
-> Maybe [Tag]
-> MonitoringSchedule
MonitoringSchedule'
    { $sel:creationTime:MonitoringSchedule' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:monitoringType:MonitoringSchedule' :: Maybe MonitoringType
monitoringType = Maybe MonitoringType
forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:MonitoringSchedule' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:monitoringScheduleArn:MonitoringSchedule' :: Maybe Text
monitoringScheduleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointName:MonitoringSchedule' :: Maybe Text
endpointName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:MonitoringSchedule' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:monitoringScheduleStatus:MonitoringSchedule' :: Maybe ScheduleStatus
monitoringScheduleStatus = Maybe ScheduleStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:lastMonitoringExecutionSummary:MonitoringSchedule' :: Maybe MonitoringExecutionSummary
lastMonitoringExecutionSummary = Maybe MonitoringExecutionSummary
forall a. Maybe a
Prelude.Nothing,
      $sel:monitoringScheduleConfig:MonitoringSchedule' :: Maybe MonitoringScheduleConfig
monitoringScheduleConfig = Maybe MonitoringScheduleConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:monitoringScheduleName:MonitoringSchedule' :: Maybe Text
monitoringScheduleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:MonitoringSchedule' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

-- | The time that the monitoring schedule was created.
monitoringSchedule_creationTime :: Lens.Lens' MonitoringSchedule (Prelude.Maybe Prelude.UTCTime)
monitoringSchedule_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MonitoringSchedule -> f MonitoringSchedule
monitoringSchedule_creationTime = (MonitoringSchedule -> Maybe POSIX)
-> (MonitoringSchedule -> Maybe POSIX -> MonitoringSchedule)
-> Lens
     MonitoringSchedule MonitoringSchedule (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringSchedule' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:MonitoringSchedule' :: MonitoringSchedule -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: MonitoringSchedule
s@MonitoringSchedule' {} Maybe POSIX
a -> MonitoringSchedule
s {$sel:creationTime:MonitoringSchedule' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: MonitoringSchedule) ((Maybe POSIX -> f (Maybe POSIX))
 -> MonitoringSchedule -> f MonitoringSchedule)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MonitoringSchedule
-> f MonitoringSchedule
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 the monitoring job definition to schedule.
monitoringSchedule_monitoringType :: Lens.Lens' MonitoringSchedule (Prelude.Maybe MonitoringType)
monitoringSchedule_monitoringType :: (Maybe MonitoringType -> f (Maybe MonitoringType))
-> MonitoringSchedule -> f MonitoringSchedule
monitoringSchedule_monitoringType = (MonitoringSchedule -> Maybe MonitoringType)
-> (MonitoringSchedule
    -> Maybe MonitoringType -> MonitoringSchedule)
-> Lens
     MonitoringSchedule
     MonitoringSchedule
     (Maybe MonitoringType)
     (Maybe MonitoringType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringSchedule' {Maybe MonitoringType
monitoringType :: Maybe MonitoringType
$sel:monitoringType:MonitoringSchedule' :: MonitoringSchedule -> Maybe MonitoringType
monitoringType} -> Maybe MonitoringType
monitoringType) (\s :: MonitoringSchedule
s@MonitoringSchedule' {} Maybe MonitoringType
a -> MonitoringSchedule
s {$sel:monitoringType:MonitoringSchedule' :: Maybe MonitoringType
monitoringType = Maybe MonitoringType
a} :: MonitoringSchedule)

-- | If the monitoring schedule failed, the reason it failed.
monitoringSchedule_failureReason :: Lens.Lens' MonitoringSchedule (Prelude.Maybe Prelude.Text)
monitoringSchedule_failureReason :: (Maybe Text -> f (Maybe Text))
-> MonitoringSchedule -> f MonitoringSchedule
monitoringSchedule_failureReason = (MonitoringSchedule -> Maybe Text)
-> (MonitoringSchedule -> Maybe Text -> MonitoringSchedule)
-> Lens
     MonitoringSchedule MonitoringSchedule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringSchedule' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:MonitoringSchedule' :: MonitoringSchedule -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: MonitoringSchedule
s@MonitoringSchedule' {} Maybe Text
a -> MonitoringSchedule
s {$sel:failureReason:MonitoringSchedule' :: Maybe Text
failureReason = Maybe Text
a} :: MonitoringSchedule)

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

-- | The endpoint that hosts the model being monitored.
monitoringSchedule_endpointName :: Lens.Lens' MonitoringSchedule (Prelude.Maybe Prelude.Text)
monitoringSchedule_endpointName :: (Maybe Text -> f (Maybe Text))
-> MonitoringSchedule -> f MonitoringSchedule
monitoringSchedule_endpointName = (MonitoringSchedule -> Maybe Text)
-> (MonitoringSchedule -> Maybe Text -> MonitoringSchedule)
-> Lens
     MonitoringSchedule MonitoringSchedule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringSchedule' {Maybe Text
endpointName :: Maybe Text
$sel:endpointName:MonitoringSchedule' :: MonitoringSchedule -> Maybe Text
endpointName} -> Maybe Text
endpointName) (\s :: MonitoringSchedule
s@MonitoringSchedule' {} Maybe Text
a -> MonitoringSchedule
s {$sel:endpointName:MonitoringSchedule' :: Maybe Text
endpointName = Maybe Text
a} :: MonitoringSchedule)

-- | The last time the monitoring schedule was changed.
monitoringSchedule_lastModifiedTime :: Lens.Lens' MonitoringSchedule (Prelude.Maybe Prelude.UTCTime)
monitoringSchedule_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MonitoringSchedule -> f MonitoringSchedule
monitoringSchedule_lastModifiedTime = (MonitoringSchedule -> Maybe POSIX)
-> (MonitoringSchedule -> Maybe POSIX -> MonitoringSchedule)
-> Lens
     MonitoringSchedule MonitoringSchedule (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringSchedule' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:MonitoringSchedule' :: MonitoringSchedule -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: MonitoringSchedule
s@MonitoringSchedule' {} Maybe POSIX
a -> MonitoringSchedule
s {$sel:lastModifiedTime:MonitoringSchedule' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: MonitoringSchedule) ((Maybe POSIX -> f (Maybe POSIX))
 -> MonitoringSchedule -> f MonitoringSchedule)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MonitoringSchedule
-> f MonitoringSchedule
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 status of the monitoring schedule. This can be one of the following
-- values.
--
-- -   @PENDING@ - The schedule is pending being created.
--
-- -   @FAILED@ - The schedule failed.
--
-- -   @SCHEDULED@ - The schedule was successfully created.
--
-- -   @STOPPED@ - The schedule was stopped.
monitoringSchedule_monitoringScheduleStatus :: Lens.Lens' MonitoringSchedule (Prelude.Maybe ScheduleStatus)
monitoringSchedule_monitoringScheduleStatus :: (Maybe ScheduleStatus -> f (Maybe ScheduleStatus))
-> MonitoringSchedule -> f MonitoringSchedule
monitoringSchedule_monitoringScheduleStatus = (MonitoringSchedule -> Maybe ScheduleStatus)
-> (MonitoringSchedule
    -> Maybe ScheduleStatus -> MonitoringSchedule)
-> Lens
     MonitoringSchedule
     MonitoringSchedule
     (Maybe ScheduleStatus)
     (Maybe ScheduleStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringSchedule' {Maybe ScheduleStatus
monitoringScheduleStatus :: Maybe ScheduleStatus
$sel:monitoringScheduleStatus:MonitoringSchedule' :: MonitoringSchedule -> Maybe ScheduleStatus
monitoringScheduleStatus} -> Maybe ScheduleStatus
monitoringScheduleStatus) (\s :: MonitoringSchedule
s@MonitoringSchedule' {} Maybe ScheduleStatus
a -> MonitoringSchedule
s {$sel:monitoringScheduleStatus:MonitoringSchedule' :: Maybe ScheduleStatus
monitoringScheduleStatus = Maybe ScheduleStatus
a} :: MonitoringSchedule)

-- | Undocumented member.
monitoringSchedule_lastMonitoringExecutionSummary :: Lens.Lens' MonitoringSchedule (Prelude.Maybe MonitoringExecutionSummary)
monitoringSchedule_lastMonitoringExecutionSummary :: (Maybe MonitoringExecutionSummary
 -> f (Maybe MonitoringExecutionSummary))
-> MonitoringSchedule -> f MonitoringSchedule
monitoringSchedule_lastMonitoringExecutionSummary = (MonitoringSchedule -> Maybe MonitoringExecutionSummary)
-> (MonitoringSchedule
    -> Maybe MonitoringExecutionSummary -> MonitoringSchedule)
-> Lens
     MonitoringSchedule
     MonitoringSchedule
     (Maybe MonitoringExecutionSummary)
     (Maybe MonitoringExecutionSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringSchedule' {Maybe MonitoringExecutionSummary
lastMonitoringExecutionSummary :: Maybe MonitoringExecutionSummary
$sel:lastMonitoringExecutionSummary:MonitoringSchedule' :: MonitoringSchedule -> Maybe MonitoringExecutionSummary
lastMonitoringExecutionSummary} -> Maybe MonitoringExecutionSummary
lastMonitoringExecutionSummary) (\s :: MonitoringSchedule
s@MonitoringSchedule' {} Maybe MonitoringExecutionSummary
a -> MonitoringSchedule
s {$sel:lastMonitoringExecutionSummary:MonitoringSchedule' :: Maybe MonitoringExecutionSummary
lastMonitoringExecutionSummary = Maybe MonitoringExecutionSummary
a} :: MonitoringSchedule)

-- | Undocumented member.
monitoringSchedule_monitoringScheduleConfig :: Lens.Lens' MonitoringSchedule (Prelude.Maybe MonitoringScheduleConfig)
monitoringSchedule_monitoringScheduleConfig :: (Maybe MonitoringScheduleConfig
 -> f (Maybe MonitoringScheduleConfig))
-> MonitoringSchedule -> f MonitoringSchedule
monitoringSchedule_monitoringScheduleConfig = (MonitoringSchedule -> Maybe MonitoringScheduleConfig)
-> (MonitoringSchedule
    -> Maybe MonitoringScheduleConfig -> MonitoringSchedule)
-> Lens
     MonitoringSchedule
     MonitoringSchedule
     (Maybe MonitoringScheduleConfig)
     (Maybe MonitoringScheduleConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringSchedule' {Maybe MonitoringScheduleConfig
monitoringScheduleConfig :: Maybe MonitoringScheduleConfig
$sel:monitoringScheduleConfig:MonitoringSchedule' :: MonitoringSchedule -> Maybe MonitoringScheduleConfig
monitoringScheduleConfig} -> Maybe MonitoringScheduleConfig
monitoringScheduleConfig) (\s :: MonitoringSchedule
s@MonitoringSchedule' {} Maybe MonitoringScheduleConfig
a -> MonitoringSchedule
s {$sel:monitoringScheduleConfig:MonitoringSchedule' :: Maybe MonitoringScheduleConfig
monitoringScheduleConfig = Maybe MonitoringScheduleConfig
a} :: MonitoringSchedule)

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

-- | A list of the tags associated with the monitoring schedlue. For more
-- information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>
-- in the /Amazon Web Services General Reference Guide/.
monitoringSchedule_tags :: Lens.Lens' MonitoringSchedule (Prelude.Maybe [Tag])
monitoringSchedule_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> MonitoringSchedule -> f MonitoringSchedule
monitoringSchedule_tags = (MonitoringSchedule -> Maybe [Tag])
-> (MonitoringSchedule -> Maybe [Tag] -> MonitoringSchedule)
-> Lens
     MonitoringSchedule MonitoringSchedule (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringSchedule' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:MonitoringSchedule' :: MonitoringSchedule -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: MonitoringSchedule
s@MonitoringSchedule' {} Maybe [Tag]
a -> MonitoringSchedule
s {$sel:tags:MonitoringSchedule' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: MonitoringSchedule) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> MonitoringSchedule -> f MonitoringSchedule)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> MonitoringSchedule
-> f MonitoringSchedule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON MonitoringSchedule where
  parseJSON :: Value -> Parser MonitoringSchedule
parseJSON =
    String
-> (Object -> Parser MonitoringSchedule)
-> Value
-> Parser MonitoringSchedule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MonitoringSchedule"
      ( \Object
x ->
          Maybe POSIX
-> Maybe MonitoringType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ScheduleStatus
-> Maybe MonitoringExecutionSummary
-> Maybe MonitoringScheduleConfig
-> Maybe Text
-> Maybe [Tag]
-> MonitoringSchedule
MonitoringSchedule'
            (Maybe POSIX
 -> Maybe MonitoringType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ScheduleStatus
 -> Maybe MonitoringExecutionSummary
 -> Maybe MonitoringScheduleConfig
 -> Maybe Text
 -> Maybe [Tag]
 -> MonitoringSchedule)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe MonitoringType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ScheduleStatus
      -> Maybe MonitoringExecutionSummary
      -> Maybe MonitoringScheduleConfig
      -> Maybe Text
      -> Maybe [Tag]
      -> MonitoringSchedule)
forall (f :: * -> *) a b. Functor 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
"CreationTime")
            Parser
  (Maybe MonitoringType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ScheduleStatus
   -> Maybe MonitoringExecutionSummary
   -> Maybe MonitoringScheduleConfig
   -> Maybe Text
   -> Maybe [Tag]
   -> MonitoringSchedule)
-> Parser (Maybe MonitoringType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ScheduleStatus
      -> Maybe MonitoringExecutionSummary
      -> Maybe MonitoringScheduleConfig
      -> Maybe Text
      -> Maybe [Tag]
      -> MonitoringSchedule)
forall (f :: * -> *) a b. Applicative f => 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 POSIX
   -> Maybe ScheduleStatus
   -> Maybe MonitoringExecutionSummary
   -> Maybe MonitoringScheduleConfig
   -> Maybe Text
   -> Maybe [Tag]
   -> MonitoringSchedule)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ScheduleStatus
      -> Maybe MonitoringExecutionSummary
      -> Maybe MonitoringScheduleConfig
      -> Maybe Text
      -> Maybe [Tag]
      -> MonitoringSchedule)
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 POSIX
   -> Maybe ScheduleStatus
   -> Maybe MonitoringExecutionSummary
   -> Maybe MonitoringScheduleConfig
   -> Maybe Text
   -> Maybe [Tag]
   -> MonitoringSchedule)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ScheduleStatus
      -> Maybe MonitoringExecutionSummary
      -> Maybe MonitoringScheduleConfig
      -> Maybe Text
      -> Maybe [Tag]
      -> MonitoringSchedule)
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
"MonitoringScheduleArn")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe ScheduleStatus
   -> Maybe MonitoringExecutionSummary
   -> Maybe MonitoringScheduleConfig
   -> Maybe Text
   -> Maybe [Tag]
   -> MonitoringSchedule)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ScheduleStatus
      -> Maybe MonitoringExecutionSummary
      -> Maybe MonitoringScheduleConfig
      -> Maybe Text
      -> Maybe [Tag]
      -> MonitoringSchedule)
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 POSIX
   -> Maybe ScheduleStatus
   -> Maybe MonitoringExecutionSummary
   -> Maybe MonitoringScheduleConfig
   -> Maybe Text
   -> Maybe [Tag]
   -> MonitoringSchedule)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ScheduleStatus
      -> Maybe MonitoringExecutionSummary
      -> Maybe MonitoringScheduleConfig
      -> Maybe Text
      -> Maybe [Tag]
      -> MonitoringSchedule)
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
"LastModifiedTime")
            Parser
  (Maybe ScheduleStatus
   -> Maybe MonitoringExecutionSummary
   -> Maybe MonitoringScheduleConfig
   -> Maybe Text
   -> Maybe [Tag]
   -> MonitoringSchedule)
-> Parser (Maybe ScheduleStatus)
-> Parser
     (Maybe MonitoringExecutionSummary
      -> Maybe MonitoringScheduleConfig
      -> Maybe Text
      -> Maybe [Tag]
      -> MonitoringSchedule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ScheduleStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MonitoringScheduleStatus")
            Parser
  (Maybe MonitoringExecutionSummary
   -> Maybe MonitoringScheduleConfig
   -> Maybe Text
   -> Maybe [Tag]
   -> MonitoringSchedule)
-> Parser (Maybe MonitoringExecutionSummary)
-> Parser
     (Maybe MonitoringScheduleConfig
      -> Maybe Text -> Maybe [Tag] -> MonitoringSchedule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MonitoringExecutionSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastMonitoringExecutionSummary")
            Parser
  (Maybe MonitoringScheduleConfig
   -> Maybe Text -> Maybe [Tag] -> MonitoringSchedule)
-> Parser (Maybe MonitoringScheduleConfig)
-> Parser (Maybe Text -> Maybe [Tag] -> MonitoringSchedule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MonitoringScheduleConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MonitoringScheduleConfig")
            Parser (Maybe Text -> Maybe [Tag] -> MonitoringSchedule)
-> Parser (Maybe Text)
-> Parser (Maybe [Tag] -> MonitoringSchedule)
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
"MonitoringScheduleName")
            Parser (Maybe [Tag] -> MonitoringSchedule)
-> Parser (Maybe [Tag]) -> Parser MonitoringSchedule
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable MonitoringSchedule

instance Prelude.NFData MonitoringSchedule