{-# 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.ListLabelingJobs
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a list of labeling jobs.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListLabelingJobs
  ( -- * Creating a Request
    ListLabelingJobs (..),
    newListLabelingJobs,

    -- * Request Lenses
    listLabelingJobs_nameContains,
    listLabelingJobs_lastModifiedTimeBefore,
    listLabelingJobs_creationTimeAfter,
    listLabelingJobs_nextToken,
    listLabelingJobs_sortOrder,
    listLabelingJobs_lastModifiedTimeAfter,
    listLabelingJobs_creationTimeBefore,
    listLabelingJobs_statusEquals,
    listLabelingJobs_maxResults,
    listLabelingJobs_sortBy,

    -- * Destructuring the Response
    ListLabelingJobsResponse (..),
    newListLabelingJobsResponse,

    -- * Response Lenses
    listLabelingJobsResponse_labelingJobSummaryList,
    listLabelingJobsResponse_nextToken,
    listLabelingJobsResponse_httpStatus,
  )
where

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

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

-- |
-- Create a value of 'ListLabelingJobs' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nameContains', 'listLabelingJobs_nameContains' - A string in the labeling job name. This filter returns only labeling
-- jobs whose name contains the specified string.
--
-- 'lastModifiedTimeBefore', 'listLabelingJobs_lastModifiedTimeBefore' - A filter that returns only labeling jobs modified before the specified
-- time (timestamp).
--
-- 'creationTimeAfter', 'listLabelingJobs_creationTimeAfter' - A filter that returns only labeling jobs created after the specified
-- time (timestamp).
--
-- 'nextToken', 'listLabelingJobs_nextToken' - If the result of the previous @ListLabelingJobs@ request was truncated,
-- the response includes a @NextToken@. To retrieve the next set of
-- labeling jobs, use the token in the next request.
--
-- 'sortOrder', 'listLabelingJobs_sortOrder' - The sort order for results. The default is @Ascending@.
--
-- 'lastModifiedTimeAfter', 'listLabelingJobs_lastModifiedTimeAfter' - A filter that returns only labeling jobs modified after the specified
-- time (timestamp).
--
-- 'creationTimeBefore', 'listLabelingJobs_creationTimeBefore' - A filter that returns only labeling jobs created before the specified
-- time (timestamp).
--
-- 'statusEquals', 'listLabelingJobs_statusEquals' - A filter that retrieves only labeling jobs with a specific status.
--
-- 'maxResults', 'listLabelingJobs_maxResults' - The maximum number of labeling jobs to return in each page of the
-- response.
--
-- 'sortBy', 'listLabelingJobs_sortBy' - The field to sort results by. The default is @CreationTime@.
newListLabelingJobs ::
  ListLabelingJobs
newListLabelingJobs :: ListLabelingJobs
newListLabelingJobs =
  ListLabelingJobs' :: Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe SortOrder
-> Maybe POSIX
-> Maybe POSIX
-> Maybe LabelingJobStatus
-> Maybe Natural
-> Maybe SortBy
-> ListLabelingJobs
ListLabelingJobs'
    { $sel:nameContains:ListLabelingJobs' :: Maybe Text
nameContains = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeBefore:ListLabelingJobs' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeAfter:ListLabelingJobs' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLabelingJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListLabelingJobs' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeAfter:ListLabelingJobs' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListLabelingJobs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:statusEquals:ListLabelingJobs' :: Maybe LabelingJobStatus
statusEquals = Maybe LabelingJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListLabelingJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListLabelingJobs' :: Maybe SortBy
sortBy = Maybe SortBy
forall a. Maybe a
Prelude.Nothing
    }

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

-- | A filter that returns only labeling jobs modified before the specified
-- time (timestamp).
listLabelingJobs_lastModifiedTimeBefore :: Lens.Lens' ListLabelingJobs (Prelude.Maybe Prelude.UTCTime)
listLabelingJobs_lastModifiedTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListLabelingJobs -> f ListLabelingJobs
listLabelingJobs_lastModifiedTimeBefore = (ListLabelingJobs -> Maybe POSIX)
-> (ListLabelingJobs -> Maybe POSIX -> ListLabelingJobs)
-> Lens
     ListLabelingJobs ListLabelingJobs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLabelingJobs' {Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
$sel:lastModifiedTimeBefore:ListLabelingJobs' :: ListLabelingJobs -> Maybe POSIX
lastModifiedTimeBefore} -> Maybe POSIX
lastModifiedTimeBefore) (\s :: ListLabelingJobs
s@ListLabelingJobs' {} Maybe POSIX
a -> ListLabelingJobs
s {$sel:lastModifiedTimeBefore:ListLabelingJobs' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
a} :: ListLabelingJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListLabelingJobs -> f ListLabelingJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListLabelingJobs
-> f ListLabelingJobs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A filter that returns only labeling jobs created after the specified
-- time (timestamp).
listLabelingJobs_creationTimeAfter :: Lens.Lens' ListLabelingJobs (Prelude.Maybe Prelude.UTCTime)
listLabelingJobs_creationTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListLabelingJobs -> f ListLabelingJobs
listLabelingJobs_creationTimeAfter = (ListLabelingJobs -> Maybe POSIX)
-> (ListLabelingJobs -> Maybe POSIX -> ListLabelingJobs)
-> Lens
     ListLabelingJobs ListLabelingJobs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLabelingJobs' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListLabelingJobs' :: ListLabelingJobs -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListLabelingJobs
s@ListLabelingJobs' {} Maybe POSIX
a -> ListLabelingJobs
s {$sel:creationTimeAfter:ListLabelingJobs' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListLabelingJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListLabelingJobs -> f ListLabelingJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListLabelingJobs
-> f ListLabelingJobs
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

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

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

-- | A filter that returns only labeling jobs modified after the specified
-- time (timestamp).
listLabelingJobs_lastModifiedTimeAfter :: Lens.Lens' ListLabelingJobs (Prelude.Maybe Prelude.UTCTime)
listLabelingJobs_lastModifiedTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListLabelingJobs -> f ListLabelingJobs
listLabelingJobs_lastModifiedTimeAfter = (ListLabelingJobs -> Maybe POSIX)
-> (ListLabelingJobs -> Maybe POSIX -> ListLabelingJobs)
-> Lens
     ListLabelingJobs ListLabelingJobs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLabelingJobs' {Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
$sel:lastModifiedTimeAfter:ListLabelingJobs' :: ListLabelingJobs -> Maybe POSIX
lastModifiedTimeAfter} -> Maybe POSIX
lastModifiedTimeAfter) (\s :: ListLabelingJobs
s@ListLabelingJobs' {} Maybe POSIX
a -> ListLabelingJobs
s {$sel:lastModifiedTimeAfter:ListLabelingJobs' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
a} :: ListLabelingJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListLabelingJobs -> f ListLabelingJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListLabelingJobs
-> f ListLabelingJobs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A filter that returns only labeling jobs created before the specified
-- time (timestamp).
listLabelingJobs_creationTimeBefore :: Lens.Lens' ListLabelingJobs (Prelude.Maybe Prelude.UTCTime)
listLabelingJobs_creationTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListLabelingJobs -> f ListLabelingJobs
listLabelingJobs_creationTimeBefore = (ListLabelingJobs -> Maybe POSIX)
-> (ListLabelingJobs -> Maybe POSIX -> ListLabelingJobs)
-> Lens
     ListLabelingJobs ListLabelingJobs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLabelingJobs' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListLabelingJobs' :: ListLabelingJobs -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListLabelingJobs
s@ListLabelingJobs' {} Maybe POSIX
a -> ListLabelingJobs
s {$sel:creationTimeBefore:ListLabelingJobs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListLabelingJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListLabelingJobs -> f ListLabelingJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListLabelingJobs
-> f ListLabelingJobs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

-- | The maximum number of labeling jobs to return in each page of the
-- response.
listLabelingJobs_maxResults :: Lens.Lens' ListLabelingJobs (Prelude.Maybe Prelude.Natural)
listLabelingJobs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListLabelingJobs -> f ListLabelingJobs
listLabelingJobs_maxResults = (ListLabelingJobs -> Maybe Natural)
-> (ListLabelingJobs -> Maybe Natural -> ListLabelingJobs)
-> Lens
     ListLabelingJobs ListLabelingJobs (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLabelingJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListLabelingJobs' :: ListLabelingJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListLabelingJobs
s@ListLabelingJobs' {} Maybe Natural
a -> ListLabelingJobs
s {$sel:maxResults:ListLabelingJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListLabelingJobs)

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

instance Core.AWSPager ListLabelingJobs where
  page :: ListLabelingJobs
-> AWSResponse ListLabelingJobs -> Maybe ListLabelingJobs
page ListLabelingJobs
rq AWSResponse ListLabelingJobs
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLabelingJobs
ListLabelingJobsResponse
rs
            ListLabelingJobsResponse
-> Getting (First Text) ListLabelingJobsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListLabelingJobsResponse
-> Const (First Text) ListLabelingJobsResponse
Lens' ListLabelingJobsResponse (Maybe Text)
listLabelingJobsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListLabelingJobsResponse
 -> Const (First Text) ListLabelingJobsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListLabelingJobsResponse 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 ListLabelingJobs
forall a. Maybe a
Prelude.Nothing
    | Maybe [LabelingJobSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListLabelingJobs
ListLabelingJobsResponse
rs
            ListLabelingJobsResponse
-> Getting
     (First [LabelingJobSummary])
     ListLabelingJobsResponse
     [LabelingJobSummary]
-> Maybe [LabelingJobSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [LabelingJobSummary]
 -> Const (First [LabelingJobSummary]) (Maybe [LabelingJobSummary]))
-> ListLabelingJobsResponse
-> Const (First [LabelingJobSummary]) ListLabelingJobsResponse
Lens' ListLabelingJobsResponse (Maybe [LabelingJobSummary])
listLabelingJobsResponse_labelingJobSummaryList
              ((Maybe [LabelingJobSummary]
  -> Const (First [LabelingJobSummary]) (Maybe [LabelingJobSummary]))
 -> ListLabelingJobsResponse
 -> Const (First [LabelingJobSummary]) ListLabelingJobsResponse)
-> (([LabelingJobSummary]
     -> Const (First [LabelingJobSummary]) [LabelingJobSummary])
    -> Maybe [LabelingJobSummary]
    -> Const (First [LabelingJobSummary]) (Maybe [LabelingJobSummary]))
-> Getting
     (First [LabelingJobSummary])
     ListLabelingJobsResponse
     [LabelingJobSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([LabelingJobSummary]
 -> Const (First [LabelingJobSummary]) [LabelingJobSummary])
-> Maybe [LabelingJobSummary]
-> Const (First [LabelingJobSummary]) (Maybe [LabelingJobSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListLabelingJobs
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListLabelingJobs -> Maybe ListLabelingJobs
forall a. a -> Maybe a
Prelude.Just (ListLabelingJobs -> Maybe ListLabelingJobs)
-> ListLabelingJobs -> Maybe ListLabelingJobs
forall a b. (a -> b) -> a -> b
Prelude.$
        ListLabelingJobs
rq
          ListLabelingJobs
-> (ListLabelingJobs -> ListLabelingJobs) -> ListLabelingJobs
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListLabelingJobs -> Identity ListLabelingJobs
Lens ListLabelingJobs ListLabelingJobs (Maybe Text) (Maybe Text)
listLabelingJobs_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListLabelingJobs -> Identity ListLabelingJobs)
-> Maybe Text -> ListLabelingJobs -> ListLabelingJobs
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListLabelingJobs
ListLabelingJobsResponse
rs
          ListLabelingJobsResponse
-> Getting (First Text) ListLabelingJobsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListLabelingJobsResponse
-> Const (First Text) ListLabelingJobsResponse
Lens' ListLabelingJobsResponse (Maybe Text)
listLabelingJobsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListLabelingJobsResponse
 -> Const (First Text) ListLabelingJobsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListLabelingJobsResponse 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 ListLabelingJobs where
  type
    AWSResponse ListLabelingJobs =
      ListLabelingJobsResponse
  request :: ListLabelingJobs -> Request ListLabelingJobs
request = Service -> ListLabelingJobs -> Request ListLabelingJobs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListLabelingJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListLabelingJobs)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListLabelingJobs))
-> Logger
-> Service
-> Proxy ListLabelingJobs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListLabelingJobs)))
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 [LabelingJobSummary]
-> Maybe Text -> Int -> ListLabelingJobsResponse
ListLabelingJobsResponse'
            (Maybe [LabelingJobSummary]
 -> Maybe Text -> Int -> ListLabelingJobsResponse)
-> Either String (Maybe [LabelingJobSummary])
-> Either String (Maybe Text -> Int -> ListLabelingJobsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [LabelingJobSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LabelingJobSummaryList"
                            Either String (Maybe (Maybe [LabelingJobSummary]))
-> Maybe [LabelingJobSummary]
-> Either String (Maybe [LabelingJobSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [LabelingJobSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListLabelingJobsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListLabelingJobsResponse)
forall (f :: * -> *) a b. Applicative f => 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 -> ListLabelingJobsResponse)
-> Either String Int -> Either String ListLabelingJobsResponse
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))
      )

instance Prelude.Hashable ListLabelingJobs

instance Prelude.NFData ListLabelingJobs

instance Core.ToHeaders ListLabelingJobs where
  toHeaders :: ListLabelingJobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListLabelingJobs -> 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.ListLabelingJobs" :: 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 ListLabelingJobs where
  toJSON :: ListLabelingJobs -> Value
toJSON ListLabelingJobs' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe LabelingJobStatus
Maybe SortBy
Maybe SortOrder
sortBy :: Maybe SortBy
maxResults :: Maybe Natural
statusEquals :: Maybe LabelingJobStatus
creationTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
creationTimeAfter :: Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
nameContains :: Maybe Text
$sel:sortBy:ListLabelingJobs' :: ListLabelingJobs -> Maybe SortBy
$sel:maxResults:ListLabelingJobs' :: ListLabelingJobs -> Maybe Natural
$sel:statusEquals:ListLabelingJobs' :: ListLabelingJobs -> Maybe LabelingJobStatus
$sel:creationTimeBefore:ListLabelingJobs' :: ListLabelingJobs -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListLabelingJobs' :: ListLabelingJobs -> Maybe POSIX
$sel:sortOrder:ListLabelingJobs' :: ListLabelingJobs -> Maybe SortOrder
$sel:nextToken:ListLabelingJobs' :: ListLabelingJobs -> Maybe Text
$sel:creationTimeAfter:ListLabelingJobs' :: ListLabelingJobs -> Maybe POSIX
$sel:lastModifiedTimeBefore:ListLabelingJobs' :: ListLabelingJobs -> Maybe POSIX
$sel:nameContains:ListLabelingJobs' :: ListLabelingJobs -> 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 -> LabelingJobStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LabelingJobStatus -> Pair)
-> Maybe LabelingJobStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LabelingJobStatus
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 ListLabelingJobs where
  toPath :: ListLabelingJobs -> ByteString
toPath = ByteString -> ListLabelingJobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListLabelingJobsResponse' 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:
--
-- 'labelingJobSummaryList', 'listLabelingJobsResponse_labelingJobSummaryList' - An array of @LabelingJobSummary@ objects, each describing a labeling
-- job.
--
-- 'nextToken', 'listLabelingJobsResponse_nextToken' - If the response is truncated, Amazon SageMaker returns this token. To
-- retrieve the next set of labeling jobs, use it in the subsequent
-- request.
--
-- 'httpStatus', 'listLabelingJobsResponse_httpStatus' - The response's http status code.
newListLabelingJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListLabelingJobsResponse
newListLabelingJobsResponse :: Int -> ListLabelingJobsResponse
newListLabelingJobsResponse Int
pHttpStatus_ =
  ListLabelingJobsResponse' :: Maybe [LabelingJobSummary]
-> Maybe Text -> Int -> ListLabelingJobsResponse
ListLabelingJobsResponse'
    { $sel:labelingJobSummaryList:ListLabelingJobsResponse' :: Maybe [LabelingJobSummary]
labelingJobSummaryList =
        Maybe [LabelingJobSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListLabelingJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListLabelingJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of @LabelingJobSummary@ objects, each describing a labeling
-- job.
listLabelingJobsResponse_labelingJobSummaryList :: Lens.Lens' ListLabelingJobsResponse (Prelude.Maybe [LabelingJobSummary])
listLabelingJobsResponse_labelingJobSummaryList :: (Maybe [LabelingJobSummary] -> f (Maybe [LabelingJobSummary]))
-> ListLabelingJobsResponse -> f ListLabelingJobsResponse
listLabelingJobsResponse_labelingJobSummaryList = (ListLabelingJobsResponse -> Maybe [LabelingJobSummary])
-> (ListLabelingJobsResponse
    -> Maybe [LabelingJobSummary] -> ListLabelingJobsResponse)
-> Lens' ListLabelingJobsResponse (Maybe [LabelingJobSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLabelingJobsResponse' {Maybe [LabelingJobSummary]
labelingJobSummaryList :: Maybe [LabelingJobSummary]
$sel:labelingJobSummaryList:ListLabelingJobsResponse' :: ListLabelingJobsResponse -> Maybe [LabelingJobSummary]
labelingJobSummaryList} -> Maybe [LabelingJobSummary]
labelingJobSummaryList) (\s :: ListLabelingJobsResponse
s@ListLabelingJobsResponse' {} Maybe [LabelingJobSummary]
a -> ListLabelingJobsResponse
s {$sel:labelingJobSummaryList:ListLabelingJobsResponse' :: Maybe [LabelingJobSummary]
labelingJobSummaryList = Maybe [LabelingJobSummary]
a} :: ListLabelingJobsResponse) ((Maybe [LabelingJobSummary] -> f (Maybe [LabelingJobSummary]))
 -> ListLabelingJobsResponse -> f ListLabelingJobsResponse)
-> ((Maybe [LabelingJobSummary] -> f (Maybe [LabelingJobSummary]))
    -> Maybe [LabelingJobSummary] -> f (Maybe [LabelingJobSummary]))
-> (Maybe [LabelingJobSummary] -> f (Maybe [LabelingJobSummary]))
-> ListLabelingJobsResponse
-> f ListLabelingJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LabelingJobSummary]
  [LabelingJobSummary]
  [LabelingJobSummary]
  [LabelingJobSummary]
-> Iso
     (Maybe [LabelingJobSummary])
     (Maybe [LabelingJobSummary])
     (Maybe [LabelingJobSummary])
     (Maybe [LabelingJobSummary])
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
  [LabelingJobSummary]
  [LabelingJobSummary]
  [LabelingJobSummary]
  [LabelingJobSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

instance Prelude.NFData ListLabelingJobsResponse