{-# 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.ListCompilationJobs
-- 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)
--
-- Lists model compilation jobs that satisfy various filters.
--
-- To create a model compilation job, use CreateCompilationJob. To get
-- information about a particular model compilation job you have created,
-- use DescribeCompilationJob.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListCompilationJobs
  ( -- * Creating a Request
    ListCompilationJobs (..),
    newListCompilationJobs,

    -- * Request Lenses
    listCompilationJobs_nameContains,
    listCompilationJobs_lastModifiedTimeBefore,
    listCompilationJobs_creationTimeAfter,
    listCompilationJobs_nextToken,
    listCompilationJobs_sortOrder,
    listCompilationJobs_lastModifiedTimeAfter,
    listCompilationJobs_creationTimeBefore,
    listCompilationJobs_statusEquals,
    listCompilationJobs_maxResults,
    listCompilationJobs_sortBy,

    -- * Destructuring the Response
    ListCompilationJobsResponse (..),
    newListCompilationJobsResponse,

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

-- |
-- Create a value of 'ListCompilationJobs' 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', 'listCompilationJobs_nameContains' - A filter that returns the model compilation jobs whose name contains a
-- specified string.
--
-- 'lastModifiedTimeBefore', 'listCompilationJobs_lastModifiedTimeBefore' - A filter that returns the model compilation jobs that were modified
-- before a specified time.
--
-- 'creationTimeAfter', 'listCompilationJobs_creationTimeAfter' - A filter that returns the model compilation jobs that were created after
-- a specified time.
--
-- 'nextToken', 'listCompilationJobs_nextToken' - If the result of the previous @ListCompilationJobs@ request was
-- truncated, the response includes a @NextToken@. To retrieve the next set
-- of model compilation jobs, use the token in the next request.
--
-- 'sortOrder', 'listCompilationJobs_sortOrder' - The sort order for results. The default is @Ascending@.
--
-- 'lastModifiedTimeAfter', 'listCompilationJobs_lastModifiedTimeAfter' - A filter that returns the model compilation jobs that were modified
-- after a specified time.
--
-- 'creationTimeBefore', 'listCompilationJobs_creationTimeBefore' - A filter that returns the model compilation jobs that were created
-- before a specified time.
--
-- 'statusEquals', 'listCompilationJobs_statusEquals' - A filter that retrieves model compilation jobs with a specific
-- DescribeCompilationJobResponse$CompilationJobStatus status.
--
-- 'maxResults', 'listCompilationJobs_maxResults' - The maximum number of model compilation jobs to return in the response.
--
-- 'sortBy', 'listCompilationJobs_sortBy' - The field by which to sort results. The default is @CreationTime@.
newListCompilationJobs ::
  ListCompilationJobs
newListCompilationJobs :: ListCompilationJobs
newListCompilationJobs =
  ListCompilationJobs' :: Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe SortOrder
-> Maybe POSIX
-> Maybe POSIX
-> Maybe CompilationJobStatus
-> Maybe Natural
-> Maybe ListCompilationJobsSortBy
-> ListCompilationJobs
ListCompilationJobs'
    { $sel:nameContains:ListCompilationJobs' :: Maybe Text
nameContains =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeBefore:ListCompilationJobs' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeAfter:ListCompilationJobs' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCompilationJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListCompilationJobs' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeAfter:ListCompilationJobs' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListCompilationJobs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:statusEquals:ListCompilationJobs' :: Maybe CompilationJobStatus
statusEquals = Maybe CompilationJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListCompilationJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListCompilationJobs' :: Maybe ListCompilationJobsSortBy
sortBy = Maybe ListCompilationJobsSortBy
forall a. Maybe a
Prelude.Nothing
    }

-- | A filter that returns the model compilation jobs whose name contains a
-- specified string.
listCompilationJobs_nameContains :: Lens.Lens' ListCompilationJobs (Prelude.Maybe Prelude.Text)
listCompilationJobs_nameContains :: (Maybe Text -> f (Maybe Text))
-> ListCompilationJobs -> f ListCompilationJobs
listCompilationJobs_nameContains = (ListCompilationJobs -> Maybe Text)
-> (ListCompilationJobs -> Maybe Text -> ListCompilationJobs)
-> Lens
     ListCompilationJobs ListCompilationJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCompilationJobs' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListCompilationJobs' :: ListCompilationJobs -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListCompilationJobs
s@ListCompilationJobs' {} Maybe Text
a -> ListCompilationJobs
s {$sel:nameContains:ListCompilationJobs' :: Maybe Text
nameContains = Maybe Text
a} :: ListCompilationJobs)

-- | A filter that returns the model compilation jobs that were modified
-- before a specified time.
listCompilationJobs_lastModifiedTimeBefore :: Lens.Lens' ListCompilationJobs (Prelude.Maybe Prelude.UTCTime)
listCompilationJobs_lastModifiedTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCompilationJobs -> f ListCompilationJobs
listCompilationJobs_lastModifiedTimeBefore = (ListCompilationJobs -> Maybe POSIX)
-> (ListCompilationJobs -> Maybe POSIX -> ListCompilationJobs)
-> Lens
     ListCompilationJobs ListCompilationJobs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCompilationJobs' {Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
$sel:lastModifiedTimeBefore:ListCompilationJobs' :: ListCompilationJobs -> Maybe POSIX
lastModifiedTimeBefore} -> Maybe POSIX
lastModifiedTimeBefore) (\s :: ListCompilationJobs
s@ListCompilationJobs' {} Maybe POSIX
a -> ListCompilationJobs
s {$sel:lastModifiedTimeBefore:ListCompilationJobs' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
a} :: ListCompilationJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListCompilationJobs -> f ListCompilationJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCompilationJobs
-> f ListCompilationJobs
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 the model compilation jobs that were created after
-- a specified time.
listCompilationJobs_creationTimeAfter :: Lens.Lens' ListCompilationJobs (Prelude.Maybe Prelude.UTCTime)
listCompilationJobs_creationTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCompilationJobs -> f ListCompilationJobs
listCompilationJobs_creationTimeAfter = (ListCompilationJobs -> Maybe POSIX)
-> (ListCompilationJobs -> Maybe POSIX -> ListCompilationJobs)
-> Lens
     ListCompilationJobs ListCompilationJobs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCompilationJobs' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListCompilationJobs' :: ListCompilationJobs -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListCompilationJobs
s@ListCompilationJobs' {} Maybe POSIX
a -> ListCompilationJobs
s {$sel:creationTimeAfter:ListCompilationJobs' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListCompilationJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListCompilationJobs -> f ListCompilationJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCompilationJobs
-> f ListCompilationJobs
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 @ListCompilationJobs@ request was
-- truncated, the response includes a @NextToken@. To retrieve the next set
-- of model compilation jobs, use the token in the next request.
listCompilationJobs_nextToken :: Lens.Lens' ListCompilationJobs (Prelude.Maybe Prelude.Text)
listCompilationJobs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListCompilationJobs -> f ListCompilationJobs
listCompilationJobs_nextToken = (ListCompilationJobs -> Maybe Text)
-> (ListCompilationJobs -> Maybe Text -> ListCompilationJobs)
-> Lens
     ListCompilationJobs ListCompilationJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCompilationJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCompilationJobs' :: ListCompilationJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCompilationJobs
s@ListCompilationJobs' {} Maybe Text
a -> ListCompilationJobs
s {$sel:nextToken:ListCompilationJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListCompilationJobs)

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

-- | A filter that returns the model compilation jobs that were modified
-- after a specified time.
listCompilationJobs_lastModifiedTimeAfter :: Lens.Lens' ListCompilationJobs (Prelude.Maybe Prelude.UTCTime)
listCompilationJobs_lastModifiedTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCompilationJobs -> f ListCompilationJobs
listCompilationJobs_lastModifiedTimeAfter = (ListCompilationJobs -> Maybe POSIX)
-> (ListCompilationJobs -> Maybe POSIX -> ListCompilationJobs)
-> Lens
     ListCompilationJobs ListCompilationJobs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCompilationJobs' {Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
$sel:lastModifiedTimeAfter:ListCompilationJobs' :: ListCompilationJobs -> Maybe POSIX
lastModifiedTimeAfter} -> Maybe POSIX
lastModifiedTimeAfter) (\s :: ListCompilationJobs
s@ListCompilationJobs' {} Maybe POSIX
a -> ListCompilationJobs
s {$sel:lastModifiedTimeAfter:ListCompilationJobs' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
a} :: ListCompilationJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListCompilationJobs -> f ListCompilationJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCompilationJobs
-> f ListCompilationJobs
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 the model compilation jobs that were created
-- before a specified time.
listCompilationJobs_creationTimeBefore :: Lens.Lens' ListCompilationJobs (Prelude.Maybe Prelude.UTCTime)
listCompilationJobs_creationTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCompilationJobs -> f ListCompilationJobs
listCompilationJobs_creationTimeBefore = (ListCompilationJobs -> Maybe POSIX)
-> (ListCompilationJobs -> Maybe POSIX -> ListCompilationJobs)
-> Lens
     ListCompilationJobs ListCompilationJobs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCompilationJobs' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListCompilationJobs' :: ListCompilationJobs -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListCompilationJobs
s@ListCompilationJobs' {} Maybe POSIX
a -> ListCompilationJobs
s {$sel:creationTimeBefore:ListCompilationJobs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListCompilationJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListCompilationJobs -> f ListCompilationJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCompilationJobs
-> f ListCompilationJobs
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 model compilation jobs with a specific
-- DescribeCompilationJobResponse$CompilationJobStatus status.
listCompilationJobs_statusEquals :: Lens.Lens' ListCompilationJobs (Prelude.Maybe CompilationJobStatus)
listCompilationJobs_statusEquals :: (Maybe CompilationJobStatus -> f (Maybe CompilationJobStatus))
-> ListCompilationJobs -> f ListCompilationJobs
listCompilationJobs_statusEquals = (ListCompilationJobs -> Maybe CompilationJobStatus)
-> (ListCompilationJobs
    -> Maybe CompilationJobStatus -> ListCompilationJobs)
-> Lens
     ListCompilationJobs
     ListCompilationJobs
     (Maybe CompilationJobStatus)
     (Maybe CompilationJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCompilationJobs' {Maybe CompilationJobStatus
statusEquals :: Maybe CompilationJobStatus
$sel:statusEquals:ListCompilationJobs' :: ListCompilationJobs -> Maybe CompilationJobStatus
statusEquals} -> Maybe CompilationJobStatus
statusEquals) (\s :: ListCompilationJobs
s@ListCompilationJobs' {} Maybe CompilationJobStatus
a -> ListCompilationJobs
s {$sel:statusEquals:ListCompilationJobs' :: Maybe CompilationJobStatus
statusEquals = Maybe CompilationJobStatus
a} :: ListCompilationJobs)

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

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

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

instance Prelude.Hashable ListCompilationJobs

instance Prelude.NFData ListCompilationJobs

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

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

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

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

-- |
-- Create a value of 'ListCompilationJobsResponse' 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', 'listCompilationJobsResponse_nextToken' - If the response is truncated, Amazon SageMaker returns this @NextToken@.
-- To retrieve the next set of model compilation jobs, use this token in
-- the next request.
--
-- 'httpStatus', 'listCompilationJobsResponse_httpStatus' - The response's http status code.
--
-- 'compilationJobSummaries', 'listCompilationJobsResponse_compilationJobSummaries' - An array of CompilationJobSummary objects, each describing a model
-- compilation job.
newListCompilationJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCompilationJobsResponse
newListCompilationJobsResponse :: Int -> ListCompilationJobsResponse
newListCompilationJobsResponse Int
pHttpStatus_ =
  ListCompilationJobsResponse' :: Maybe Text
-> Int -> [CompilationJobSummary] -> ListCompilationJobsResponse
ListCompilationJobsResponse'
    { $sel:nextToken:ListCompilationJobsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListCompilationJobsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:compilationJobSummaries:ListCompilationJobsResponse' :: [CompilationJobSummary]
compilationJobSummaries = [CompilationJobSummary]
forall a. Monoid a => a
Prelude.mempty
    }

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

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

-- | An array of CompilationJobSummary objects, each describing a model
-- compilation job.
listCompilationJobsResponse_compilationJobSummaries :: Lens.Lens' ListCompilationJobsResponse [CompilationJobSummary]
listCompilationJobsResponse_compilationJobSummaries :: ([CompilationJobSummary] -> f [CompilationJobSummary])
-> ListCompilationJobsResponse -> f ListCompilationJobsResponse
listCompilationJobsResponse_compilationJobSummaries = (ListCompilationJobsResponse -> [CompilationJobSummary])
-> (ListCompilationJobsResponse
    -> [CompilationJobSummary] -> ListCompilationJobsResponse)
-> Lens' ListCompilationJobsResponse [CompilationJobSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCompilationJobsResponse' {[CompilationJobSummary]
compilationJobSummaries :: [CompilationJobSummary]
$sel:compilationJobSummaries:ListCompilationJobsResponse' :: ListCompilationJobsResponse -> [CompilationJobSummary]
compilationJobSummaries} -> [CompilationJobSummary]
compilationJobSummaries) (\s :: ListCompilationJobsResponse
s@ListCompilationJobsResponse' {} [CompilationJobSummary]
a -> ListCompilationJobsResponse
s {$sel:compilationJobSummaries:ListCompilationJobsResponse' :: [CompilationJobSummary]
compilationJobSummaries = [CompilationJobSummary]
a} :: ListCompilationJobsResponse) (([CompilationJobSummary] -> f [CompilationJobSummary])
 -> ListCompilationJobsResponse -> f ListCompilationJobsResponse)
-> (([CompilationJobSummary] -> f [CompilationJobSummary])
    -> [CompilationJobSummary] -> f [CompilationJobSummary])
-> ([CompilationJobSummary] -> f [CompilationJobSummary])
-> ListCompilationJobsResponse
-> f ListCompilationJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([CompilationJobSummary] -> f [CompilationJobSummary])
-> [CompilationJobSummary] -> f [CompilationJobSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListCompilationJobsResponse