{-# 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 #-}
module Amazonka.SageMaker.ListTrainingJobs
(
ListTrainingJobs (..),
newListTrainingJobs,
listTrainingJobs_nameContains,
listTrainingJobs_lastModifiedTimeBefore,
listTrainingJobs_creationTimeAfter,
listTrainingJobs_nextToken,
listTrainingJobs_sortOrder,
listTrainingJobs_lastModifiedTimeAfter,
listTrainingJobs_creationTimeBefore,
listTrainingJobs_statusEquals,
listTrainingJobs_maxResults,
listTrainingJobs_sortBy,
ListTrainingJobsResponse (..),
newListTrainingJobsResponse,
listTrainingJobsResponse_nextToken,
listTrainingJobsResponse_httpStatus,
listTrainingJobsResponse_trainingJobSummaries,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types
data ListTrainingJobs = ListTrainingJobs'
{
ListTrainingJobs -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
ListTrainingJobs -> Maybe POSIX
lastModifiedTimeBefore :: Prelude.Maybe Core.POSIX,
ListTrainingJobs -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Core.POSIX,
ListTrainingJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTrainingJobs -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
ListTrainingJobs -> Maybe POSIX
lastModifiedTimeAfter :: Prelude.Maybe Core.POSIX,
ListTrainingJobs -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Core.POSIX,
ListTrainingJobs -> Maybe TrainingJobStatus
statusEquals :: Prelude.Maybe TrainingJobStatus,
ListTrainingJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListTrainingJobs -> Maybe SortBy
sortBy :: Prelude.Maybe SortBy
}
deriving (ListTrainingJobs -> ListTrainingJobs -> Bool
(ListTrainingJobs -> ListTrainingJobs -> Bool)
-> (ListTrainingJobs -> ListTrainingJobs -> Bool)
-> Eq ListTrainingJobs
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]
(Int -> ReadS ListTrainingJobs)
-> ReadS [ListTrainingJobs]
-> ReadPrec ListTrainingJobs
-> ReadPrec [ListTrainingJobs]
-> Read 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
(Int -> ListTrainingJobs -> ShowS)
-> (ListTrainingJobs -> String)
-> ([ListTrainingJobs] -> ShowS)
-> Show ListTrainingJobs
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. ListTrainingJobs -> Rep ListTrainingJobs x)
-> (forall x. Rep ListTrainingJobs x -> ListTrainingJobs)
-> Generic ListTrainingJobs
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)
newListTrainingJobs ::
ListTrainingJobs
newListTrainingJobs :: ListTrainingJobs
newListTrainingJobs =
ListTrainingJobs' :: Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe SortOrder
-> Maybe POSIX
-> Maybe POSIX
-> Maybe TrainingJobStatus
-> Maybe Natural
-> Maybe SortBy
-> ListTrainingJobs
ListTrainingJobs'
{ $sel:nameContains:ListTrainingJobs' :: Maybe Text
nameContains = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTimeBefore:ListTrainingJobs' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimeAfter:ListTrainingJobs' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListTrainingJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:ListTrainingJobs' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTimeAfter:ListTrainingJobs' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimeBefore:ListTrainingJobs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:statusEquals:ListTrainingJobs' :: Maybe TrainingJobStatus
statusEquals = Maybe TrainingJobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListTrainingJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:ListTrainingJobs' :: Maybe SortBy
sortBy = Maybe SortBy
forall a. Maybe a
Prelude.Nothing
}
listTrainingJobs_nameContains :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.Text)
listTrainingJobs_nameContains :: (Maybe Text -> f (Maybe Text))
-> ListTrainingJobs -> f ListTrainingJobs
listTrainingJobs_nameContains = (ListTrainingJobs -> Maybe Text)
-> (ListTrainingJobs -> Maybe Text -> ListTrainingJobs)
-> Lens ListTrainingJobs ListTrainingJobs (Maybe Text) (Maybe Text)
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)
listTrainingJobs_lastModifiedTimeBefore :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.UTCTime)
listTrainingJobs_lastModifiedTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrainingJobs -> f ListTrainingJobs
listTrainingJobs_lastModifiedTimeBefore = (ListTrainingJobs -> Maybe POSIX)
-> (ListTrainingJobs -> Maybe POSIX -> ListTrainingJobs)
-> Lens
ListTrainingJobs ListTrainingJobs (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
-> ListTrainingJobs -> f ListTrainingJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrainingJobs
-> f ListTrainingJobs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listTrainingJobs_creationTimeAfter :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.UTCTime)
listTrainingJobs_creationTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrainingJobs -> f ListTrainingJobs
listTrainingJobs_creationTimeAfter = (ListTrainingJobs -> Maybe POSIX)
-> (ListTrainingJobs -> Maybe POSIX -> ListTrainingJobs)
-> Lens
ListTrainingJobs ListTrainingJobs (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
-> ListTrainingJobs -> f ListTrainingJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrainingJobs
-> f ListTrainingJobs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listTrainingJobs_nextToken :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.Text)
listTrainingJobs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTrainingJobs -> f ListTrainingJobs
listTrainingJobs_nextToken = (ListTrainingJobs -> Maybe Text)
-> (ListTrainingJobs -> Maybe Text -> ListTrainingJobs)
-> Lens ListTrainingJobs ListTrainingJobs (Maybe Text) (Maybe Text)
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)
listTrainingJobs_sortOrder :: Lens.Lens' ListTrainingJobs (Prelude.Maybe SortOrder)
listTrainingJobs_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> ListTrainingJobs -> f ListTrainingJobs
listTrainingJobs_sortOrder = (ListTrainingJobs -> Maybe SortOrder)
-> (ListTrainingJobs -> Maybe SortOrder -> ListTrainingJobs)
-> Lens
ListTrainingJobs
ListTrainingJobs
(Maybe SortOrder)
(Maybe 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)
listTrainingJobs_lastModifiedTimeAfter :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.UTCTime)
listTrainingJobs_lastModifiedTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrainingJobs -> f ListTrainingJobs
listTrainingJobs_lastModifiedTimeAfter = (ListTrainingJobs -> Maybe POSIX)
-> (ListTrainingJobs -> Maybe POSIX -> ListTrainingJobs)
-> Lens
ListTrainingJobs ListTrainingJobs (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
-> ListTrainingJobs -> f ListTrainingJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrainingJobs
-> f ListTrainingJobs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listTrainingJobs_creationTimeBefore :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.UTCTime)
listTrainingJobs_creationTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrainingJobs -> f ListTrainingJobs
listTrainingJobs_creationTimeBefore = (ListTrainingJobs -> Maybe POSIX)
-> (ListTrainingJobs -> Maybe POSIX -> ListTrainingJobs)
-> Lens
ListTrainingJobs ListTrainingJobs (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
-> ListTrainingJobs -> f ListTrainingJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrainingJobs
-> f ListTrainingJobs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listTrainingJobs_statusEquals :: Lens.Lens' ListTrainingJobs (Prelude.Maybe TrainingJobStatus)
listTrainingJobs_statusEquals :: (Maybe TrainingJobStatus -> f (Maybe TrainingJobStatus))
-> ListTrainingJobs -> f ListTrainingJobs
listTrainingJobs_statusEquals = (ListTrainingJobs -> Maybe TrainingJobStatus)
-> (ListTrainingJobs
-> Maybe TrainingJobStatus -> ListTrainingJobs)
-> Lens
ListTrainingJobs
ListTrainingJobs
(Maybe TrainingJobStatus)
(Maybe TrainingJobStatus)
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)
listTrainingJobs_maxResults :: Lens.Lens' ListTrainingJobs (Prelude.Maybe Prelude.Natural)
listTrainingJobs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListTrainingJobs -> f ListTrainingJobs
listTrainingJobs_maxResults = (ListTrainingJobs -> Maybe Natural)
-> (ListTrainingJobs -> Maybe Natural -> ListTrainingJobs)
-> Lens
ListTrainingJobs ListTrainingJobs (Maybe Natural) (Maybe Natural)
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)
listTrainingJobs_sortBy :: Lens.Lens' ListTrainingJobs (Prelude.Maybe SortBy)
listTrainingJobs_sortBy :: (Maybe SortBy -> f (Maybe SortBy))
-> ListTrainingJobs -> f ListTrainingJobs
listTrainingJobs_sortBy = (ListTrainingJobs -> Maybe SortBy)
-> (ListTrainingJobs -> Maybe SortBy -> ListTrainingJobs)
-> Lens
ListTrainingJobs ListTrainingJobs (Maybe SortBy) (Maybe 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)
instance Core.AWSPager ListTrainingJobs where
page :: ListTrainingJobs
-> AWSResponse ListTrainingJobs -> Maybe ListTrainingJobs
page ListTrainingJobs
rq AWSResponse ListTrainingJobs
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTrainingJobs
ListTrainingJobsResponse
rs
ListTrainingJobsResponse
-> Getting (First Text) ListTrainingJobsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTrainingJobsResponse
-> Const (First Text) ListTrainingJobsResponse
Lens' ListTrainingJobsResponse (Maybe Text)
listTrainingJobsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTrainingJobsResponse
-> Const (First Text) ListTrainingJobsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTrainingJobsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListTrainingJobs
forall a. Maybe a
Prelude.Nothing
| [TrainingJobSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTrainingJobs
ListTrainingJobsResponse
rs
ListTrainingJobsResponse
-> Getting
[TrainingJobSummary] ListTrainingJobsResponse [TrainingJobSummary]
-> [TrainingJobSummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
[TrainingJobSummary] ListTrainingJobsResponse [TrainingJobSummary]
Lens' ListTrainingJobsResponse [TrainingJobSummary]
listTrainingJobsResponse_trainingJobSummaries
) =
Maybe ListTrainingJobs
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListTrainingJobs -> Maybe ListTrainingJobs
forall a. a -> Maybe a
Prelude.Just (ListTrainingJobs -> Maybe ListTrainingJobs)
-> ListTrainingJobs -> Maybe ListTrainingJobs
forall a b. (a -> b) -> a -> b
Prelude.$
ListTrainingJobs
rq
ListTrainingJobs
-> (ListTrainingJobs -> ListTrainingJobs) -> ListTrainingJobs
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListTrainingJobs -> Identity ListTrainingJobs
Lens ListTrainingJobs ListTrainingJobs (Maybe Text) (Maybe Text)
listTrainingJobs_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListTrainingJobs -> Identity ListTrainingJobs)
-> Maybe Text -> ListTrainingJobs -> ListTrainingJobs
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTrainingJobs
ListTrainingJobsResponse
rs
ListTrainingJobsResponse
-> Getting (First Text) ListTrainingJobsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTrainingJobsResponse
-> Const (First Text) ListTrainingJobsResponse
Lens' ListTrainingJobsResponse (Maybe Text)
listTrainingJobsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTrainingJobsResponse
-> Const (First Text) ListTrainingJobsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTrainingJobsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListTrainingJobs where
type
AWSResponse ListTrainingJobs =
ListTrainingJobsResponse
request :: ListTrainingJobs -> Request ListTrainingJobs
request = Service -> ListTrainingJobs -> Request ListTrainingJobs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListTrainingJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListTrainingJobs)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListTrainingJobs))
-> Logger
-> Service
-> Proxy ListTrainingJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListTrainingJobs)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Int -> [TrainingJobSummary] -> ListTrainingJobsResponse
ListTrainingJobsResponse'
(Maybe Text
-> Int -> [TrainingJobSummary] -> ListTrainingJobsResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> [TrainingJobSummary] -> ListTrainingJobsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either
String (Int -> [TrainingJobSummary] -> ListTrainingJobsResponse)
-> Either String Int
-> Either String ([TrainingJobSummary] -> ListTrainingJobsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String ([TrainingJobSummary] -> ListTrainingJobsResponse)
-> Either String [TrainingJobSummary]
-> Either String ListTrainingJobsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [TrainingJobSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TrainingJobSummaries"
Either String (Maybe [TrainingJobSummary])
-> [TrainingJobSummary] -> Either String [TrainingJobSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [TrainingJobSummary]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ListTrainingJobs
instance Prelude.NFData ListTrainingJobs
instance Core.ToHeaders ListTrainingJobs where
toHeaders :: ListTrainingJobs -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListTrainingJobs -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"SageMaker.ListTrainingJobs" :: Prelude.ByteString),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON ListTrainingJobs where
toJSON :: ListTrainingJobs -> Value
toJSON ListTrainingJobs' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortBy
Maybe SortOrder
Maybe TrainingJobStatus
sortBy :: Maybe SortBy
maxResults :: Maybe Natural
statusEquals :: Maybe TrainingJobStatus
creationTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
creationTimeAfter :: Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
nameContains :: Maybe Text
$sel:sortBy:ListTrainingJobs' :: ListTrainingJobs -> Maybe SortBy
$sel:maxResults:ListTrainingJobs' :: ListTrainingJobs -> Maybe Natural
$sel:statusEquals:ListTrainingJobs' :: ListTrainingJobs -> Maybe TrainingJobStatus
$sel:creationTimeBefore:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:sortOrder:ListTrainingJobs' :: ListTrainingJobs -> Maybe SortOrder
$sel:nextToken:ListTrainingJobs' :: ListTrainingJobs -> Maybe Text
$sel:creationTimeAfter:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:lastModifiedTimeBefore:ListTrainingJobs' :: ListTrainingJobs -> Maybe POSIX
$sel:nameContains:ListTrainingJobs' :: ListTrainingJobs -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NameContains" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nameContains,
(Text
"LastModifiedTimeBefore" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
lastModifiedTimeBefore,
(Text
"CreationTimeAfter" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeAfter,
(Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"SortOrder" Text -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
(Text
"LastModifiedTimeAfter" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
lastModifiedTimeAfter,
(Text
"CreationTimeBefore" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeBefore,
(Text
"StatusEquals" Text -> TrainingJobStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TrainingJobStatus -> Pair)
-> Maybe TrainingJobStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TrainingJobStatus
statusEquals,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Text
"SortBy" Text -> SortBy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortBy -> Pair) -> Maybe SortBy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortBy
sortBy
]
)
instance Core.ToPath ListTrainingJobs where
toPath :: ListTrainingJobs -> ByteString
toPath = ByteString -> ListTrainingJobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListTrainingJobs where
toQuery :: ListTrainingJobs -> QueryString
toQuery = QueryString -> ListTrainingJobs -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListTrainingJobsResponse = ListTrainingJobsResponse'
{
ListTrainingJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTrainingJobsResponse -> Int
httpStatus :: Prelude.Int,
ListTrainingJobsResponse -> [TrainingJobSummary]
trainingJobSummaries :: [TrainingJobSummary]
}
deriving (ListTrainingJobsResponse -> ListTrainingJobsResponse -> Bool
(ListTrainingJobsResponse -> ListTrainingJobsResponse -> Bool)
-> (ListTrainingJobsResponse -> ListTrainingJobsResponse -> Bool)
-> Eq ListTrainingJobsResponse
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]
(Int -> ReadS ListTrainingJobsResponse)
-> ReadS [ListTrainingJobsResponse]
-> ReadPrec ListTrainingJobsResponse
-> ReadPrec [ListTrainingJobsResponse]
-> Read 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
(Int -> ListTrainingJobsResponse -> ShowS)
-> (ListTrainingJobsResponse -> String)
-> ([ListTrainingJobsResponse] -> ShowS)
-> Show ListTrainingJobsResponse
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.
ListTrainingJobsResponse -> Rep ListTrainingJobsResponse x)
-> (forall x.
Rep ListTrainingJobsResponse x -> ListTrainingJobsResponse)
-> Generic ListTrainingJobsResponse
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)
newListTrainingJobsResponse ::
Prelude.Int ->
ListTrainingJobsResponse
newListTrainingJobsResponse :: Int -> ListTrainingJobsResponse
newListTrainingJobsResponse Int
pHttpStatus_ =
ListTrainingJobsResponse' :: Maybe Text
-> Int -> [TrainingJobSummary] -> ListTrainingJobsResponse
ListTrainingJobsResponse'
{ $sel:nextToken:ListTrainingJobsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListTrainingJobsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:trainingJobSummaries:ListTrainingJobsResponse' :: [TrainingJobSummary]
trainingJobSummaries = [TrainingJobSummary]
forall a. Monoid a => a
Prelude.mempty
}
listTrainingJobsResponse_nextToken :: Lens.Lens' ListTrainingJobsResponse (Prelude.Maybe Prelude.Text)
listTrainingJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTrainingJobsResponse -> f ListTrainingJobsResponse
listTrainingJobsResponse_nextToken = (ListTrainingJobsResponse -> Maybe Text)
-> (ListTrainingJobsResponse
-> Maybe Text -> ListTrainingJobsResponse)
-> Lens' ListTrainingJobsResponse (Maybe Text)
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)
listTrainingJobsResponse_httpStatus :: Lens.Lens' ListTrainingJobsResponse Prelude.Int
listTrainingJobsResponse_httpStatus :: (Int -> f Int)
-> ListTrainingJobsResponse -> f ListTrainingJobsResponse
listTrainingJobsResponse_httpStatus = (ListTrainingJobsResponse -> Int)
-> (ListTrainingJobsResponse -> Int -> ListTrainingJobsResponse)
-> Lens ListTrainingJobsResponse ListTrainingJobsResponse Int Int
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)
listTrainingJobsResponse_trainingJobSummaries :: Lens.Lens' ListTrainingJobsResponse [TrainingJobSummary]
listTrainingJobsResponse_trainingJobSummaries :: ([TrainingJobSummary] -> f [TrainingJobSummary])
-> ListTrainingJobsResponse -> f ListTrainingJobsResponse
listTrainingJobsResponse_trainingJobSummaries = (ListTrainingJobsResponse -> [TrainingJobSummary])
-> (ListTrainingJobsResponse
-> [TrainingJobSummary] -> ListTrainingJobsResponse)
-> Lens' ListTrainingJobsResponse [TrainingJobSummary]
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) (([TrainingJobSummary] -> f [TrainingJobSummary])
-> ListTrainingJobsResponse -> f ListTrainingJobsResponse)
-> (([TrainingJobSummary] -> f [TrainingJobSummary])
-> [TrainingJobSummary] -> f [TrainingJobSummary])
-> ([TrainingJobSummary] -> f [TrainingJobSummary])
-> ListTrainingJobsResponse
-> f ListTrainingJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([TrainingJobSummary] -> f [TrainingJobSummary])
-> [TrainingJobSummary] -> f [TrainingJobSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData ListTrainingJobsResponse