{-# 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.ListMonitoringExecutions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns list of all monitoring job executions.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListMonitoringExecutions
  ( -- * Creating a Request
    ListMonitoringExecutions (..),
    newListMonitoringExecutions,

    -- * Request Lenses
    listMonitoringExecutions_creationTimeAfter,
    listMonitoringExecutions_creationTimeBefore,
    listMonitoringExecutions_endpointName,
    listMonitoringExecutions_lastModifiedTimeAfter,
    listMonitoringExecutions_lastModifiedTimeBefore,
    listMonitoringExecutions_maxResults,
    listMonitoringExecutions_monitoringJobDefinitionName,
    listMonitoringExecutions_monitoringScheduleName,
    listMonitoringExecutions_monitoringTypeEquals,
    listMonitoringExecutions_nextToken,
    listMonitoringExecutions_scheduledTimeAfter,
    listMonitoringExecutions_scheduledTimeBefore,
    listMonitoringExecutions_sortBy,
    listMonitoringExecutions_sortOrder,
    listMonitoringExecutions_statusEquals,

    -- * Destructuring the Response
    ListMonitoringExecutionsResponse (..),
    newListMonitoringExecutionsResponse,

    -- * Response Lenses
    listMonitoringExecutionsResponse_nextToken,
    listMonitoringExecutionsResponse_httpStatus,
    listMonitoringExecutionsResponse_monitoringExecutionSummaries,
  )
where

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

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

-- |
-- Create a value of 'ListMonitoringExecutions' 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:
--
-- 'creationTimeAfter', 'listMonitoringExecutions_creationTimeAfter' - A filter that returns only jobs created after a specified time.
--
-- 'creationTimeBefore', 'listMonitoringExecutions_creationTimeBefore' - A filter that returns only jobs created before a specified time.
--
-- 'endpointName', 'listMonitoringExecutions_endpointName' - Name of a specific endpoint to fetch jobs for.
--
-- 'lastModifiedTimeAfter', 'listMonitoringExecutions_lastModifiedTimeAfter' - A filter that returns only jobs modified before a specified time.
--
-- 'lastModifiedTimeBefore', 'listMonitoringExecutions_lastModifiedTimeBefore' - A filter that returns only jobs modified after a specified time.
--
-- 'maxResults', 'listMonitoringExecutions_maxResults' - The maximum number of jobs to return in the response. The default value
-- is 10.
--
-- 'monitoringJobDefinitionName', 'listMonitoringExecutions_monitoringJobDefinitionName' - Gets a list of the monitoring job runs of the specified monitoring job
-- definitions.
--
-- 'monitoringScheduleName', 'listMonitoringExecutions_monitoringScheduleName' - Name of a specific schedule to fetch jobs for.
--
-- 'monitoringTypeEquals', 'listMonitoringExecutions_monitoringTypeEquals' - A filter that returns only the monitoring job runs of the specified
-- monitoring type.
--
-- 'nextToken', 'listMonitoringExecutions_nextToken' - The token returned if the response is truncated. To retrieve the next
-- set of job executions, use it in the next request.
--
-- 'scheduledTimeAfter', 'listMonitoringExecutions_scheduledTimeAfter' - Filter for jobs scheduled after a specified time.
--
-- 'scheduledTimeBefore', 'listMonitoringExecutions_scheduledTimeBefore' - Filter for jobs scheduled before a specified time.
--
-- 'sortBy', 'listMonitoringExecutions_sortBy' - Whether to sort results by @Status@, @CreationTime@, @ScheduledTime@
-- field. The default is @CreationTime@.
--
-- 'sortOrder', 'listMonitoringExecutions_sortOrder' - Whether to sort the results in @Ascending@ or @Descending@ order. The
-- default is @Descending@.
--
-- 'statusEquals', 'listMonitoringExecutions_statusEquals' - A filter that retrieves only jobs with a specific status.
newListMonitoringExecutions ::
  ListMonitoringExecutions
newListMonitoringExecutions :: ListMonitoringExecutions
newListMonitoringExecutions =
  ListMonitoringExecutions'
    { $sel:creationTimeAfter:ListMonitoringExecutions' :: Maybe POSIX
creationTimeAfter =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListMonitoringExecutions' :: Maybe POSIX
creationTimeBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:endpointName:ListMonitoringExecutions' :: Maybe Text
endpointName = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeAfter:ListMonitoringExecutions' :: Maybe POSIX
lastModifiedTimeAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeBefore:ListMonitoringExecutions' :: Maybe POSIX
lastModifiedTimeBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMonitoringExecutions' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:monitoringJobDefinitionName:ListMonitoringExecutions' :: Maybe Text
monitoringJobDefinitionName = forall a. Maybe a
Prelude.Nothing,
      $sel:monitoringScheduleName:ListMonitoringExecutions' :: Maybe Text
monitoringScheduleName = forall a. Maybe a
Prelude.Nothing,
      $sel:monitoringTypeEquals:ListMonitoringExecutions' :: Maybe MonitoringType
monitoringTypeEquals = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMonitoringExecutions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledTimeAfter:ListMonitoringExecutions' :: Maybe POSIX
scheduledTimeAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledTimeBefore:ListMonitoringExecutions' :: Maybe POSIX
scheduledTimeBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListMonitoringExecutions' :: Maybe MonitoringExecutionSortKey
sortBy = forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListMonitoringExecutions' :: Maybe SortOrder
sortOrder = forall a. Maybe a
Prelude.Nothing,
      $sel:statusEquals:ListMonitoringExecutions' :: Maybe ExecutionStatus
statusEquals = forall a. Maybe a
Prelude.Nothing
    }

-- | A filter that returns only jobs created after a specified time.
listMonitoringExecutions_creationTimeAfter :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe Prelude.UTCTime)
listMonitoringExecutions_creationTimeAfter :: Lens' ListMonitoringExecutions (Maybe UTCTime)
listMonitoringExecutions_creationTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe POSIX
a -> ListMonitoringExecutions
s {$sel:creationTimeAfter:ListMonitoringExecutions' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListMonitoringExecutions) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | A filter that returns only jobs created before a specified time.
listMonitoringExecutions_creationTimeBefore :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe Prelude.UTCTime)
listMonitoringExecutions_creationTimeBefore :: Lens' ListMonitoringExecutions (Maybe UTCTime)
listMonitoringExecutions_creationTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe POSIX
a -> ListMonitoringExecutions
s {$sel:creationTimeBefore:ListMonitoringExecutions' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListMonitoringExecutions) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

-- | A filter that returns only jobs modified before a specified time.
listMonitoringExecutions_lastModifiedTimeAfter :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe Prelude.UTCTime)
listMonitoringExecutions_lastModifiedTimeAfter :: Lens' ListMonitoringExecutions (Maybe UTCTime)
listMonitoringExecutions_lastModifiedTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
$sel:lastModifiedTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
lastModifiedTimeAfter} -> Maybe POSIX
lastModifiedTimeAfter) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe POSIX
a -> ListMonitoringExecutions
s {$sel:lastModifiedTimeAfter:ListMonitoringExecutions' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
a} :: ListMonitoringExecutions) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | A filter that returns only jobs modified after a specified time.
listMonitoringExecutions_lastModifiedTimeBefore :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe Prelude.UTCTime)
listMonitoringExecutions_lastModifiedTimeBefore :: Lens' ListMonitoringExecutions (Maybe UTCTime)
listMonitoringExecutions_lastModifiedTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
$sel:lastModifiedTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
lastModifiedTimeBefore} -> Maybe POSIX
lastModifiedTimeBefore) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe POSIX
a -> ListMonitoringExecutions
s {$sel:lastModifiedTimeBefore:ListMonitoringExecutions' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
a} :: ListMonitoringExecutions) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

-- | Gets a list of the monitoring job runs of the specified monitoring job
-- definitions.
listMonitoringExecutions_monitoringJobDefinitionName :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe Prelude.Text)
listMonitoringExecutions_monitoringJobDefinitionName :: Lens' ListMonitoringExecutions (Maybe Text)
listMonitoringExecutions_monitoringJobDefinitionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe Text
monitoringJobDefinitionName :: Maybe Text
$sel:monitoringJobDefinitionName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
monitoringJobDefinitionName} -> Maybe Text
monitoringJobDefinitionName) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe Text
a -> ListMonitoringExecutions
s {$sel:monitoringJobDefinitionName:ListMonitoringExecutions' :: Maybe Text
monitoringJobDefinitionName = Maybe Text
a} :: ListMonitoringExecutions)

-- | Name of a specific schedule to fetch jobs for.
listMonitoringExecutions_monitoringScheduleName :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe Prelude.Text)
listMonitoringExecutions_monitoringScheduleName :: Lens' ListMonitoringExecutions (Maybe Text)
listMonitoringExecutions_monitoringScheduleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe Text
monitoringScheduleName :: Maybe Text
$sel:monitoringScheduleName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
monitoringScheduleName} -> Maybe Text
monitoringScheduleName) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe Text
a -> ListMonitoringExecutions
s {$sel:monitoringScheduleName:ListMonitoringExecutions' :: Maybe Text
monitoringScheduleName = Maybe Text
a} :: ListMonitoringExecutions)

-- | A filter that returns only the monitoring job runs of the specified
-- monitoring type.
listMonitoringExecutions_monitoringTypeEquals :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe MonitoringType)
listMonitoringExecutions_monitoringTypeEquals :: Lens' ListMonitoringExecutions (Maybe MonitoringType)
listMonitoringExecutions_monitoringTypeEquals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe MonitoringType
monitoringTypeEquals :: Maybe MonitoringType
$sel:monitoringTypeEquals:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe MonitoringType
monitoringTypeEquals} -> Maybe MonitoringType
monitoringTypeEquals) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe MonitoringType
a -> ListMonitoringExecutions
s {$sel:monitoringTypeEquals:ListMonitoringExecutions' :: Maybe MonitoringType
monitoringTypeEquals = Maybe MonitoringType
a} :: ListMonitoringExecutions)

-- | The token returned if the response is truncated. To retrieve the next
-- set of job executions, use it in the next request.
listMonitoringExecutions_nextToken :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe Prelude.Text)
listMonitoringExecutions_nextToken :: Lens' ListMonitoringExecutions (Maybe Text)
listMonitoringExecutions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe Text
a -> ListMonitoringExecutions
s {$sel:nextToken:ListMonitoringExecutions' :: Maybe Text
nextToken = Maybe Text
a} :: ListMonitoringExecutions)

-- | Filter for jobs scheduled after a specified time.
listMonitoringExecutions_scheduledTimeAfter :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe Prelude.UTCTime)
listMonitoringExecutions_scheduledTimeAfter :: Lens' ListMonitoringExecutions (Maybe UTCTime)
listMonitoringExecutions_scheduledTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe POSIX
scheduledTimeAfter :: Maybe POSIX
$sel:scheduledTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
scheduledTimeAfter} -> Maybe POSIX
scheduledTimeAfter) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe POSIX
a -> ListMonitoringExecutions
s {$sel:scheduledTimeAfter:ListMonitoringExecutions' :: Maybe POSIX
scheduledTimeAfter = Maybe POSIX
a} :: ListMonitoringExecutions) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Filter for jobs scheduled before a specified time.
listMonitoringExecutions_scheduledTimeBefore :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe Prelude.UTCTime)
listMonitoringExecutions_scheduledTimeBefore :: Lens' ListMonitoringExecutions (Maybe UTCTime)
listMonitoringExecutions_scheduledTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe POSIX
scheduledTimeBefore :: Maybe POSIX
$sel:scheduledTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
scheduledTimeBefore} -> Maybe POSIX
scheduledTimeBefore) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe POSIX
a -> ListMonitoringExecutions
s {$sel:scheduledTimeBefore:ListMonitoringExecutions' :: Maybe POSIX
scheduledTimeBefore = Maybe POSIX
a} :: ListMonitoringExecutions) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

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

-- | A filter that retrieves only jobs with a specific status.
listMonitoringExecutions_statusEquals :: Lens.Lens' ListMonitoringExecutions (Prelude.Maybe ExecutionStatus)
listMonitoringExecutions_statusEquals :: Lens' ListMonitoringExecutions (Maybe ExecutionStatus)
listMonitoringExecutions_statusEquals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutions' {Maybe ExecutionStatus
statusEquals :: Maybe ExecutionStatus
$sel:statusEquals:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe ExecutionStatus
statusEquals} -> Maybe ExecutionStatus
statusEquals) (\s :: ListMonitoringExecutions
s@ListMonitoringExecutions' {} Maybe ExecutionStatus
a -> ListMonitoringExecutions
s {$sel:statusEquals:ListMonitoringExecutions' :: Maybe ExecutionStatus
statusEquals = Maybe ExecutionStatus
a} :: ListMonitoringExecutions)

instance Core.AWSPager ListMonitoringExecutions where
  page :: ListMonitoringExecutions
-> AWSResponse ListMonitoringExecutions
-> Maybe ListMonitoringExecutions
page ListMonitoringExecutions
rq AWSResponse ListMonitoringExecutions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMonitoringExecutions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListMonitoringExecutionsResponse (Maybe Text)
listMonitoringExecutionsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMonitoringExecutions
rs
            forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListMonitoringExecutionsResponse [MonitoringExecutionSummary]
listMonitoringExecutionsResponse_monitoringExecutionSummaries
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListMonitoringExecutions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListMonitoringExecutions (Maybe Text)
listMonitoringExecutions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListMonitoringExecutions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListMonitoringExecutionsResponse (Maybe Text)
listMonitoringExecutionsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.Hashable ListMonitoringExecutions where
  hashWithSalt :: Int -> ListMonitoringExecutions -> Int
hashWithSalt Int
_salt ListMonitoringExecutions' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe ExecutionStatus
Maybe MonitoringExecutionSortKey
Maybe MonitoringType
Maybe SortOrder
statusEquals :: Maybe ExecutionStatus
sortOrder :: Maybe SortOrder
sortBy :: Maybe MonitoringExecutionSortKey
scheduledTimeBefore :: Maybe POSIX
scheduledTimeAfter :: Maybe POSIX
nextToken :: Maybe Text
monitoringTypeEquals :: Maybe MonitoringType
monitoringScheduleName :: Maybe Text
monitoringJobDefinitionName :: Maybe Text
maxResults :: Maybe Natural
lastModifiedTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
endpointName :: Maybe Text
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:statusEquals:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe ExecutionStatus
$sel:sortOrder:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe SortOrder
$sel:sortBy:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe MonitoringExecutionSortKey
$sel:scheduledTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:scheduledTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:nextToken:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:monitoringTypeEquals:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe MonitoringType
$sel:monitoringScheduleName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:monitoringJobDefinitionName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:maxResults:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Natural
$sel:lastModifiedTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:endpointName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:creationTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:creationTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTimeAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTimeBefore
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
endpointName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTimeAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTimeBefore
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
monitoringJobDefinitionName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
monitoringScheduleName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MonitoringType
monitoringTypeEquals
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
scheduledTimeAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
scheduledTimeBefore
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MonitoringExecutionSortKey
sortBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SortOrder
sortOrder
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExecutionStatus
statusEquals

instance Prelude.NFData ListMonitoringExecutions where
  rnf :: ListMonitoringExecutions -> ()
rnf ListMonitoringExecutions' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe ExecutionStatus
Maybe MonitoringExecutionSortKey
Maybe MonitoringType
Maybe SortOrder
statusEquals :: Maybe ExecutionStatus
sortOrder :: Maybe SortOrder
sortBy :: Maybe MonitoringExecutionSortKey
scheduledTimeBefore :: Maybe POSIX
scheduledTimeAfter :: Maybe POSIX
nextToken :: Maybe Text
monitoringTypeEquals :: Maybe MonitoringType
monitoringScheduleName :: Maybe Text
monitoringJobDefinitionName :: Maybe Text
maxResults :: Maybe Natural
lastModifiedTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
endpointName :: Maybe Text
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:statusEquals:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe ExecutionStatus
$sel:sortOrder:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe SortOrder
$sel:sortBy:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe MonitoringExecutionSortKey
$sel:scheduledTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:scheduledTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:nextToken:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:monitoringTypeEquals:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe MonitoringType
$sel:monitoringScheduleName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:monitoringJobDefinitionName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:maxResults:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Natural
$sel:lastModifiedTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:endpointName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:creationTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:creationTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTimeAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTimeBefore
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
endpointName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTimeAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTimeBefore
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
monitoringJobDefinitionName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
monitoringScheduleName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MonitoringType
monitoringTypeEquals
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
scheduledTimeAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
scheduledTimeBefore
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MonitoringExecutionSortKey
sortBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SortOrder
sortOrder
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExecutionStatus
statusEquals

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

instance Data.ToJSON ListMonitoringExecutions where
  toJSON :: ListMonitoringExecutions -> Value
toJSON ListMonitoringExecutions' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe ExecutionStatus
Maybe MonitoringExecutionSortKey
Maybe MonitoringType
Maybe SortOrder
statusEquals :: Maybe ExecutionStatus
sortOrder :: Maybe SortOrder
sortBy :: Maybe MonitoringExecutionSortKey
scheduledTimeBefore :: Maybe POSIX
scheduledTimeAfter :: Maybe POSIX
nextToken :: Maybe Text
monitoringTypeEquals :: Maybe MonitoringType
monitoringScheduleName :: Maybe Text
monitoringJobDefinitionName :: Maybe Text
maxResults :: Maybe Natural
lastModifiedTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
endpointName :: Maybe Text
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:statusEquals:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe ExecutionStatus
$sel:sortOrder:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe SortOrder
$sel:sortBy:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe MonitoringExecutionSortKey
$sel:scheduledTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:scheduledTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:nextToken:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:monitoringTypeEquals:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe MonitoringType
$sel:monitoringScheduleName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:monitoringJobDefinitionName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:maxResults:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Natural
$sel:lastModifiedTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:endpointName:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe Text
$sel:creationTimeBefore:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
$sel:creationTimeAfter:ListMonitoringExecutions' :: ListMonitoringExecutions -> Maybe POSIX
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CreationTimeAfter" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeAfter,
            (Key
"CreationTimeBefore" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeBefore,
            (Key
"EndpointName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
endpointName,
            (Key
"LastModifiedTimeAfter" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
lastModifiedTimeAfter,
            (Key
"LastModifiedTimeBefore" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
lastModifiedTimeBefore,
            (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"MonitoringJobDefinitionName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
monitoringJobDefinitionName,
            (Key
"MonitoringScheduleName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
monitoringScheduleName,
            (Key
"MonitoringTypeEquals" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MonitoringType
monitoringTypeEquals,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"ScheduledTimeAfter" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
scheduledTimeAfter,
            (Key
"ScheduledTimeBefore" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
scheduledTimeBefore,
            (Key
"SortBy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MonitoringExecutionSortKey
sortBy,
            (Key
"SortOrder" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
            (Key
"StatusEquals" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExecutionStatus
statusEquals
          ]
      )

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

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

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

-- |
-- Create a value of 'ListMonitoringExecutionsResponse' 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', 'listMonitoringExecutionsResponse_nextToken' - If the response is truncated, Amazon SageMaker returns this token. To
-- retrieve the next set of jobs, use it in the subsequent reques
--
-- 'httpStatus', 'listMonitoringExecutionsResponse_httpStatus' - The response's http status code.
--
-- 'monitoringExecutionSummaries', 'listMonitoringExecutionsResponse_monitoringExecutionSummaries' - A JSON array in which each element is a summary for a monitoring
-- execution.
newListMonitoringExecutionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMonitoringExecutionsResponse
newListMonitoringExecutionsResponse :: Int -> ListMonitoringExecutionsResponse
newListMonitoringExecutionsResponse Int
pHttpStatus_ =
  ListMonitoringExecutionsResponse'
    { $sel:nextToken:ListMonitoringExecutionsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMonitoringExecutionsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:monitoringExecutionSummaries:ListMonitoringExecutionsResponse' :: [MonitoringExecutionSummary]
monitoringExecutionSummaries =
        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 reques
listMonitoringExecutionsResponse_nextToken :: Lens.Lens' ListMonitoringExecutionsResponse (Prelude.Maybe Prelude.Text)
listMonitoringExecutionsResponse_nextToken :: Lens' ListMonitoringExecutionsResponse (Maybe Text)
listMonitoringExecutionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMonitoringExecutionsResponse' :: ListMonitoringExecutionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMonitoringExecutionsResponse
s@ListMonitoringExecutionsResponse' {} Maybe Text
a -> ListMonitoringExecutionsResponse
s {$sel:nextToken:ListMonitoringExecutionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMonitoringExecutionsResponse)

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

-- | A JSON array in which each element is a summary for a monitoring
-- execution.
listMonitoringExecutionsResponse_monitoringExecutionSummaries :: Lens.Lens' ListMonitoringExecutionsResponse [MonitoringExecutionSummary]
listMonitoringExecutionsResponse_monitoringExecutionSummaries :: Lens' ListMonitoringExecutionsResponse [MonitoringExecutionSummary]
listMonitoringExecutionsResponse_monitoringExecutionSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitoringExecutionsResponse' {[MonitoringExecutionSummary]
monitoringExecutionSummaries :: [MonitoringExecutionSummary]
$sel:monitoringExecutionSummaries:ListMonitoringExecutionsResponse' :: ListMonitoringExecutionsResponse -> [MonitoringExecutionSummary]
monitoringExecutionSummaries} -> [MonitoringExecutionSummary]
monitoringExecutionSummaries) (\s :: ListMonitoringExecutionsResponse
s@ListMonitoringExecutionsResponse' {} [MonitoringExecutionSummary]
a -> ListMonitoringExecutionsResponse
s {$sel:monitoringExecutionSummaries:ListMonitoringExecutionsResponse' :: [MonitoringExecutionSummary]
monitoringExecutionSummaries = [MonitoringExecutionSummary]
a} :: ListMonitoringExecutionsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListMonitoringExecutionsResponse
  where
  rnf :: ListMonitoringExecutionsResponse -> ()
rnf ListMonitoringExecutionsResponse' {Int
[MonitoringExecutionSummary]
Maybe Text
monitoringExecutionSummaries :: [MonitoringExecutionSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:monitoringExecutionSummaries:ListMonitoringExecutionsResponse' :: ListMonitoringExecutionsResponse -> [MonitoringExecutionSummary]
$sel:httpStatus:ListMonitoringExecutionsResponse' :: ListMonitoringExecutionsResponse -> Int
$sel:nextToken:ListMonitoringExecutionsResponse' :: ListMonitoringExecutionsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [MonitoringExecutionSummary]
monitoringExecutionSummaries