{-# 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.ListTransformJobs
-- 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 transform jobs.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListTransformJobs
  ( -- * Creating a Request
    ListTransformJobs (..),
    newListTransformJobs,

    -- * Request Lenses
    listTransformJobs_creationTimeAfter,
    listTransformJobs_creationTimeBefore,
    listTransformJobs_lastModifiedTimeAfter,
    listTransformJobs_lastModifiedTimeBefore,
    listTransformJobs_maxResults,
    listTransformJobs_nameContains,
    listTransformJobs_nextToken,
    listTransformJobs_sortBy,
    listTransformJobs_sortOrder,
    listTransformJobs_statusEquals,

    -- * Destructuring the Response
    ListTransformJobsResponse (..),
    newListTransformJobsResponse,

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

-- |
-- Create a value of 'ListTransformJobs' 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', 'listTransformJobs_creationTimeAfter' - A filter that returns only transform jobs created after the specified
-- time.
--
-- 'creationTimeBefore', 'listTransformJobs_creationTimeBefore' - A filter that returns only transform jobs created before the specified
-- time.
--
-- 'lastModifiedTimeAfter', 'listTransformJobs_lastModifiedTimeAfter' - A filter that returns only transform jobs modified after the specified
-- time.
--
-- 'lastModifiedTimeBefore', 'listTransformJobs_lastModifiedTimeBefore' - A filter that returns only transform jobs modified before the specified
-- time.
--
-- 'maxResults', 'listTransformJobs_maxResults' - The maximum number of transform jobs to return in the response. The
-- default value is @10@.
--
-- 'nameContains', 'listTransformJobs_nameContains' - A string in the transform job name. This filter returns only transform
-- jobs whose name contains the specified string.
--
-- 'nextToken', 'listTransformJobs_nextToken' - If the result of the previous @ListTransformJobs@ request was truncated,
-- the response includes a @NextToken@. To retrieve the next set of
-- transform jobs, use the token in the next request.
--
-- 'sortBy', 'listTransformJobs_sortBy' - The field to sort results by. The default is @CreationTime@.
--
-- 'sortOrder', 'listTransformJobs_sortOrder' - The sort order for results. The default is @Descending@.
--
-- 'statusEquals', 'listTransformJobs_statusEquals' - A filter that retrieves only transform jobs with a specific status.
newListTransformJobs ::
  ListTransformJobs
newListTransformJobs :: ListTransformJobs
newListTransformJobs =
  ListTransformJobs'
    { $sel:creationTimeAfter:ListTransformJobs' :: Maybe POSIX
creationTimeAfter =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListTransformJobs' :: Maybe POSIX
creationTimeBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeAfter:ListTransformJobs' :: Maybe POSIX
lastModifiedTimeAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeBefore:ListTransformJobs' :: Maybe POSIX
lastModifiedTimeBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListTransformJobs' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nameContains:ListTransformJobs' :: Maybe Text
nameContains = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTransformJobs' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListTransformJobs' :: Maybe SortBy
sortBy = forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListTransformJobs' :: Maybe SortOrder
sortOrder = forall a. Maybe a
Prelude.Nothing,
      $sel:statusEquals:ListTransformJobs' :: Maybe TransformJobStatus
statusEquals = forall a. Maybe a
Prelude.Nothing
    }

-- | A filter that returns only transform jobs created after the specified
-- time.
listTransformJobs_creationTimeAfter :: Lens.Lens' ListTransformJobs (Prelude.Maybe Prelude.UTCTime)
listTransformJobs_creationTimeAfter :: Lens' ListTransformJobs (Maybe UTCTime)
listTransformJobs_creationTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTransformJobs' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListTransformJobs
s@ListTransformJobs' {} Maybe POSIX
a -> ListTransformJobs
s {$sel:creationTimeAfter:ListTransformJobs' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListTransformJobs) 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 transform jobs created before the specified
-- time.
listTransformJobs_creationTimeBefore :: Lens.Lens' ListTransformJobs (Prelude.Maybe Prelude.UTCTime)
listTransformJobs_creationTimeBefore :: Lens' ListTransformJobs (Maybe UTCTime)
listTransformJobs_creationTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTransformJobs' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListTransformJobs
s@ListTransformJobs' {} Maybe POSIX
a -> ListTransformJobs
s {$sel:creationTimeBefore:ListTransformJobs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListTransformJobs) 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 transform jobs modified after the specified
-- time.
listTransformJobs_lastModifiedTimeAfter :: Lens.Lens' ListTransformJobs (Prelude.Maybe Prelude.UTCTime)
listTransformJobs_lastModifiedTimeAfter :: Lens' ListTransformJobs (Maybe UTCTime)
listTransformJobs_lastModifiedTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTransformJobs' {Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
$sel:lastModifiedTimeAfter:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
lastModifiedTimeAfter} -> Maybe POSIX
lastModifiedTimeAfter) (\s :: ListTransformJobs
s@ListTransformJobs' {} Maybe POSIX
a -> ListTransformJobs
s {$sel:lastModifiedTimeAfter:ListTransformJobs' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
a} :: ListTransformJobs) 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 transform jobs modified before the specified
-- time.
listTransformJobs_lastModifiedTimeBefore :: Lens.Lens' ListTransformJobs (Prelude.Maybe Prelude.UTCTime)
listTransformJobs_lastModifiedTimeBefore :: Lens' ListTransformJobs (Maybe UTCTime)
listTransformJobs_lastModifiedTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTransformJobs' {Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
$sel:lastModifiedTimeBefore:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
lastModifiedTimeBefore} -> Maybe POSIX
lastModifiedTimeBefore) (\s :: ListTransformJobs
s@ListTransformJobs' {} Maybe POSIX
a -> ListTransformJobs
s {$sel:lastModifiedTimeBefore:ListTransformJobs' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
a} :: ListTransformJobs) 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 transform jobs to return in the response. The
-- default value is @10@.
listTransformJobs_maxResults :: Lens.Lens' ListTransformJobs (Prelude.Maybe Prelude.Natural)
listTransformJobs_maxResults :: Lens' ListTransformJobs (Maybe Natural)
listTransformJobs_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTransformJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTransformJobs' :: ListTransformJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTransformJobs
s@ListTransformJobs' {} Maybe Natural
a -> ListTransformJobs
s {$sel:maxResults:ListTransformJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTransformJobs)

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

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

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

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

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

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

instance Prelude.Hashable ListTransformJobs where
  hashWithSalt :: Int -> ListTransformJobs -> Int
hashWithSalt Int
_salt ListTransformJobs' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortBy
Maybe SortOrder
Maybe TransformJobStatus
statusEquals :: Maybe TransformJobStatus
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:statusEquals:ListTransformJobs' :: ListTransformJobs -> Maybe TransformJobStatus
$sel:sortOrder:ListTransformJobs' :: ListTransformJobs -> Maybe SortOrder
$sel:sortBy:ListTransformJobs' :: ListTransformJobs -> Maybe SortBy
$sel:nextToken:ListTransformJobs' :: ListTransformJobs -> Maybe Text
$sel:nameContains:ListTransformJobs' :: ListTransformJobs -> Maybe Text
$sel:maxResults:ListTransformJobs' :: ListTransformJobs -> Maybe Natural
$sel:lastModifiedTimeBefore:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
$sel:creationTimeBefore:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
$sel:creationTimeAfter:ListTransformJobs' :: ListTransformJobs -> 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 TransformJobStatus
statusEquals

instance Prelude.NFData ListTransformJobs where
  rnf :: ListTransformJobs -> ()
rnf ListTransformJobs' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortBy
Maybe SortOrder
Maybe TransformJobStatus
statusEquals :: Maybe TransformJobStatus
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:statusEquals:ListTransformJobs' :: ListTransformJobs -> Maybe TransformJobStatus
$sel:sortOrder:ListTransformJobs' :: ListTransformJobs -> Maybe SortOrder
$sel:sortBy:ListTransformJobs' :: ListTransformJobs -> Maybe SortBy
$sel:nextToken:ListTransformJobs' :: ListTransformJobs -> Maybe Text
$sel:nameContains:ListTransformJobs' :: ListTransformJobs -> Maybe Text
$sel:maxResults:ListTransformJobs' :: ListTransformJobs -> Maybe Natural
$sel:lastModifiedTimeBefore:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
$sel:creationTimeBefore:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
$sel:creationTimeAfter:ListTransformJobs' :: ListTransformJobs -> 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 TransformJobStatus
statusEquals

instance Data.ToHeaders ListTransformJobs where
  toHeaders :: ListTransformJobs -> 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.ListTransformJobs" ::
                          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 ListTransformJobs where
  toJSON :: ListTransformJobs -> Value
toJSON ListTransformJobs' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortBy
Maybe SortOrder
Maybe TransformJobStatus
statusEquals :: Maybe TransformJobStatus
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:statusEquals:ListTransformJobs' :: ListTransformJobs -> Maybe TransformJobStatus
$sel:sortOrder:ListTransformJobs' :: ListTransformJobs -> Maybe SortOrder
$sel:sortBy:ListTransformJobs' :: ListTransformJobs -> Maybe SortBy
$sel:nextToken:ListTransformJobs' :: ListTransformJobs -> Maybe Text
$sel:nameContains:ListTransformJobs' :: ListTransformJobs -> Maybe Text
$sel:maxResults:ListTransformJobs' :: ListTransformJobs -> Maybe Natural
$sel:lastModifiedTimeBefore:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
$sel:creationTimeBefore:ListTransformJobs' :: ListTransformJobs -> Maybe POSIX
$sel:creationTimeAfter:ListTransformJobs' :: ListTransformJobs -> 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 TransformJobStatus
statusEquals
          ]
      )

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

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

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

-- |
-- Create a value of 'ListTransformJobsResponse' 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', 'listTransformJobsResponse_nextToken' - If the response is truncated, Amazon SageMaker returns this token. To
-- retrieve the next set of transform jobs, use it in the next request.
--
-- 'httpStatus', 'listTransformJobsResponse_httpStatus' - The response's http status code.
--
-- 'transformJobSummaries', 'listTransformJobsResponse_transformJobSummaries' - An array of @TransformJobSummary@ objects.
newListTransformJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTransformJobsResponse
newListTransformJobsResponse :: Int -> ListTransformJobsResponse
newListTransformJobsResponse Int
pHttpStatus_ =
  ListTransformJobsResponse'
    { $sel:nextToken:ListTransformJobsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListTransformJobsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:transformJobSummaries:ListTransformJobsResponse' :: [TransformJobSummary]
transformJobSummaries = forall a. Monoid a => a
Prelude.mempty
    }

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

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

-- | An array of @TransformJobSummary@ objects.
listTransformJobsResponse_transformJobSummaries :: Lens.Lens' ListTransformJobsResponse [TransformJobSummary]
listTransformJobsResponse_transformJobSummaries :: Lens' ListTransformJobsResponse [TransformJobSummary]
listTransformJobsResponse_transformJobSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTransformJobsResponse' {[TransformJobSummary]
transformJobSummaries :: [TransformJobSummary]
$sel:transformJobSummaries:ListTransformJobsResponse' :: ListTransformJobsResponse -> [TransformJobSummary]
transformJobSummaries} -> [TransformJobSummary]
transformJobSummaries) (\s :: ListTransformJobsResponse
s@ListTransformJobsResponse' {} [TransformJobSummary]
a -> ListTransformJobsResponse
s {$sel:transformJobSummaries:ListTransformJobsResponse' :: [TransformJobSummary]
transformJobSummaries = [TransformJobSummary]
a} :: ListTransformJobsResponse) 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 ListTransformJobsResponse where
  rnf :: ListTransformJobsResponse -> ()
rnf ListTransformJobsResponse' {Int
[TransformJobSummary]
Maybe Text
transformJobSummaries :: [TransformJobSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:transformJobSummaries:ListTransformJobsResponse' :: ListTransformJobsResponse -> [TransformJobSummary]
$sel:httpStatus:ListTransformJobsResponse' :: ListTransformJobsResponse -> Int
$sel:nextToken:ListTransformJobsResponse' :: ListTransformJobsResponse -> 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 [TransformJobSummary]
transformJobSummaries