{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.ListMonitoringSchedules
-- 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)
--
-- Returns list of all monitoring schedules.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListMonitoringSchedules
  ( -- * Creating a Request
    ListMonitoringSchedules (..),
    newListMonitoringSchedules,

    -- * Request Lenses
    listMonitoringSchedules_nameContains,
    listMonitoringSchedules_endpointName,
    listMonitoringSchedules_lastModifiedTimeBefore,
    listMonitoringSchedules_creationTimeAfter,
    listMonitoringSchedules_nextToken,
    listMonitoringSchedules_sortOrder,
    listMonitoringSchedules_lastModifiedTimeAfter,
    listMonitoringSchedules_creationTimeBefore,
    listMonitoringSchedules_statusEquals,
    listMonitoringSchedules_monitoringTypeEquals,
    listMonitoringSchedules_maxResults,
    listMonitoringSchedules_sortBy,
    listMonitoringSchedules_monitoringJobDefinitionName,

    -- * Destructuring the Response
    ListMonitoringSchedulesResponse (..),
    newListMonitoringSchedulesResponse,

    -- * Response Lenses
    listMonitoringSchedulesResponse_nextToken,
    listMonitoringSchedulesResponse_httpStatus,
    listMonitoringSchedulesResponse_monitoringScheduleSummaries,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types

-- | /See:/ 'newListMonitoringSchedules' smart constructor.
data ListMonitoringSchedules = ListMonitoringSchedules'
  { -- | Filter for monitoring schedules whose name contains a specified string.
    ListMonitoringSchedules -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
    -- | Name of a specific endpoint to fetch schedules for.
    ListMonitoringSchedules -> Maybe Text
endpointName :: Prelude.Maybe Prelude.Text,
    -- | A filter that returns only monitoring schedules modified before a
    -- specified time.
    ListMonitoringSchedules -> Maybe POSIX
lastModifiedTimeBefore :: Prelude.Maybe Core.POSIX,
    -- | A filter that returns only monitoring schedules created after a
    -- specified time.
    ListMonitoringSchedules -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Core.POSIX,
    -- | The token returned if the response is truncated. To retrieve the next
    -- set of job executions, use it in the next request.
    ListMonitoringSchedules -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Whether to sort the results in @Ascending@ or @Descending@ order. The
    -- default is @Descending@.
    ListMonitoringSchedules -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
    -- | A filter that returns only monitoring schedules modified after a
    -- specified time.
    ListMonitoringSchedules -> Maybe POSIX
lastModifiedTimeAfter :: Prelude.Maybe Core.POSIX,
    -- | A filter that returns only monitoring schedules created before a
    -- specified time.
    ListMonitoringSchedules -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Core.POSIX,
    -- | A filter that returns only monitoring schedules modified before a
    -- specified time.
    ListMonitoringSchedules -> Maybe ScheduleStatus
statusEquals :: Prelude.Maybe ScheduleStatus,
    -- | A filter that returns only the monitoring schedules for the specified
    -- monitoring type.
    ListMonitoringSchedules -> Maybe MonitoringType
monitoringTypeEquals :: Prelude.Maybe MonitoringType,
    -- | The maximum number of jobs to return in the response. The default value
    -- is 10.
    ListMonitoringSchedules -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Whether to sort results by @Status@, @CreationTime@, @ScheduledTime@
    -- field. The default is @CreationTime@.
    ListMonitoringSchedules -> Maybe MonitoringScheduleSortKey
sortBy :: Prelude.Maybe MonitoringScheduleSortKey,
    -- | Gets a list of the monitoring schedules for the specified monitoring job
    -- definition.
    ListMonitoringSchedules -> Maybe Text
monitoringJobDefinitionName :: Prelude.Maybe Prelude.Text
  }
  deriving (ListMonitoringSchedules -> ListMonitoringSchedules -> Bool
(ListMonitoringSchedules -> ListMonitoringSchedules -> Bool)
-> (ListMonitoringSchedules -> ListMonitoringSchedules -> Bool)
-> Eq ListMonitoringSchedules
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMonitoringSchedules -> ListMonitoringSchedules -> Bool
$c/= :: ListMonitoringSchedules -> ListMonitoringSchedules -> Bool
== :: ListMonitoringSchedules -> ListMonitoringSchedules -> Bool
$c== :: ListMonitoringSchedules -> ListMonitoringSchedules -> Bool
Prelude.Eq, ReadPrec [ListMonitoringSchedules]
ReadPrec ListMonitoringSchedules
Int -> ReadS ListMonitoringSchedules
ReadS [ListMonitoringSchedules]
(Int -> ReadS ListMonitoringSchedules)
-> ReadS [ListMonitoringSchedules]
-> ReadPrec ListMonitoringSchedules
-> ReadPrec [ListMonitoringSchedules]
-> Read ListMonitoringSchedules
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMonitoringSchedules]
$creadListPrec :: ReadPrec [ListMonitoringSchedules]
readPrec :: ReadPrec ListMonitoringSchedules
$creadPrec :: ReadPrec ListMonitoringSchedules
readList :: ReadS [ListMonitoringSchedules]
$creadList :: ReadS [ListMonitoringSchedules]
readsPrec :: Int -> ReadS ListMonitoringSchedules
$creadsPrec :: Int -> ReadS ListMonitoringSchedules
Prelude.Read, Int -> ListMonitoringSchedules -> ShowS
[ListMonitoringSchedules] -> ShowS
ListMonitoringSchedules -> String
(Int -> ListMonitoringSchedules -> ShowS)
-> (ListMonitoringSchedules -> String)
-> ([ListMonitoringSchedules] -> ShowS)
-> Show ListMonitoringSchedules
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMonitoringSchedules] -> ShowS
$cshowList :: [ListMonitoringSchedules] -> ShowS
show :: ListMonitoringSchedules -> String
$cshow :: ListMonitoringSchedules -> String
showsPrec :: Int -> ListMonitoringSchedules -> ShowS
$cshowsPrec :: Int -> ListMonitoringSchedules -> ShowS
Prelude.Show, (forall x.
 ListMonitoringSchedules -> Rep ListMonitoringSchedules x)
-> (forall x.
    Rep ListMonitoringSchedules x -> ListMonitoringSchedules)
-> Generic ListMonitoringSchedules
forall x. Rep ListMonitoringSchedules x -> ListMonitoringSchedules
forall x. ListMonitoringSchedules -> Rep ListMonitoringSchedules x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMonitoringSchedules x -> ListMonitoringSchedules
$cfrom :: forall x. ListMonitoringSchedules -> Rep ListMonitoringSchedules x
Prelude.Generic)

-- |
-- Create a value of 'ListMonitoringSchedules' 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:
--
-- 'nameContains', 'listMonitoringSchedules_nameContains' - Filter for monitoring schedules whose name contains a specified string.
--
-- 'endpointName', 'listMonitoringSchedules_endpointName' - Name of a specific endpoint to fetch schedules for.
--
-- 'lastModifiedTimeBefore', 'listMonitoringSchedules_lastModifiedTimeBefore' - A filter that returns only monitoring schedules modified before a
-- specified time.
--
-- 'creationTimeAfter', 'listMonitoringSchedules_creationTimeAfter' - A filter that returns only monitoring schedules created after a
-- specified time.
--
-- 'nextToken', 'listMonitoringSchedules_nextToken' - The token returned if the response is truncated. To retrieve the next
-- set of job executions, use it in the next request.
--
-- 'sortOrder', 'listMonitoringSchedules_sortOrder' - Whether to sort the results in @Ascending@ or @Descending@ order. The
-- default is @Descending@.
--
-- 'lastModifiedTimeAfter', 'listMonitoringSchedules_lastModifiedTimeAfter' - A filter that returns only monitoring schedules modified after a
-- specified time.
--
-- 'creationTimeBefore', 'listMonitoringSchedules_creationTimeBefore' - A filter that returns only monitoring schedules created before a
-- specified time.
--
-- 'statusEquals', 'listMonitoringSchedules_statusEquals' - A filter that returns only monitoring schedules modified before a
-- specified time.
--
-- 'monitoringTypeEquals', 'listMonitoringSchedules_monitoringTypeEquals' - A filter that returns only the monitoring schedules for the specified
-- monitoring type.
--
-- 'maxResults', 'listMonitoringSchedules_maxResults' - The maximum number of jobs to return in the response. The default value
-- is 10.
--
-- 'sortBy', 'listMonitoringSchedules_sortBy' - Whether to sort results by @Status@, @CreationTime@, @ScheduledTime@
-- field. The default is @CreationTime@.
--
-- 'monitoringJobDefinitionName', 'listMonitoringSchedules_monitoringJobDefinitionName' - Gets a list of the monitoring schedules for the specified monitoring job
-- definition.
newListMonitoringSchedules ::
  ListMonitoringSchedules
newListMonitoringSchedules :: ListMonitoringSchedules
newListMonitoringSchedules =
  ListMonitoringSchedules' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe SortOrder
-> Maybe POSIX
-> Maybe POSIX
-> Maybe ScheduleStatus
-> Maybe MonitoringType
-> Maybe Natural
-> Maybe MonitoringScheduleSortKey
-> Maybe Text
-> ListMonitoringSchedules
ListMonitoringSchedules'
    { $sel:nameContains:ListMonitoringSchedules' :: Maybe Text
nameContains =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointName:ListMonitoringSchedules' :: Maybe Text
endpointName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeBefore:ListMonitoringSchedules' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeAfter:ListMonitoringSchedules' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMonitoringSchedules' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListMonitoringSchedules' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeAfter:ListMonitoringSchedules' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListMonitoringSchedules' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:statusEquals:ListMonitoringSchedules' :: Maybe ScheduleStatus
statusEquals = Maybe ScheduleStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:monitoringTypeEquals:ListMonitoringSchedules' :: Maybe MonitoringType
monitoringTypeEquals = Maybe MonitoringType
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMonitoringSchedules' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListMonitoringSchedules' :: Maybe MonitoringScheduleSortKey
sortBy = Maybe MonitoringScheduleSortKey
forall a. Maybe a
Prelude.Nothing,
      $sel:monitoringJobDefinitionName:ListMonitoringSchedules' :: Maybe Text
monitoringJobDefinitionName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Filter for monitoring schedules whose name contains a specified string.
listMonitoringSchedules_nameContains :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe Prelude.Text)
listMonitoringSchedules_nameContains :: (Maybe Text -> f (Maybe Text))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_nameContains = (ListMonitoringSchedules -> Maybe Text)
-> (ListMonitoringSchedules
    -> Maybe Text -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe Text
a -> ListMonitoringSchedules
s {$sel:nameContains:ListMonitoringSchedules' :: Maybe Text
nameContains = Maybe Text
a} :: ListMonitoringSchedules)

-- | Name of a specific endpoint to fetch schedules for.
listMonitoringSchedules_endpointName :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe Prelude.Text)
listMonitoringSchedules_endpointName :: (Maybe Text -> f (Maybe Text))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_endpointName = (ListMonitoringSchedules -> Maybe Text)
-> (ListMonitoringSchedules
    -> Maybe Text -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe Text
endpointName :: Maybe Text
$sel:endpointName:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe Text
endpointName} -> Maybe Text
endpointName) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe Text
a -> ListMonitoringSchedules
s {$sel:endpointName:ListMonitoringSchedules' :: Maybe Text
endpointName = Maybe Text
a} :: ListMonitoringSchedules)

-- | A filter that returns only monitoring schedules modified before a
-- specified time.
listMonitoringSchedules_lastModifiedTimeBefore :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe Prelude.UTCTime)
listMonitoringSchedules_lastModifiedTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_lastModifiedTimeBefore = (ListMonitoringSchedules -> Maybe POSIX)
-> (ListMonitoringSchedules
    -> Maybe POSIX -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
$sel:lastModifiedTimeBefore:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe POSIX
lastModifiedTimeBefore} -> Maybe POSIX
lastModifiedTimeBefore) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe POSIX
a -> ListMonitoringSchedules
s {$sel:lastModifiedTimeBefore:ListMonitoringSchedules' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
a} :: ListMonitoringSchedules) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListMonitoringSchedules -> f ListMonitoringSchedules)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListMonitoringSchedules
-> f ListMonitoringSchedules
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

-- | A filter that returns only monitoring schedules created after a
-- specified time.
listMonitoringSchedules_creationTimeAfter :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe Prelude.UTCTime)
listMonitoringSchedules_creationTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_creationTimeAfter = (ListMonitoringSchedules -> Maybe POSIX)
-> (ListMonitoringSchedules
    -> Maybe POSIX -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe POSIX
a -> ListMonitoringSchedules
s {$sel:creationTimeAfter:ListMonitoringSchedules' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListMonitoringSchedules) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListMonitoringSchedules -> f ListMonitoringSchedules)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListMonitoringSchedules
-> f ListMonitoringSchedules
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 token returned if the response is truncated. To retrieve the next
-- set of job executions, use it in the next request.
listMonitoringSchedules_nextToken :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe Prelude.Text)
listMonitoringSchedules_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_nextToken = (ListMonitoringSchedules -> Maybe Text)
-> (ListMonitoringSchedules
    -> Maybe Text -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe Text
a -> ListMonitoringSchedules
s {$sel:nextToken:ListMonitoringSchedules' :: Maybe Text
nextToken = Maybe Text
a} :: ListMonitoringSchedules)

-- | Whether to sort the results in @Ascending@ or @Descending@ order. The
-- default is @Descending@.
listMonitoringSchedules_sortOrder :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe SortOrder)
listMonitoringSchedules_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_sortOrder = (ListMonitoringSchedules -> Maybe SortOrder)
-> (ListMonitoringSchedules
    -> Maybe SortOrder -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe SortOrder)
     (Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe SortOrder
a -> ListMonitoringSchedules
s {$sel:sortOrder:ListMonitoringSchedules' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListMonitoringSchedules)

-- | A filter that returns only monitoring schedules modified after a
-- specified time.
listMonitoringSchedules_lastModifiedTimeAfter :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe Prelude.UTCTime)
listMonitoringSchedules_lastModifiedTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_lastModifiedTimeAfter = (ListMonitoringSchedules -> Maybe POSIX)
-> (ListMonitoringSchedules
    -> Maybe POSIX -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
$sel:lastModifiedTimeAfter:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe POSIX
lastModifiedTimeAfter} -> Maybe POSIX
lastModifiedTimeAfter) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe POSIX
a -> ListMonitoringSchedules
s {$sel:lastModifiedTimeAfter:ListMonitoringSchedules' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
a} :: ListMonitoringSchedules) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListMonitoringSchedules -> f ListMonitoringSchedules)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListMonitoringSchedules
-> f ListMonitoringSchedules
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

-- | A filter that returns only monitoring schedules created before a
-- specified time.
listMonitoringSchedules_creationTimeBefore :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe Prelude.UTCTime)
listMonitoringSchedules_creationTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_creationTimeBefore = (ListMonitoringSchedules -> Maybe POSIX)
-> (ListMonitoringSchedules
    -> Maybe POSIX -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe POSIX
a -> ListMonitoringSchedules
s {$sel:creationTimeBefore:ListMonitoringSchedules' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListMonitoringSchedules) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListMonitoringSchedules -> f ListMonitoringSchedules)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListMonitoringSchedules
-> f ListMonitoringSchedules
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

-- | A filter that returns only monitoring schedules modified before a
-- specified time.
listMonitoringSchedules_statusEquals :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe ScheduleStatus)
listMonitoringSchedules_statusEquals :: (Maybe ScheduleStatus -> f (Maybe ScheduleStatus))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_statusEquals = (ListMonitoringSchedules -> Maybe ScheduleStatus)
-> (ListMonitoringSchedules
    -> Maybe ScheduleStatus -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe ScheduleStatus)
     (Maybe ScheduleStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe ScheduleStatus
statusEquals :: Maybe ScheduleStatus
$sel:statusEquals:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe ScheduleStatus
statusEquals} -> Maybe ScheduleStatus
statusEquals) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe ScheduleStatus
a -> ListMonitoringSchedules
s {$sel:statusEquals:ListMonitoringSchedules' :: Maybe ScheduleStatus
statusEquals = Maybe ScheduleStatus
a} :: ListMonitoringSchedules)

-- | A filter that returns only the monitoring schedules for the specified
-- monitoring type.
listMonitoringSchedules_monitoringTypeEquals :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe MonitoringType)
listMonitoringSchedules_monitoringTypeEquals :: (Maybe MonitoringType -> f (Maybe MonitoringType))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_monitoringTypeEquals = (ListMonitoringSchedules -> Maybe MonitoringType)
-> (ListMonitoringSchedules
    -> Maybe MonitoringType -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe MonitoringType)
     (Maybe MonitoringType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe MonitoringType
monitoringTypeEquals :: Maybe MonitoringType
$sel:monitoringTypeEquals:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe MonitoringType
monitoringTypeEquals} -> Maybe MonitoringType
monitoringTypeEquals) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe MonitoringType
a -> ListMonitoringSchedules
s {$sel:monitoringTypeEquals:ListMonitoringSchedules' :: Maybe MonitoringType
monitoringTypeEquals = Maybe MonitoringType
a} :: ListMonitoringSchedules)

-- | The maximum number of jobs to return in the response. The default value
-- is 10.
listMonitoringSchedules_maxResults :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe Prelude.Natural)
listMonitoringSchedules_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_maxResults = (ListMonitoringSchedules -> Maybe Natural)
-> (ListMonitoringSchedules
    -> Maybe Natural -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe Natural
a -> ListMonitoringSchedules
s {$sel:maxResults:ListMonitoringSchedules' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMonitoringSchedules)

-- | Whether to sort results by @Status@, @CreationTime@, @ScheduledTime@
-- field. The default is @CreationTime@.
listMonitoringSchedules_sortBy :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe MonitoringScheduleSortKey)
listMonitoringSchedules_sortBy :: (Maybe MonitoringScheduleSortKey
 -> f (Maybe MonitoringScheduleSortKey))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_sortBy = (ListMonitoringSchedules -> Maybe MonitoringScheduleSortKey)
-> (ListMonitoringSchedules
    -> Maybe MonitoringScheduleSortKey -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe MonitoringScheduleSortKey)
     (Maybe MonitoringScheduleSortKey)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe MonitoringScheduleSortKey
sortBy :: Maybe MonitoringScheduleSortKey
$sel:sortBy:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe MonitoringScheduleSortKey
sortBy} -> Maybe MonitoringScheduleSortKey
sortBy) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe MonitoringScheduleSortKey
a -> ListMonitoringSchedules
s {$sel:sortBy:ListMonitoringSchedules' :: Maybe MonitoringScheduleSortKey
sortBy = Maybe MonitoringScheduleSortKey
a} :: ListMonitoringSchedules)

-- | Gets a list of the monitoring schedules for the specified monitoring job
-- definition.
listMonitoringSchedules_monitoringJobDefinitionName :: Lens.Lens' ListMonitoringSchedules (Prelude.Maybe Prelude.Text)
listMonitoringSchedules_monitoringJobDefinitionName :: (Maybe Text -> f (Maybe Text))
-> ListMonitoringSchedules -> f ListMonitoringSchedules
listMonitoringSchedules_monitoringJobDefinitionName = (ListMonitoringSchedules -> Maybe Text)
-> (ListMonitoringSchedules
    -> Maybe Text -> ListMonitoringSchedules)
-> Lens
     ListMonitoringSchedules
     ListMonitoringSchedules
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedules' {Maybe Text
monitoringJobDefinitionName :: Maybe Text
$sel:monitoringJobDefinitionName:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe Text
monitoringJobDefinitionName} -> Maybe Text
monitoringJobDefinitionName) (\s :: ListMonitoringSchedules
s@ListMonitoringSchedules' {} Maybe Text
a -> ListMonitoringSchedules
s {$sel:monitoringJobDefinitionName:ListMonitoringSchedules' :: Maybe Text
monitoringJobDefinitionName = Maybe Text
a} :: ListMonitoringSchedules)

instance Core.AWSPager ListMonitoringSchedules where
  page :: ListMonitoringSchedules
-> AWSResponse ListMonitoringSchedules
-> Maybe ListMonitoringSchedules
page ListMonitoringSchedules
rq AWSResponse ListMonitoringSchedules
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMonitoringSchedules
ListMonitoringSchedulesResponse
rs
            ListMonitoringSchedulesResponse
-> Getting (First Text) ListMonitoringSchedulesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListMonitoringSchedulesResponse
-> Const (First Text) ListMonitoringSchedulesResponse
Lens' ListMonitoringSchedulesResponse (Maybe Text)
listMonitoringSchedulesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListMonitoringSchedulesResponse
 -> Const (First Text) ListMonitoringSchedulesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListMonitoringSchedulesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListMonitoringSchedules
forall a. Maybe a
Prelude.Nothing
    | [MonitoringScheduleSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMonitoringSchedules
ListMonitoringSchedulesResponse
rs
            ListMonitoringSchedulesResponse
-> Getting
     [MonitoringScheduleSummary]
     ListMonitoringSchedulesResponse
     [MonitoringScheduleSummary]
-> [MonitoringScheduleSummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
  [MonitoringScheduleSummary]
  ListMonitoringSchedulesResponse
  [MonitoringScheduleSummary]
Lens' ListMonitoringSchedulesResponse [MonitoringScheduleSummary]
listMonitoringSchedulesResponse_monitoringScheduleSummaries
        ) =
      Maybe ListMonitoringSchedules
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListMonitoringSchedules -> Maybe ListMonitoringSchedules
forall a. a -> Maybe a
Prelude.Just (ListMonitoringSchedules -> Maybe ListMonitoringSchedules)
-> ListMonitoringSchedules -> Maybe ListMonitoringSchedules
forall a b. (a -> b) -> a -> b
Prelude.$
        ListMonitoringSchedules
rq
          ListMonitoringSchedules
-> (ListMonitoringSchedules -> ListMonitoringSchedules)
-> ListMonitoringSchedules
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListMonitoringSchedules -> Identity ListMonitoringSchedules
Lens
  ListMonitoringSchedules
  ListMonitoringSchedules
  (Maybe Text)
  (Maybe Text)
listMonitoringSchedules_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListMonitoringSchedules -> Identity ListMonitoringSchedules)
-> Maybe Text -> ListMonitoringSchedules -> ListMonitoringSchedules
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListMonitoringSchedules
ListMonitoringSchedulesResponse
rs
          ListMonitoringSchedulesResponse
-> Getting (First Text) ListMonitoringSchedulesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListMonitoringSchedulesResponse
-> Const (First Text) ListMonitoringSchedulesResponse
Lens' ListMonitoringSchedulesResponse (Maybe Text)
listMonitoringSchedulesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListMonitoringSchedulesResponse
 -> Const (First Text) ListMonitoringSchedulesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListMonitoringSchedulesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListMonitoringSchedules where
  type
    AWSResponse ListMonitoringSchedules =
      ListMonitoringSchedulesResponse
  request :: ListMonitoringSchedules -> Request ListMonitoringSchedules
request = Service
-> ListMonitoringSchedules -> Request ListMonitoringSchedules
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListMonitoringSchedules
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListMonitoringSchedules)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListMonitoringSchedules))
-> Logger
-> Service
-> Proxy ListMonitoringSchedules
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListMonitoringSchedules)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Int
-> [MonitoringScheduleSummary]
-> ListMonitoringSchedulesResponse
ListMonitoringSchedulesResponse'
            (Maybe Text
 -> Int
 -> [MonitoringScheduleSummary]
 -> ListMonitoringSchedulesResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> [MonitoringScheduleSummary] -> ListMonitoringSchedulesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String
  (Int
   -> [MonitoringScheduleSummary] -> ListMonitoringSchedulesResponse)
-> Either String Int
-> Either
     String
     ([MonitoringScheduleSummary] -> ListMonitoringSchedulesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  ([MonitoringScheduleSummary] -> ListMonitoringSchedulesResponse)
-> Either String [MonitoringScheduleSummary]
-> Either String ListMonitoringSchedulesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [MonitoringScheduleSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MonitoringScheduleSummaries"
                            Either String (Maybe [MonitoringScheduleSummary])
-> [MonitoringScheduleSummary]
-> Either String [MonitoringScheduleSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [MonitoringScheduleSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable ListMonitoringSchedules

instance Prelude.NFData ListMonitoringSchedules

instance Core.ToHeaders ListMonitoringSchedules where
  toHeaders :: ListMonitoringSchedules -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListMonitoringSchedules -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SageMaker.ListMonitoringSchedules" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON ListMonitoringSchedules where
  toJSON :: ListMonitoringSchedules -> Value
toJSON ListMonitoringSchedules' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe MonitoringScheduleSortKey
Maybe MonitoringType
Maybe ScheduleStatus
Maybe SortOrder
monitoringJobDefinitionName :: Maybe Text
sortBy :: Maybe MonitoringScheduleSortKey
maxResults :: Maybe Natural
monitoringTypeEquals :: Maybe MonitoringType
statusEquals :: Maybe ScheduleStatus
creationTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
creationTimeAfter :: Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
endpointName :: Maybe Text
nameContains :: Maybe Text
$sel:monitoringJobDefinitionName:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe Text
$sel:sortBy:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe MonitoringScheduleSortKey
$sel:maxResults:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe Natural
$sel:monitoringTypeEquals:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe MonitoringType
$sel:statusEquals:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe ScheduleStatus
$sel:creationTimeBefore:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe POSIX
$sel:sortOrder:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe SortOrder
$sel:nextToken:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe Text
$sel:creationTimeAfter:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe POSIX
$sel:lastModifiedTimeBefore:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe POSIX
$sel:endpointName:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe Text
$sel:nameContains:ListMonitoringSchedules' :: ListMonitoringSchedules -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NameContains" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nameContains,
            (Text
"EndpointName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
endpointName,
            (Text
"LastModifiedTimeBefore" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
lastModifiedTimeBefore,
            (Text
"CreationTimeAfter" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeAfter,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"SortOrder" Text -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
            (Text
"LastModifiedTimeAfter" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
lastModifiedTimeAfter,
            (Text
"CreationTimeBefore" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeBefore,
            (Text
"StatusEquals" Text -> ScheduleStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ScheduleStatus -> Pair) -> Maybe ScheduleStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScheduleStatus
statusEquals,
            (Text
"MonitoringTypeEquals" Text -> MonitoringType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MonitoringType -> Pair) -> Maybe MonitoringType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MonitoringType
monitoringTypeEquals,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Text
"SortBy" Text -> MonitoringScheduleSortKey -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MonitoringScheduleSortKey -> Pair)
-> Maybe MonitoringScheduleSortKey -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MonitoringScheduleSortKey
sortBy,
            (Text
"MonitoringJobDefinitionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
monitoringJobDefinitionName
          ]
      )

instance Core.ToPath ListMonitoringSchedules where
  toPath :: ListMonitoringSchedules -> ByteString
toPath = ByteString -> ListMonitoringSchedules -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery ListMonitoringSchedules where
  toQuery :: ListMonitoringSchedules -> QueryString
toQuery = QueryString -> ListMonitoringSchedules -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListMonitoringSchedulesResponse' smart constructor.
data ListMonitoringSchedulesResponse = ListMonitoringSchedulesResponse'
  { -- | If the response is truncated, Amazon SageMaker returns this token. To
    -- retrieve the next set of jobs, use it in the subsequent request.
    ListMonitoringSchedulesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListMonitoringSchedulesResponse -> Int
httpStatus :: Prelude.Int,
    -- | A JSON array in which each element is a summary for a monitoring
    -- schedule.
    ListMonitoringSchedulesResponse -> [MonitoringScheduleSummary]
monitoringScheduleSummaries :: [MonitoringScheduleSummary]
  }
  deriving (ListMonitoringSchedulesResponse
-> ListMonitoringSchedulesResponse -> Bool
(ListMonitoringSchedulesResponse
 -> ListMonitoringSchedulesResponse -> Bool)
-> (ListMonitoringSchedulesResponse
    -> ListMonitoringSchedulesResponse -> Bool)
-> Eq ListMonitoringSchedulesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMonitoringSchedulesResponse
-> ListMonitoringSchedulesResponse -> Bool
$c/= :: ListMonitoringSchedulesResponse
-> ListMonitoringSchedulesResponse -> Bool
== :: ListMonitoringSchedulesResponse
-> ListMonitoringSchedulesResponse -> Bool
$c== :: ListMonitoringSchedulesResponse
-> ListMonitoringSchedulesResponse -> Bool
Prelude.Eq, ReadPrec [ListMonitoringSchedulesResponse]
ReadPrec ListMonitoringSchedulesResponse
Int -> ReadS ListMonitoringSchedulesResponse
ReadS [ListMonitoringSchedulesResponse]
(Int -> ReadS ListMonitoringSchedulesResponse)
-> ReadS [ListMonitoringSchedulesResponse]
-> ReadPrec ListMonitoringSchedulesResponse
-> ReadPrec [ListMonitoringSchedulesResponse]
-> Read ListMonitoringSchedulesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMonitoringSchedulesResponse]
$creadListPrec :: ReadPrec [ListMonitoringSchedulesResponse]
readPrec :: ReadPrec ListMonitoringSchedulesResponse
$creadPrec :: ReadPrec ListMonitoringSchedulesResponse
readList :: ReadS [ListMonitoringSchedulesResponse]
$creadList :: ReadS [ListMonitoringSchedulesResponse]
readsPrec :: Int -> ReadS ListMonitoringSchedulesResponse
$creadsPrec :: Int -> ReadS ListMonitoringSchedulesResponse
Prelude.Read, Int -> ListMonitoringSchedulesResponse -> ShowS
[ListMonitoringSchedulesResponse] -> ShowS
ListMonitoringSchedulesResponse -> String
(Int -> ListMonitoringSchedulesResponse -> ShowS)
-> (ListMonitoringSchedulesResponse -> String)
-> ([ListMonitoringSchedulesResponse] -> ShowS)
-> Show ListMonitoringSchedulesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMonitoringSchedulesResponse] -> ShowS
$cshowList :: [ListMonitoringSchedulesResponse] -> ShowS
show :: ListMonitoringSchedulesResponse -> String
$cshow :: ListMonitoringSchedulesResponse -> String
showsPrec :: Int -> ListMonitoringSchedulesResponse -> ShowS
$cshowsPrec :: Int -> ListMonitoringSchedulesResponse -> ShowS
Prelude.Show, (forall x.
 ListMonitoringSchedulesResponse
 -> Rep ListMonitoringSchedulesResponse x)
-> (forall x.
    Rep ListMonitoringSchedulesResponse x
    -> ListMonitoringSchedulesResponse)
-> Generic ListMonitoringSchedulesResponse
forall x.
Rep ListMonitoringSchedulesResponse x
-> ListMonitoringSchedulesResponse
forall x.
ListMonitoringSchedulesResponse
-> Rep ListMonitoringSchedulesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMonitoringSchedulesResponse x
-> ListMonitoringSchedulesResponse
$cfrom :: forall x.
ListMonitoringSchedulesResponse
-> Rep ListMonitoringSchedulesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMonitoringSchedulesResponse' 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:
--
-- 'nextToken', 'listMonitoringSchedulesResponse_nextToken' - If the response is truncated, Amazon SageMaker returns this token. To
-- retrieve the next set of jobs, use it in the subsequent request.
--
-- 'httpStatus', 'listMonitoringSchedulesResponse_httpStatus' - The response's http status code.
--
-- 'monitoringScheduleSummaries', 'listMonitoringSchedulesResponse_monitoringScheduleSummaries' - A JSON array in which each element is a summary for a monitoring
-- schedule.
newListMonitoringSchedulesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMonitoringSchedulesResponse
newListMonitoringSchedulesResponse :: Int -> ListMonitoringSchedulesResponse
newListMonitoringSchedulesResponse Int
pHttpStatus_ =
  ListMonitoringSchedulesResponse' :: Maybe Text
-> Int
-> [MonitoringScheduleSummary]
-> ListMonitoringSchedulesResponse
ListMonitoringSchedulesResponse'
    { $sel:nextToken:ListMonitoringSchedulesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMonitoringSchedulesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:monitoringScheduleSummaries:ListMonitoringSchedulesResponse' :: [MonitoringScheduleSummary]
monitoringScheduleSummaries =
        [MonitoringScheduleSummary]
forall a. Monoid a => a
Prelude.mempty
    }

-- | If the response is truncated, Amazon SageMaker returns this token. To
-- retrieve the next set of jobs, use it in the subsequent request.
listMonitoringSchedulesResponse_nextToken :: Lens.Lens' ListMonitoringSchedulesResponse (Prelude.Maybe Prelude.Text)
listMonitoringSchedulesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMonitoringSchedulesResponse
-> f ListMonitoringSchedulesResponse
listMonitoringSchedulesResponse_nextToken = (ListMonitoringSchedulesResponse -> Maybe Text)
-> (ListMonitoringSchedulesResponse
    -> Maybe Text -> ListMonitoringSchedulesResponse)
-> Lens' ListMonitoringSchedulesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedulesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMonitoringSchedulesResponse' :: ListMonitoringSchedulesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMonitoringSchedulesResponse
s@ListMonitoringSchedulesResponse' {} Maybe Text
a -> ListMonitoringSchedulesResponse
s {$sel:nextToken:ListMonitoringSchedulesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMonitoringSchedulesResponse)

-- | The response's http status code.
listMonitoringSchedulesResponse_httpStatus :: Lens.Lens' ListMonitoringSchedulesResponse Prelude.Int
listMonitoringSchedulesResponse_httpStatus :: (Int -> f Int)
-> ListMonitoringSchedulesResponse
-> f ListMonitoringSchedulesResponse
listMonitoringSchedulesResponse_httpStatus = (ListMonitoringSchedulesResponse -> Int)
-> (ListMonitoringSchedulesResponse
    -> Int -> ListMonitoringSchedulesResponse)
-> Lens
     ListMonitoringSchedulesResponse
     ListMonitoringSchedulesResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedulesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListMonitoringSchedulesResponse' :: ListMonitoringSchedulesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListMonitoringSchedulesResponse
s@ListMonitoringSchedulesResponse' {} Int
a -> ListMonitoringSchedulesResponse
s {$sel:httpStatus:ListMonitoringSchedulesResponse' :: Int
httpStatus = Int
a} :: ListMonitoringSchedulesResponse)

-- | A JSON array in which each element is a summary for a monitoring
-- schedule.
listMonitoringSchedulesResponse_monitoringScheduleSummaries :: Lens.Lens' ListMonitoringSchedulesResponse [MonitoringScheduleSummary]
listMonitoringSchedulesResponse_monitoringScheduleSummaries :: ([MonitoringScheduleSummary] -> f [MonitoringScheduleSummary])
-> ListMonitoringSchedulesResponse
-> f ListMonitoringSchedulesResponse
listMonitoringSchedulesResponse_monitoringScheduleSummaries = (ListMonitoringSchedulesResponse -> [MonitoringScheduleSummary])
-> (ListMonitoringSchedulesResponse
    -> [MonitoringScheduleSummary] -> ListMonitoringSchedulesResponse)
-> Lens'
     ListMonitoringSchedulesResponse [MonitoringScheduleSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringSchedulesResponse' {[MonitoringScheduleSummary]
monitoringScheduleSummaries :: [MonitoringScheduleSummary]
$sel:monitoringScheduleSummaries:ListMonitoringSchedulesResponse' :: ListMonitoringSchedulesResponse -> [MonitoringScheduleSummary]
monitoringScheduleSummaries} -> [MonitoringScheduleSummary]
monitoringScheduleSummaries) (\s :: ListMonitoringSchedulesResponse
s@ListMonitoringSchedulesResponse' {} [MonitoringScheduleSummary]
a -> ListMonitoringSchedulesResponse
s {$sel:monitoringScheduleSummaries:ListMonitoringSchedulesResponse' :: [MonitoringScheduleSummary]
monitoringScheduleSummaries = [MonitoringScheduleSummary]
a} :: ListMonitoringSchedulesResponse) (([MonitoringScheduleSummary] -> f [MonitoringScheduleSummary])
 -> ListMonitoringSchedulesResponse
 -> f ListMonitoringSchedulesResponse)
-> (([MonitoringScheduleSummary] -> f [MonitoringScheduleSummary])
    -> [MonitoringScheduleSummary] -> f [MonitoringScheduleSummary])
-> ([MonitoringScheduleSummary] -> f [MonitoringScheduleSummary])
-> ListMonitoringSchedulesResponse
-> f ListMonitoringSchedulesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MonitoringScheduleSummary] -> f [MonitoringScheduleSummary])
-> [MonitoringScheduleSummary] -> f [MonitoringScheduleSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListMonitoringSchedulesResponse