{-# 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.ListHyperParameterTuningJobs
-- 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 HyperParameterTuningJobSummary objects that describe the
-- hyperparameter tuning jobs launched in your account.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListHyperParameterTuningJobs
  ( -- * Creating a Request
    ListHyperParameterTuningJobs (..),
    newListHyperParameterTuningJobs,

    -- * Request Lenses
    listHyperParameterTuningJobs_nameContains,
    listHyperParameterTuningJobs_lastModifiedTimeBefore,
    listHyperParameterTuningJobs_creationTimeAfter,
    listHyperParameterTuningJobs_nextToken,
    listHyperParameterTuningJobs_sortOrder,
    listHyperParameterTuningJobs_lastModifiedTimeAfter,
    listHyperParameterTuningJobs_creationTimeBefore,
    listHyperParameterTuningJobs_statusEquals,
    listHyperParameterTuningJobs_maxResults,
    listHyperParameterTuningJobs_sortBy,

    -- * Destructuring the Response
    ListHyperParameterTuningJobsResponse (..),
    newListHyperParameterTuningJobsResponse,

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

-- |
-- Create a value of 'ListHyperParameterTuningJobs' 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', 'listHyperParameterTuningJobs_nameContains' - A string in the tuning job name. This filter returns only tuning jobs
-- whose name contains the specified string.
--
-- 'lastModifiedTimeBefore', 'listHyperParameterTuningJobs_lastModifiedTimeBefore' - A filter that returns only tuning jobs that were modified before the
-- specified time.
--
-- 'creationTimeAfter', 'listHyperParameterTuningJobs_creationTimeAfter' - A filter that returns only tuning jobs that were created after the
-- specified time.
--
-- 'nextToken', 'listHyperParameterTuningJobs_nextToken' - If the result of the previous @ListHyperParameterTuningJobs@ request was
-- truncated, the response includes a @NextToken@. To retrieve the next set
-- of tuning jobs, use the token in the next request.
--
-- 'sortOrder', 'listHyperParameterTuningJobs_sortOrder' - The sort order for results. The default is @Ascending@.
--
-- 'lastModifiedTimeAfter', 'listHyperParameterTuningJobs_lastModifiedTimeAfter' - A filter that returns only tuning jobs that were modified after the
-- specified time.
--
-- 'creationTimeBefore', 'listHyperParameterTuningJobs_creationTimeBefore' - A filter that returns only tuning jobs that were created before the
-- specified time.
--
-- 'statusEquals', 'listHyperParameterTuningJobs_statusEquals' - A filter that returns only tuning jobs with the specified status.
--
-- 'maxResults', 'listHyperParameterTuningJobs_maxResults' - The maximum number of tuning jobs to return. The default value is 10.
--
-- 'sortBy', 'listHyperParameterTuningJobs_sortBy' - The field to sort results by. The default is @Name@.
newListHyperParameterTuningJobs ::
  ListHyperParameterTuningJobs
newListHyperParameterTuningJobs :: ListHyperParameterTuningJobs
newListHyperParameterTuningJobs =
  ListHyperParameterTuningJobs' :: Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe SortOrder
-> Maybe POSIX
-> Maybe POSIX
-> Maybe HyperParameterTuningJobStatus
-> Maybe Natural
-> Maybe HyperParameterTuningJobSortByOptions
-> ListHyperParameterTuningJobs
ListHyperParameterTuningJobs'
    { $sel:nameContains:ListHyperParameterTuningJobs' :: Maybe Text
nameContains =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeBefore:ListHyperParameterTuningJobs' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeAfter:ListHyperParameterTuningJobs' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListHyperParameterTuningJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListHyperParameterTuningJobs' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeAfter:ListHyperParameterTuningJobs' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListHyperParameterTuningJobs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:statusEquals:ListHyperParameterTuningJobs' :: Maybe HyperParameterTuningJobStatus
statusEquals = Maybe HyperParameterTuningJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListHyperParameterTuningJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListHyperParameterTuningJobs' :: Maybe HyperParameterTuningJobSortByOptions
sortBy = Maybe HyperParameterTuningJobSortByOptions
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

-- | A filter that returns only tuning jobs that were modified after the
-- specified time.
listHyperParameterTuningJobs_lastModifiedTimeAfter :: Lens.Lens' ListHyperParameterTuningJobs (Prelude.Maybe Prelude.UTCTime)
listHyperParameterTuningJobs_lastModifiedTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListHyperParameterTuningJobs -> f ListHyperParameterTuningJobs
listHyperParameterTuningJobs_lastModifiedTimeAfter = (ListHyperParameterTuningJobs -> Maybe POSIX)
-> (ListHyperParameterTuningJobs
    -> Maybe POSIX -> ListHyperParameterTuningJobs)
-> Lens
     ListHyperParameterTuningJobs
     ListHyperParameterTuningJobs
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHyperParameterTuningJobs' {Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
$sel:lastModifiedTimeAfter:ListHyperParameterTuningJobs' :: ListHyperParameterTuningJobs -> Maybe POSIX
lastModifiedTimeAfter} -> Maybe POSIX
lastModifiedTimeAfter) (\s :: ListHyperParameterTuningJobs
s@ListHyperParameterTuningJobs' {} Maybe POSIX
a -> ListHyperParameterTuningJobs
s {$sel:lastModifiedTimeAfter:ListHyperParameterTuningJobs' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
a} :: ListHyperParameterTuningJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListHyperParameterTuningJobs -> f ListHyperParameterTuningJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListHyperParameterTuningJobs
-> f ListHyperParameterTuningJobs
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 tuning jobs that were created before the
-- specified time.
listHyperParameterTuningJobs_creationTimeBefore :: Lens.Lens' ListHyperParameterTuningJobs (Prelude.Maybe Prelude.UTCTime)
listHyperParameterTuningJobs_creationTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListHyperParameterTuningJobs -> f ListHyperParameterTuningJobs
listHyperParameterTuningJobs_creationTimeBefore = (ListHyperParameterTuningJobs -> Maybe POSIX)
-> (ListHyperParameterTuningJobs
    -> Maybe POSIX -> ListHyperParameterTuningJobs)
-> Lens
     ListHyperParameterTuningJobs
     ListHyperParameterTuningJobs
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHyperParameterTuningJobs' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListHyperParameterTuningJobs' :: ListHyperParameterTuningJobs -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListHyperParameterTuningJobs
s@ListHyperParameterTuningJobs' {} Maybe POSIX
a -> ListHyperParameterTuningJobs
s {$sel:creationTimeBefore:ListHyperParameterTuningJobs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListHyperParameterTuningJobs) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListHyperParameterTuningJobs -> f ListHyperParameterTuningJobs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListHyperParameterTuningJobs
-> f ListHyperParameterTuningJobs
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 tuning jobs with the specified status.
listHyperParameterTuningJobs_statusEquals :: Lens.Lens' ListHyperParameterTuningJobs (Prelude.Maybe HyperParameterTuningJobStatus)
listHyperParameterTuningJobs_statusEquals :: (Maybe HyperParameterTuningJobStatus
 -> f (Maybe HyperParameterTuningJobStatus))
-> ListHyperParameterTuningJobs -> f ListHyperParameterTuningJobs
listHyperParameterTuningJobs_statusEquals = (ListHyperParameterTuningJobs
 -> Maybe HyperParameterTuningJobStatus)
-> (ListHyperParameterTuningJobs
    -> Maybe HyperParameterTuningJobStatus
    -> ListHyperParameterTuningJobs)
-> Lens
     ListHyperParameterTuningJobs
     ListHyperParameterTuningJobs
     (Maybe HyperParameterTuningJobStatus)
     (Maybe HyperParameterTuningJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHyperParameterTuningJobs' {Maybe HyperParameterTuningJobStatus
statusEquals :: Maybe HyperParameterTuningJobStatus
$sel:statusEquals:ListHyperParameterTuningJobs' :: ListHyperParameterTuningJobs -> Maybe HyperParameterTuningJobStatus
statusEquals} -> Maybe HyperParameterTuningJobStatus
statusEquals) (\s :: ListHyperParameterTuningJobs
s@ListHyperParameterTuningJobs' {} Maybe HyperParameterTuningJobStatus
a -> ListHyperParameterTuningJobs
s {$sel:statusEquals:ListHyperParameterTuningJobs' :: Maybe HyperParameterTuningJobStatus
statusEquals = Maybe HyperParameterTuningJobStatus
a} :: ListHyperParameterTuningJobs)

-- | The maximum number of tuning jobs to return. The default value is 10.
listHyperParameterTuningJobs_maxResults :: Lens.Lens' ListHyperParameterTuningJobs (Prelude.Maybe Prelude.Natural)
listHyperParameterTuningJobs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListHyperParameterTuningJobs -> f ListHyperParameterTuningJobs
listHyperParameterTuningJobs_maxResults = (ListHyperParameterTuningJobs -> Maybe Natural)
-> (ListHyperParameterTuningJobs
    -> Maybe Natural -> ListHyperParameterTuningJobs)
-> Lens
     ListHyperParameterTuningJobs
     ListHyperParameterTuningJobs
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHyperParameterTuningJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListHyperParameterTuningJobs' :: ListHyperParameterTuningJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListHyperParameterTuningJobs
s@ListHyperParameterTuningJobs' {} Maybe Natural
a -> ListHyperParameterTuningJobs
s {$sel:maxResults:ListHyperParameterTuningJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListHyperParameterTuningJobs)

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

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

instance
  Prelude.Hashable
    ListHyperParameterTuningJobs

instance Prelude.NFData ListHyperParameterTuningJobs

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

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

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

-- | /See:/ 'newListHyperParameterTuningJobsResponse' smart constructor.
data ListHyperParameterTuningJobsResponse = ListHyperParameterTuningJobsResponse'
  { -- | If the result of this @ListHyperParameterTuningJobs@ request was
    -- truncated, the response includes a @NextToken@. To retrieve the next set
    -- of tuning jobs, use the token in the next request.
    ListHyperParameterTuningJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListHyperParameterTuningJobsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of HyperParameterTuningJobSummary objects that describe the
    -- tuning jobs that the @ListHyperParameterTuningJobs@ request returned.
    ListHyperParameterTuningJobsResponse
-> [HyperParameterTuningJobSummary]
hyperParameterTuningJobSummaries :: [HyperParameterTuningJobSummary]
  }
  deriving (ListHyperParameterTuningJobsResponse
-> ListHyperParameterTuningJobsResponse -> Bool
(ListHyperParameterTuningJobsResponse
 -> ListHyperParameterTuningJobsResponse -> Bool)
-> (ListHyperParameterTuningJobsResponse
    -> ListHyperParameterTuningJobsResponse -> Bool)
-> Eq ListHyperParameterTuningJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHyperParameterTuningJobsResponse
-> ListHyperParameterTuningJobsResponse -> Bool
$c/= :: ListHyperParameterTuningJobsResponse
-> ListHyperParameterTuningJobsResponse -> Bool
== :: ListHyperParameterTuningJobsResponse
-> ListHyperParameterTuningJobsResponse -> Bool
$c== :: ListHyperParameterTuningJobsResponse
-> ListHyperParameterTuningJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListHyperParameterTuningJobsResponse]
ReadPrec ListHyperParameterTuningJobsResponse
Int -> ReadS ListHyperParameterTuningJobsResponse
ReadS [ListHyperParameterTuningJobsResponse]
(Int -> ReadS ListHyperParameterTuningJobsResponse)
-> ReadS [ListHyperParameterTuningJobsResponse]
-> ReadPrec ListHyperParameterTuningJobsResponse
-> ReadPrec [ListHyperParameterTuningJobsResponse]
-> Read ListHyperParameterTuningJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHyperParameterTuningJobsResponse]
$creadListPrec :: ReadPrec [ListHyperParameterTuningJobsResponse]
readPrec :: ReadPrec ListHyperParameterTuningJobsResponse
$creadPrec :: ReadPrec ListHyperParameterTuningJobsResponse
readList :: ReadS [ListHyperParameterTuningJobsResponse]
$creadList :: ReadS [ListHyperParameterTuningJobsResponse]
readsPrec :: Int -> ReadS ListHyperParameterTuningJobsResponse
$creadsPrec :: Int -> ReadS ListHyperParameterTuningJobsResponse
Prelude.Read, Int -> ListHyperParameterTuningJobsResponse -> ShowS
[ListHyperParameterTuningJobsResponse] -> ShowS
ListHyperParameterTuningJobsResponse -> String
(Int -> ListHyperParameterTuningJobsResponse -> ShowS)
-> (ListHyperParameterTuningJobsResponse -> String)
-> ([ListHyperParameterTuningJobsResponse] -> ShowS)
-> Show ListHyperParameterTuningJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHyperParameterTuningJobsResponse] -> ShowS
$cshowList :: [ListHyperParameterTuningJobsResponse] -> ShowS
show :: ListHyperParameterTuningJobsResponse -> String
$cshow :: ListHyperParameterTuningJobsResponse -> String
showsPrec :: Int -> ListHyperParameterTuningJobsResponse -> ShowS
$cshowsPrec :: Int -> ListHyperParameterTuningJobsResponse -> ShowS
Prelude.Show, (forall x.
 ListHyperParameterTuningJobsResponse
 -> Rep ListHyperParameterTuningJobsResponse x)
-> (forall x.
    Rep ListHyperParameterTuningJobsResponse x
    -> ListHyperParameterTuningJobsResponse)
-> Generic ListHyperParameterTuningJobsResponse
forall x.
Rep ListHyperParameterTuningJobsResponse x
-> ListHyperParameterTuningJobsResponse
forall x.
ListHyperParameterTuningJobsResponse
-> Rep ListHyperParameterTuningJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListHyperParameterTuningJobsResponse x
-> ListHyperParameterTuningJobsResponse
$cfrom :: forall x.
ListHyperParameterTuningJobsResponse
-> Rep ListHyperParameterTuningJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListHyperParameterTuningJobsResponse' 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', 'listHyperParameterTuningJobsResponse_nextToken' - If the result of this @ListHyperParameterTuningJobs@ request was
-- truncated, the response includes a @NextToken@. To retrieve the next set
-- of tuning jobs, use the token in the next request.
--
-- 'httpStatus', 'listHyperParameterTuningJobsResponse_httpStatus' - The response's http status code.
--
-- 'hyperParameterTuningJobSummaries', 'listHyperParameterTuningJobsResponse_hyperParameterTuningJobSummaries' - A list of HyperParameterTuningJobSummary objects that describe the
-- tuning jobs that the @ListHyperParameterTuningJobs@ request returned.
newListHyperParameterTuningJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListHyperParameterTuningJobsResponse
newListHyperParameterTuningJobsResponse :: Int -> ListHyperParameterTuningJobsResponse
newListHyperParameterTuningJobsResponse Int
pHttpStatus_ =
  ListHyperParameterTuningJobsResponse' :: Maybe Text
-> Int
-> [HyperParameterTuningJobSummary]
-> ListHyperParameterTuningJobsResponse
ListHyperParameterTuningJobsResponse'
    { $sel:nextToken:ListHyperParameterTuningJobsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListHyperParameterTuningJobsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:hyperParameterTuningJobSummaries:ListHyperParameterTuningJobsResponse' :: [HyperParameterTuningJobSummary]
hyperParameterTuningJobSummaries =
        [HyperParameterTuningJobSummary]
forall a. Monoid a => a
Prelude.mempty
    }

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

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

-- | A list of HyperParameterTuningJobSummary objects that describe the
-- tuning jobs that the @ListHyperParameterTuningJobs@ request returned.
listHyperParameterTuningJobsResponse_hyperParameterTuningJobSummaries :: Lens.Lens' ListHyperParameterTuningJobsResponse [HyperParameterTuningJobSummary]
listHyperParameterTuningJobsResponse_hyperParameterTuningJobSummaries :: ([HyperParameterTuningJobSummary]
 -> f [HyperParameterTuningJobSummary])
-> ListHyperParameterTuningJobsResponse
-> f ListHyperParameterTuningJobsResponse
listHyperParameterTuningJobsResponse_hyperParameterTuningJobSummaries = (ListHyperParameterTuningJobsResponse
 -> [HyperParameterTuningJobSummary])
-> (ListHyperParameterTuningJobsResponse
    -> [HyperParameterTuningJobSummary]
    -> ListHyperParameterTuningJobsResponse)
-> Lens'
     ListHyperParameterTuningJobsResponse
     [HyperParameterTuningJobSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHyperParameterTuningJobsResponse' {[HyperParameterTuningJobSummary]
hyperParameterTuningJobSummaries :: [HyperParameterTuningJobSummary]
$sel:hyperParameterTuningJobSummaries:ListHyperParameterTuningJobsResponse' :: ListHyperParameterTuningJobsResponse
-> [HyperParameterTuningJobSummary]
hyperParameterTuningJobSummaries} -> [HyperParameterTuningJobSummary]
hyperParameterTuningJobSummaries) (\s :: ListHyperParameterTuningJobsResponse
s@ListHyperParameterTuningJobsResponse' {} [HyperParameterTuningJobSummary]
a -> ListHyperParameterTuningJobsResponse
s {$sel:hyperParameterTuningJobSummaries:ListHyperParameterTuningJobsResponse' :: [HyperParameterTuningJobSummary]
hyperParameterTuningJobSummaries = [HyperParameterTuningJobSummary]
a} :: ListHyperParameterTuningJobsResponse) (([HyperParameterTuningJobSummary]
  -> f [HyperParameterTuningJobSummary])
 -> ListHyperParameterTuningJobsResponse
 -> f ListHyperParameterTuningJobsResponse)
-> (([HyperParameterTuningJobSummary]
     -> f [HyperParameterTuningJobSummary])
    -> [HyperParameterTuningJobSummary]
    -> f [HyperParameterTuningJobSummary])
-> ([HyperParameterTuningJobSummary]
    -> f [HyperParameterTuningJobSummary])
-> ListHyperParameterTuningJobsResponse
-> f ListHyperParameterTuningJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([HyperParameterTuningJobSummary]
 -> f [HyperParameterTuningJobSummary])
-> [HyperParameterTuningJobSummary]
-> f [HyperParameterTuningJobSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListHyperParameterTuningJobsResponse