{-# 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.ListTrainingJobs
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists training jobs.
--
-- When @StatusEquals@ and @MaxResults@ are set at the same time, the
-- @MaxResults@ number of training jobs are first retrieved ignoring the
-- @StatusEquals@ parameter and then they are filtered by the
-- @StatusEquals@ parameter, which is returned as a response.
--
-- For example, if @ListTrainingJobs@ is invoked with the following
-- parameters:
--
-- @{ ... MaxResults: 100, StatusEquals: InProgress ... }@
--
-- First, 100 trainings jobs with any status, including those other than
-- @InProgress@, are selected (sorted according to the creation time, from
-- the most current to the oldest). Next, those with a status of
-- @InProgress@ are returned.
--
-- You can quickly test the API using the following Amazon Web Services CLI
-- code.
--
-- @aws sagemaker list-training-jobs --max-results 100 --status-equals InProgress@
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListTrainingJobs
  ( -- * Creating a Request
    ListTrainingJobs (..),
    newListTrainingJobs,

    -- * Request Lenses
    listTrainingJobs_creationTimeAfter,
    listTrainingJobs_creationTimeBefore,
    listTrainingJobs_lastModifiedTimeAfter,
    listTrainingJobs_lastModifiedTimeBefore,
    listTrainingJobs_maxResults,
    listTrainingJobs_nameContains,
    listTrainingJobs_nextToken,
    listTrainingJobs_sortBy,
    listTrainingJobs_sortOrder,
    listTrainingJobs_statusEquals,
    listTrainingJobs_warmPoolStatusEquals,

    -- * Destructuring the Response
    ListTrainingJobsResponse (..),
    newListTrainingJobsResponse,

    -- * Response Lenses
    listTrainingJobsResponse_nextToken,
    listTrainingJobsResponse_httpStatus,
    listTrainingJobsResponse_trainingJobSummaries,
  )
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:/ 'newListTrainingJobs' smart constructor.
data ListTrainingJobs = ListTrainingJobs'
  { -- | A filter that returns only training jobs created after the specified
    -- time (timestamp).
    ListTrainingJobs -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Data.POSIX,
    -- | A filter that returns only training jobs created before the specified
    -- time (timestamp).
    ListTrainingJobs -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Data.POSIX,
    -- | A filter that returns only training jobs modified after the specified
    -- time (timestamp).
    ListTrainingJobs -> Maybe POSIX
lastModifiedTimeAfter :: Prelude.Maybe Data.POSIX,
    -- | A filter that returns only training jobs modified before the specified
    -- time (timestamp).
    ListTrainingJobs -> Maybe POSIX
lastModifiedTimeBefore :: Prelude.Maybe Data.POSIX,
    -- | The maximum number of training jobs to return in the response.
    ListTrainingJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A string in the training job name. This filter returns only training
    -- jobs whose name contains the specified string.
    ListTrainingJobs -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
    -- | If the result of the previous @ListTrainingJobs@ request was truncated,
    -- the response includes a @NextToken@. To retrieve the next set of
    -- training jobs, use the token in the next request.
    ListTrainingJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The field to sort results by. The default is @CreationTime@.
    ListTrainingJobs -> Maybe SortBy
sortBy :: Prelude.Maybe SortBy,
    -- | The sort order for results. The default is @Ascending@.
    ListTrainingJobs -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
    -- | A filter that retrieves only training jobs with a specific status.
    ListTrainingJobs -> Maybe TrainingJobStatus
statusEquals :: Prelude.Maybe TrainingJobStatus,
    -- | A filter that retrieves only training jobs with a specific warm pool
    -- status.
    ListTrainingJobs -> Maybe WarmPoolResourceStatus
warmPoolStatusEquals :: Prelude.Maybe WarmPoolResourceStatus
  }
  deriving (ListTrainingJobs -> ListTrainingJobs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrainingJobs -> ListTrainingJobs -> Bool
$c/= :: ListTrainingJobs -> ListTrainingJobs -> Bool
== :: ListTrainingJobs -> ListTrainingJobs -> Bool
$c== :: ListTrainingJobs -> ListTrainingJobs -> Bool
Prelude.Eq, ReadPrec [ListTrainingJobs]
ReadPrec ListTrainingJobs
Int -> ReadS ListTrainingJobs
ReadS [ListTrainingJobs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrainingJobs]
$creadListPrec :: ReadPrec [ListTrainingJobs]
readPrec :: ReadPrec ListTrainingJobs
$creadPrec :: ReadPrec ListTrainingJobs
readList :: ReadS [ListTrainingJobs]
$creadList :: ReadS [ListTrainingJobs]
readsPrec :: Int -> ReadS ListTrainingJobs
$creadsPrec :: Int -> ReadS ListTrainingJobs
Prelude.Read, Int -> ListTrainingJobs -> ShowS
[ListTrainingJobs] -> ShowS
ListTrainingJobs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrainingJobs] -> ShowS
$cshowList :: [ListTrainingJobs] -> ShowS
show :: ListTrainingJobs -> String
$cshow :: ListTrainingJobs -> String
showsPrec :: Int -> ListTrainingJobs -> ShowS
$cshowsPrec :: Int -> ListTrainingJobs -> ShowS
Prelude.Show, forall x. Rep ListTrainingJobs x -> ListTrainingJobs
forall x. ListTrainingJobs -> Rep ListTrainingJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTrainingJobs x -> ListTrainingJobs
$cfrom :: forall x. ListTrainingJobs -> Rep ListTrainingJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListTrainingJobs' 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', 'listTrainingJobs_creationTimeAfter' - A filter that returns only training jobs created after the specified
-- time (timestamp).
--
-- 'creationTimeBefore', 'listTrainingJobs_creationTimeBefore' - A filter that returns only training jobs created before the specified
-- time (timestamp).
--
-- 'lastModifiedTimeAfter', 'listTrainingJobs_lastModifiedTimeAfter' - A filter that returns only training jobs modified after the specified
-- time (timestamp).
--
-- 'lastModifiedTimeBefore', 'listTrainingJobs_lastModifiedTimeBefore' - A filter that returns only training jobs modified before the specified
-- time (timestamp).
--
-- 'maxResults', 'listTrainingJobs_maxResults' - The maximum number of training jobs to return in the response.
--
-- 'nameContains', 'listTrainingJobs_nameContains' - A string in the training job name. This filter returns only training
-- jobs whose name contains the specified string.
--
-- 'nextToken', 'listTrainingJobs_nextToken' - If the result of the previous @ListTrainingJobs@ request was truncated,
-- the response includes a @NextToken@. To retrieve the next set of
-- training jobs, use the token in the next request.
--
-- 'sortBy', 'listTrainingJobs_sortBy' - The field to sort results by. The default is @CreationTime@.
--
-- 'sortOrder', 'listTrainingJobs_sortOrder' - The sort order for results. The default is @Ascending@.
--
-- 'statusEquals', 'listTrainingJobs_statusEquals' - A filter that retrieves only training jobs with a specific status.
--
-- 'warmPoolStatusEquals', 'listTrainingJobs_warmPoolStatusEquals' - A filter that retrieves only training jobs with a specific warm pool
-- status.
newListTrainingJobs ::
  ListTrainingJobs
newListTrainingJobs :: ListTrainingJobs
newListTrainingJobs =
  ListTrainingJobs'
    { $sel:creationTimeAfter:ListTrainingJobs' :: Maybe POSIX
creationTimeAfter =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListTrainingJobs' :: Maybe POSIX
creationTimeBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeAfter:ListTrainingJobs' :: Maybe POSIX
lastModifiedTimeAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeBefore:ListTrainingJobs' :: Maybe POSIX
lastModifiedTimeBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListTrainingJobs' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nameContains:ListTrainingJobs' :: Maybe Text
nameContains = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTrainingJobs' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListTrainingJobs' :: Maybe SortBy
sortBy = forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListTrainingJobs' :: Maybe SortOrder
sortOrder = forall a. Maybe a
Prelude.Nothing,
      $sel:statusEquals:ListTrainingJobs' :: Maybe TrainingJobStatus
statusEquals = forall a. Maybe a
Prelude.Nothing,
      $sel:warmPoolStatusEquals:ListTrainingJobs' :: Maybe WarmPoolResourceStatus
warmPoolStatusEquals = forall a. Maybe a
Prelude.Nothing
    }

-- | A filter that returns only training jobs created after the specified
-- time (timestamp).
listTrainingJobs_creationTimeAfter :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.UTCTime)
listTrainingJobs_creationTimeAfter :: Lens' ListTrainingJobs (Maybe UTCTime)
listTrainingJobs_creationTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobs' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListTrainingJobs
s@ListTrainingJobs' {} Maybe POSIX
a -> ListTrainingJobs
s {$sel:creationTimeAfter:ListTrainingJobs' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListTrainingJobs) 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 training jobs created before the specified
-- time (timestamp).
listTrainingJobs_creationTimeBefore :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.UTCTime)
listTrainingJobs_creationTimeBefore :: Lens' ListTrainingJobs (Maybe UTCTime)
listTrainingJobs_creationTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobs' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListTrainingJobs
s@ListTrainingJobs' {} Maybe POSIX
a -> ListTrainingJobs
s {$sel:creationTimeBefore:ListTrainingJobs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListTrainingJobs) 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 training jobs modified after the specified
-- time (timestamp).
listTrainingJobs_lastModifiedTimeAfter :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.UTCTime)
listTrainingJobs_lastModifiedTimeAfter :: Lens' ListTrainingJobs (Maybe UTCTime)
listTrainingJobs_lastModifiedTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobs' {Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
$sel:lastModifiedTimeAfter:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
lastModifiedTimeAfter} -> Maybe POSIX
lastModifiedTimeAfter) (\s :: ListTrainingJobs
s@ListTrainingJobs' {} Maybe POSIX
a -> ListTrainingJobs
s {$sel:lastModifiedTimeAfter:ListTrainingJobs' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
a} :: ListTrainingJobs) 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 training jobs modified before the specified
-- time (timestamp).
listTrainingJobs_lastModifiedTimeBefore :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.UTCTime)
listTrainingJobs_lastModifiedTimeBefore :: Lens' ListTrainingJobs (Maybe UTCTime)
listTrainingJobs_lastModifiedTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobs' {Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
$sel:lastModifiedTimeBefore:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
lastModifiedTimeBefore} -> Maybe POSIX
lastModifiedTimeBefore) (\s :: ListTrainingJobs
s@ListTrainingJobs' {} Maybe POSIX
a -> ListTrainingJobs
s {$sel:lastModifiedTimeBefore:ListTrainingJobs' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
a} :: ListTrainingJobs) 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 training jobs to return in the response.
listTrainingJobs_maxResults :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.Natural)
listTrainingJobs_maxResults :: Lens' ListTrainingJobs (Maybe Natural)
listTrainingJobs_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTrainingJobs' :: ListTrainingJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTrainingJobs
s@ListTrainingJobs' {} Maybe Natural
a -> ListTrainingJobs
s {$sel:maxResults:ListTrainingJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTrainingJobs)

-- | A string in the training job name. This filter returns only training
-- jobs whose name contains the specified string.
listTrainingJobs_nameContains :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.Text)
listTrainingJobs_nameContains :: Lens' ListTrainingJobs (Maybe Text)
listTrainingJobs_nameContains = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobs' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListTrainingJobs' :: ListTrainingJobs -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListTrainingJobs
s@ListTrainingJobs' {} Maybe Text
a -> ListTrainingJobs
s {$sel:nameContains:ListTrainingJobs' :: Maybe Text
nameContains = Maybe Text
a} :: ListTrainingJobs)

-- | If the result of the previous @ListTrainingJobs@ request was truncated,
-- the response includes a @NextToken@. To retrieve the next set of
-- training jobs, use the token in the next request.
listTrainingJobs_nextToken :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.Text)
listTrainingJobs_nextToken :: Lens' ListTrainingJobs (Maybe Text)
listTrainingJobs_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTrainingJobs' :: ListTrainingJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTrainingJobs
s@ListTrainingJobs' {} Maybe Text
a -> ListTrainingJobs
s {$sel:nextToken:ListTrainingJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListTrainingJobs)

-- | The field to sort results by. The default is @CreationTime@.
listTrainingJobs_sortBy :: Lens.Lens' ListTrainingJobs (Prelude.Maybe SortBy)
listTrainingJobs_sortBy :: Lens' ListTrainingJobs (Maybe SortBy)
listTrainingJobs_sortBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobs' {Maybe SortBy
sortBy :: Maybe SortBy
$sel:sortBy:ListTrainingJobs' :: ListTrainingJobs -> Maybe SortBy
sortBy} -> Maybe SortBy
sortBy) (\s :: ListTrainingJobs
s@ListTrainingJobs' {} Maybe SortBy
a -> ListTrainingJobs
s {$sel:sortBy:ListTrainingJobs' :: Maybe SortBy
sortBy = Maybe SortBy
a} :: ListTrainingJobs)

-- | The sort order for results. The default is @Ascending@.
listTrainingJobs_sortOrder :: Lens.Lens' ListTrainingJobs (Prelude.Maybe SortOrder)
listTrainingJobs_sortOrder :: Lens' ListTrainingJobs (Maybe SortOrder)
listTrainingJobs_sortOrder = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobs' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListTrainingJobs' :: ListTrainingJobs -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListTrainingJobs
s@ListTrainingJobs' {} Maybe SortOrder
a -> ListTrainingJobs
s {$sel:sortOrder:ListTrainingJobs' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListTrainingJobs)

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

-- | A filter that retrieves only training jobs with a specific warm pool
-- status.
listTrainingJobs_warmPoolStatusEquals :: Lens.Lens' ListTrainingJobs (Prelude.Maybe WarmPoolResourceStatus)
listTrainingJobs_warmPoolStatusEquals :: Lens' ListTrainingJobs (Maybe WarmPoolResourceStatus)
listTrainingJobs_warmPoolStatusEquals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobs' {Maybe WarmPoolResourceStatus
warmPoolStatusEquals :: Maybe WarmPoolResourceStatus
$sel:warmPoolStatusEquals:ListTrainingJobs' :: ListTrainingJobs -> Maybe WarmPoolResourceStatus
warmPoolStatusEquals} -> Maybe WarmPoolResourceStatus
warmPoolStatusEquals) (\s :: ListTrainingJobs
s@ListTrainingJobs' {} Maybe WarmPoolResourceStatus
a -> ListTrainingJobs
s {$sel:warmPoolStatusEquals:ListTrainingJobs' :: Maybe WarmPoolResourceStatus
warmPoolStatusEquals = Maybe WarmPoolResourceStatus
a} :: ListTrainingJobs)

instance Core.AWSPager ListTrainingJobs where
  page :: ListTrainingJobs
-> AWSResponse ListTrainingJobs -> Maybe ListTrainingJobs
page ListTrainingJobs
rq AWSResponse ListTrainingJobs
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListTrainingJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListTrainingJobsResponse (Maybe Text)
listTrainingJobsResponse_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 ListTrainingJobs
rs
            forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListTrainingJobsResponse [TrainingJobSummary]
listTrainingJobsResponse_trainingJobSummaries
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListTrainingJobs
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListTrainingJobs (Maybe Text)
listTrainingJobs_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTrainingJobs
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListTrainingJobsResponse (Maybe Text)
listTrainingJobsResponse_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 ListTrainingJobs where
  type
    AWSResponse ListTrainingJobs =
      ListTrainingJobsResponse
  request :: (Service -> Service)
-> ListTrainingJobs -> Request ListTrainingJobs
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 ListTrainingJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListTrainingJobs)))
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 -> [TrainingJobSummary] -> ListTrainingJobsResponse
ListTrainingJobsResponse'
            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
"TrainingJobSummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable ListTrainingJobs where
  hashWithSalt :: Int -> ListTrainingJobs -> Int
hashWithSalt Int
_salt ListTrainingJobs' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortBy
Maybe SortOrder
Maybe TrainingJobStatus
Maybe WarmPoolResourceStatus
warmPoolStatusEquals :: Maybe WarmPoolResourceStatus
statusEquals :: Maybe TrainingJobStatus
sortOrder :: Maybe SortOrder
sortBy :: Maybe SortBy
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
lastModifiedTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:warmPoolStatusEquals:ListTrainingJobs' :: ListTrainingJobs -> Maybe WarmPoolResourceStatus
$sel:statusEquals:ListTrainingJobs' :: ListTrainingJobs -> Maybe TrainingJobStatus
$sel:sortOrder:ListTrainingJobs' :: ListTrainingJobs -> Maybe SortOrder
$sel:sortBy:ListTrainingJobs' :: ListTrainingJobs -> Maybe SortBy
$sel:nextToken:ListTrainingJobs' :: ListTrainingJobs -> Maybe Text
$sel:nameContains:ListTrainingJobs' :: ListTrainingJobs -> Maybe Text
$sel:maxResults:ListTrainingJobs' :: ListTrainingJobs -> Maybe Natural
$sel:lastModifiedTimeBefore:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:creationTimeBefore:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:creationTimeAfter:ListTrainingJobs' :: ListTrainingJobs -> 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 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
nameContains
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SortBy
sortBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SortOrder
sortOrder
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TrainingJobStatus
statusEquals
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WarmPoolResourceStatus
warmPoolStatusEquals

instance Prelude.NFData ListTrainingJobs where
  rnf :: ListTrainingJobs -> ()
rnf ListTrainingJobs' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortBy
Maybe SortOrder
Maybe TrainingJobStatus
Maybe WarmPoolResourceStatus
warmPoolStatusEquals :: Maybe WarmPoolResourceStatus
statusEquals :: Maybe TrainingJobStatus
sortOrder :: Maybe SortOrder
sortBy :: Maybe SortBy
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
lastModifiedTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:warmPoolStatusEquals:ListTrainingJobs' :: ListTrainingJobs -> Maybe WarmPoolResourceStatus
$sel:statusEquals:ListTrainingJobs' :: ListTrainingJobs -> Maybe TrainingJobStatus
$sel:sortOrder:ListTrainingJobs' :: ListTrainingJobs -> Maybe SortOrder
$sel:sortBy:ListTrainingJobs' :: ListTrainingJobs -> Maybe SortBy
$sel:nextToken:ListTrainingJobs' :: ListTrainingJobs -> Maybe Text
$sel:nameContains:ListTrainingJobs' :: ListTrainingJobs -> Maybe Text
$sel:maxResults:ListTrainingJobs' :: ListTrainingJobs -> Maybe Natural
$sel:lastModifiedTimeBefore:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:creationTimeBefore:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:creationTimeAfter:ListTrainingJobs' :: ListTrainingJobs -> 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 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
nameContains
      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 SortBy
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 TrainingJobStatus
statusEquals
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WarmPoolResourceStatus
warmPoolStatusEquals

instance Data.ToHeaders ListTrainingJobs where
  toHeaders :: ListTrainingJobs -> 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.ListTrainingJobs" :: 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 ListTrainingJobs where
  toJSON :: ListTrainingJobs -> Value
toJSON ListTrainingJobs' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortBy
Maybe SortOrder
Maybe TrainingJobStatus
Maybe WarmPoolResourceStatus
warmPoolStatusEquals :: Maybe WarmPoolResourceStatus
statusEquals :: Maybe TrainingJobStatus
sortOrder :: Maybe SortOrder
sortBy :: Maybe SortBy
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
lastModifiedTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:warmPoolStatusEquals:ListTrainingJobs' :: ListTrainingJobs -> Maybe WarmPoolResourceStatus
$sel:statusEquals:ListTrainingJobs' :: ListTrainingJobs -> Maybe TrainingJobStatus
$sel:sortOrder:ListTrainingJobs' :: ListTrainingJobs -> Maybe SortOrder
$sel:sortBy:ListTrainingJobs' :: ListTrainingJobs -> Maybe SortBy
$sel:nextToken:ListTrainingJobs' :: ListTrainingJobs -> Maybe Text
$sel:nameContains:ListTrainingJobs' :: ListTrainingJobs -> Maybe Text
$sel:maxResults:ListTrainingJobs' :: ListTrainingJobs -> Maybe Natural
$sel:lastModifiedTimeBefore:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:creationTimeBefore:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:creationTimeAfter:ListTrainingJobs' :: ListTrainingJobs -> 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
"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
"NameContains" 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
nameContains,
            (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
"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 SortBy
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 TrainingJobStatus
statusEquals,
            (Key
"WarmPoolStatusEquals" 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 WarmPoolResourceStatus
warmPoolStatusEquals
          ]
      )

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

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

-- | /See:/ 'newListTrainingJobsResponse' smart constructor.
data ListTrainingJobsResponse = ListTrainingJobsResponse'
  { -- | If the response is truncated, SageMaker returns this token. To retrieve
    -- the next set of training jobs, use it in the subsequent request.
    ListTrainingJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListTrainingJobsResponse -> Int
httpStatus :: Prelude.Int,
    -- | An array of @TrainingJobSummary@ objects, each listing a training job.
    ListTrainingJobsResponse -> [TrainingJobSummary]
trainingJobSummaries :: [TrainingJobSummary]
  }
  deriving (ListTrainingJobsResponse -> ListTrainingJobsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrainingJobsResponse -> ListTrainingJobsResponse -> Bool
$c/= :: ListTrainingJobsResponse -> ListTrainingJobsResponse -> Bool
== :: ListTrainingJobsResponse -> ListTrainingJobsResponse -> Bool
$c== :: ListTrainingJobsResponse -> ListTrainingJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListTrainingJobsResponse]
ReadPrec ListTrainingJobsResponse
Int -> ReadS ListTrainingJobsResponse
ReadS [ListTrainingJobsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrainingJobsResponse]
$creadListPrec :: ReadPrec [ListTrainingJobsResponse]
readPrec :: ReadPrec ListTrainingJobsResponse
$creadPrec :: ReadPrec ListTrainingJobsResponse
readList :: ReadS [ListTrainingJobsResponse]
$creadList :: ReadS [ListTrainingJobsResponse]
readsPrec :: Int -> ReadS ListTrainingJobsResponse
$creadsPrec :: Int -> ReadS ListTrainingJobsResponse
Prelude.Read, Int -> ListTrainingJobsResponse -> ShowS
[ListTrainingJobsResponse] -> ShowS
ListTrainingJobsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrainingJobsResponse] -> ShowS
$cshowList :: [ListTrainingJobsResponse] -> ShowS
show :: ListTrainingJobsResponse -> String
$cshow :: ListTrainingJobsResponse -> String
showsPrec :: Int -> ListTrainingJobsResponse -> ShowS
$cshowsPrec :: Int -> ListTrainingJobsResponse -> ShowS
Prelude.Show, forall x.
Rep ListTrainingJobsResponse x -> ListTrainingJobsResponse
forall x.
ListTrainingJobsResponse -> Rep ListTrainingJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTrainingJobsResponse x -> ListTrainingJobsResponse
$cfrom :: forall x.
ListTrainingJobsResponse -> Rep ListTrainingJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListTrainingJobsResponse' 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', 'listTrainingJobsResponse_nextToken' - If the response is truncated, SageMaker returns this token. To retrieve
-- the next set of training jobs, use it in the subsequent request.
--
-- 'httpStatus', 'listTrainingJobsResponse_httpStatus' - The response's http status code.
--
-- 'trainingJobSummaries', 'listTrainingJobsResponse_trainingJobSummaries' - An array of @TrainingJobSummary@ objects, each listing a training job.
newListTrainingJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTrainingJobsResponse
newListTrainingJobsResponse :: Int -> ListTrainingJobsResponse
newListTrainingJobsResponse Int
pHttpStatus_ =
  ListTrainingJobsResponse'
    { $sel:nextToken:ListTrainingJobsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListTrainingJobsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:trainingJobSummaries:ListTrainingJobsResponse' :: [TrainingJobSummary]
trainingJobSummaries = forall a. Monoid a => a
Prelude.mempty
    }

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

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

-- | An array of @TrainingJobSummary@ objects, each listing a training job.
listTrainingJobsResponse_trainingJobSummaries :: Lens.Lens' ListTrainingJobsResponse [TrainingJobSummary]
listTrainingJobsResponse_trainingJobSummaries :: Lens' ListTrainingJobsResponse [TrainingJobSummary]
listTrainingJobsResponse_trainingJobSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobsResponse' {[TrainingJobSummary]
trainingJobSummaries :: [TrainingJobSummary]
$sel:trainingJobSummaries:ListTrainingJobsResponse' :: ListTrainingJobsResponse -> [TrainingJobSummary]
trainingJobSummaries} -> [TrainingJobSummary]
trainingJobSummaries) (\s :: ListTrainingJobsResponse
s@ListTrainingJobsResponse' {} [TrainingJobSummary]
a -> ListTrainingJobsResponse
s {$sel:trainingJobSummaries:ListTrainingJobsResponse' :: [TrainingJobSummary]
trainingJobSummaries = [TrainingJobSummary]
a} :: ListTrainingJobsResponse) 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 ListTrainingJobsResponse where
  rnf :: ListTrainingJobsResponse -> ()
rnf ListTrainingJobsResponse' {Int
[TrainingJobSummary]
Maybe Text
trainingJobSummaries :: [TrainingJobSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:trainingJobSummaries:ListTrainingJobsResponse' :: ListTrainingJobsResponse -> [TrainingJobSummary]
$sel:httpStatus:ListTrainingJobsResponse' :: ListTrainingJobsResponse -> Int
$sel:nextToken:ListTrainingJobsResponse' :: ListTrainingJobsResponse -> 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 [TrainingJobSummary]
trainingJobSummaries