{-# 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.ListTrainingJobsForHyperParameterTuningJob
-- 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 TrainingJobSummary objects that describe the training
-- jobs that a hyperparameter tuning job launched.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListTrainingJobsForHyperParameterTuningJob
  ( -- * Creating a Request
    ListTrainingJobsForHyperParameterTuningJob (..),
    newListTrainingJobsForHyperParameterTuningJob,

    -- * Request Lenses
    listTrainingJobsForHyperParameterTuningJob_nextToken,
    listTrainingJobsForHyperParameterTuningJob_sortOrder,
    listTrainingJobsForHyperParameterTuningJob_statusEquals,
    listTrainingJobsForHyperParameterTuningJob_maxResults,
    listTrainingJobsForHyperParameterTuningJob_sortBy,
    listTrainingJobsForHyperParameterTuningJob_hyperParameterTuningJobName,

    -- * Destructuring the Response
    ListTrainingJobsForHyperParameterTuningJobResponse (..),
    newListTrainingJobsForHyperParameterTuningJobResponse,

    -- * Response Lenses
    listTrainingJobsForHyperParameterTuningJobResponse_nextToken,
    listTrainingJobsForHyperParameterTuningJobResponse_httpStatus,
    listTrainingJobsForHyperParameterTuningJobResponse_trainingJobSummaries,
  )
where

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

-- | /See:/ 'newListTrainingJobsForHyperParameterTuningJob' smart constructor.
data ListTrainingJobsForHyperParameterTuningJob = ListTrainingJobsForHyperParameterTuningJob'
  { -- | If the result of the previous
    -- @ListTrainingJobsForHyperParameterTuningJob@ request was truncated, the
    -- response includes a @NextToken@. To retrieve the next set of training
    -- jobs, use the token in the next request.
    ListTrainingJobsForHyperParameterTuningJob -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The sort order for results. The default is @Ascending@.
    ListTrainingJobsForHyperParameterTuningJob -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
    -- | A filter that returns only training jobs with the specified status.
    ListTrainingJobsForHyperParameterTuningJob
-> Maybe TrainingJobStatus
statusEquals :: Prelude.Maybe TrainingJobStatus,
    -- | The maximum number of training jobs to return. The default value is 10.
    ListTrainingJobsForHyperParameterTuningJob -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The field to sort results by. The default is @Name@.
    --
    -- If the value of this field is @FinalObjectiveMetricValue@, any training
    -- jobs that did not return an objective metric are not listed.
    ListTrainingJobsForHyperParameterTuningJob
-> Maybe TrainingJobSortByOptions
sortBy :: Prelude.Maybe TrainingJobSortByOptions,
    -- | The name of the tuning job whose training jobs you want to list.
    ListTrainingJobsForHyperParameterTuningJob -> Text
hyperParameterTuningJobName :: Prelude.Text
  }
  deriving (ListTrainingJobsForHyperParameterTuningJob
-> ListTrainingJobsForHyperParameterTuningJob -> Bool
(ListTrainingJobsForHyperParameterTuningJob
 -> ListTrainingJobsForHyperParameterTuningJob -> Bool)
-> (ListTrainingJobsForHyperParameterTuningJob
    -> ListTrainingJobsForHyperParameterTuningJob -> Bool)
-> Eq ListTrainingJobsForHyperParameterTuningJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrainingJobsForHyperParameterTuningJob
-> ListTrainingJobsForHyperParameterTuningJob -> Bool
$c/= :: ListTrainingJobsForHyperParameterTuningJob
-> ListTrainingJobsForHyperParameterTuningJob -> Bool
== :: ListTrainingJobsForHyperParameterTuningJob
-> ListTrainingJobsForHyperParameterTuningJob -> Bool
$c== :: ListTrainingJobsForHyperParameterTuningJob
-> ListTrainingJobsForHyperParameterTuningJob -> Bool
Prelude.Eq, ReadPrec [ListTrainingJobsForHyperParameterTuningJob]
ReadPrec ListTrainingJobsForHyperParameterTuningJob
Int -> ReadS ListTrainingJobsForHyperParameterTuningJob
ReadS [ListTrainingJobsForHyperParameterTuningJob]
(Int -> ReadS ListTrainingJobsForHyperParameterTuningJob)
-> ReadS [ListTrainingJobsForHyperParameterTuningJob]
-> ReadPrec ListTrainingJobsForHyperParameterTuningJob
-> ReadPrec [ListTrainingJobsForHyperParameterTuningJob]
-> Read ListTrainingJobsForHyperParameterTuningJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrainingJobsForHyperParameterTuningJob]
$creadListPrec :: ReadPrec [ListTrainingJobsForHyperParameterTuningJob]
readPrec :: ReadPrec ListTrainingJobsForHyperParameterTuningJob
$creadPrec :: ReadPrec ListTrainingJobsForHyperParameterTuningJob
readList :: ReadS [ListTrainingJobsForHyperParameterTuningJob]
$creadList :: ReadS [ListTrainingJobsForHyperParameterTuningJob]
readsPrec :: Int -> ReadS ListTrainingJobsForHyperParameterTuningJob
$creadsPrec :: Int -> ReadS ListTrainingJobsForHyperParameterTuningJob
Prelude.Read, Int -> ListTrainingJobsForHyperParameterTuningJob -> ShowS
[ListTrainingJobsForHyperParameterTuningJob] -> ShowS
ListTrainingJobsForHyperParameterTuningJob -> String
(Int -> ListTrainingJobsForHyperParameterTuningJob -> ShowS)
-> (ListTrainingJobsForHyperParameterTuningJob -> String)
-> ([ListTrainingJobsForHyperParameterTuningJob] -> ShowS)
-> Show ListTrainingJobsForHyperParameterTuningJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrainingJobsForHyperParameterTuningJob] -> ShowS
$cshowList :: [ListTrainingJobsForHyperParameterTuningJob] -> ShowS
show :: ListTrainingJobsForHyperParameterTuningJob -> String
$cshow :: ListTrainingJobsForHyperParameterTuningJob -> String
showsPrec :: Int -> ListTrainingJobsForHyperParameterTuningJob -> ShowS
$cshowsPrec :: Int -> ListTrainingJobsForHyperParameterTuningJob -> ShowS
Prelude.Show, (forall x.
 ListTrainingJobsForHyperParameterTuningJob
 -> Rep ListTrainingJobsForHyperParameterTuningJob x)
-> (forall x.
    Rep ListTrainingJobsForHyperParameterTuningJob x
    -> ListTrainingJobsForHyperParameterTuningJob)
-> Generic ListTrainingJobsForHyperParameterTuningJob
forall x.
Rep ListTrainingJobsForHyperParameterTuningJob x
-> ListTrainingJobsForHyperParameterTuningJob
forall x.
ListTrainingJobsForHyperParameterTuningJob
-> Rep ListTrainingJobsForHyperParameterTuningJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTrainingJobsForHyperParameterTuningJob x
-> ListTrainingJobsForHyperParameterTuningJob
$cfrom :: forall x.
ListTrainingJobsForHyperParameterTuningJob
-> Rep ListTrainingJobsForHyperParameterTuningJob x
Prelude.Generic)

-- |
-- Create a value of 'ListTrainingJobsForHyperParameterTuningJob' 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', 'listTrainingJobsForHyperParameterTuningJob_nextToken' - If the result of the previous
-- @ListTrainingJobsForHyperParameterTuningJob@ request was truncated, the
-- response includes a @NextToken@. To retrieve the next set of training
-- jobs, use the token in the next request.
--
-- 'sortOrder', 'listTrainingJobsForHyperParameterTuningJob_sortOrder' - The sort order for results. The default is @Ascending@.
--
-- 'statusEquals', 'listTrainingJobsForHyperParameterTuningJob_statusEquals' - A filter that returns only training jobs with the specified status.
--
-- 'maxResults', 'listTrainingJobsForHyperParameterTuningJob_maxResults' - The maximum number of training jobs to return. The default value is 10.
--
-- 'sortBy', 'listTrainingJobsForHyperParameterTuningJob_sortBy' - The field to sort results by. The default is @Name@.
--
-- If the value of this field is @FinalObjectiveMetricValue@, any training
-- jobs that did not return an objective metric are not listed.
--
-- 'hyperParameterTuningJobName', 'listTrainingJobsForHyperParameterTuningJob_hyperParameterTuningJobName' - The name of the tuning job whose training jobs you want to list.
newListTrainingJobsForHyperParameterTuningJob ::
  -- | 'hyperParameterTuningJobName'
  Prelude.Text ->
  ListTrainingJobsForHyperParameterTuningJob
newListTrainingJobsForHyperParameterTuningJob :: Text -> ListTrainingJobsForHyperParameterTuningJob
newListTrainingJobsForHyperParameterTuningJob
  Text
pHyperParameterTuningJobName_ =
    ListTrainingJobsForHyperParameterTuningJob' :: Maybe Text
-> Maybe SortOrder
-> Maybe TrainingJobStatus
-> Maybe Natural
-> Maybe TrainingJobSortByOptions
-> Text
-> ListTrainingJobsForHyperParameterTuningJob
ListTrainingJobsForHyperParameterTuningJob'
      { $sel:nextToken:ListTrainingJobsForHyperParameterTuningJob' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:sortOrder:ListTrainingJobsForHyperParameterTuningJob' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
        $sel:statusEquals:ListTrainingJobsForHyperParameterTuningJob' :: Maybe TrainingJobStatus
statusEquals = Maybe TrainingJobStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:ListTrainingJobsForHyperParameterTuningJob' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:sortBy:ListTrainingJobsForHyperParameterTuningJob' :: Maybe TrainingJobSortByOptions
sortBy = Maybe TrainingJobSortByOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:hyperParameterTuningJobName:ListTrainingJobsForHyperParameterTuningJob' :: Text
hyperParameterTuningJobName =
          Text
pHyperParameterTuningJobName_
      }

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

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

-- | A filter that returns only training jobs with the specified status.
listTrainingJobsForHyperParameterTuningJob_statusEquals :: Lens.Lens' ListTrainingJobsForHyperParameterTuningJob (Prelude.Maybe TrainingJobStatus)
listTrainingJobsForHyperParameterTuningJob_statusEquals :: (Maybe TrainingJobStatus -> f (Maybe TrainingJobStatus))
-> ListTrainingJobsForHyperParameterTuningJob
-> f ListTrainingJobsForHyperParameterTuningJob
listTrainingJobsForHyperParameterTuningJob_statusEquals = (ListTrainingJobsForHyperParameterTuningJob
 -> Maybe TrainingJobStatus)
-> (ListTrainingJobsForHyperParameterTuningJob
    -> Maybe TrainingJobStatus
    -> ListTrainingJobsForHyperParameterTuningJob)
-> Lens
     ListTrainingJobsForHyperParameterTuningJob
     ListTrainingJobsForHyperParameterTuningJob
     (Maybe TrainingJobStatus)
     (Maybe TrainingJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobsForHyperParameterTuningJob' {Maybe TrainingJobStatus
statusEquals :: Maybe TrainingJobStatus
$sel:statusEquals:ListTrainingJobsForHyperParameterTuningJob' :: ListTrainingJobsForHyperParameterTuningJob
-> Maybe TrainingJobStatus
statusEquals} -> Maybe TrainingJobStatus
statusEquals) (\s :: ListTrainingJobsForHyperParameterTuningJob
s@ListTrainingJobsForHyperParameterTuningJob' {} Maybe TrainingJobStatus
a -> ListTrainingJobsForHyperParameterTuningJob
s {$sel:statusEquals:ListTrainingJobsForHyperParameterTuningJob' :: Maybe TrainingJobStatus
statusEquals = Maybe TrainingJobStatus
a} :: ListTrainingJobsForHyperParameterTuningJob)

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

-- | The field to sort results by. The default is @Name@.
--
-- If the value of this field is @FinalObjectiveMetricValue@, any training
-- jobs that did not return an objective metric are not listed.
listTrainingJobsForHyperParameterTuningJob_sortBy :: Lens.Lens' ListTrainingJobsForHyperParameterTuningJob (Prelude.Maybe TrainingJobSortByOptions)
listTrainingJobsForHyperParameterTuningJob_sortBy :: (Maybe TrainingJobSortByOptions
 -> f (Maybe TrainingJobSortByOptions))
-> ListTrainingJobsForHyperParameterTuningJob
-> f ListTrainingJobsForHyperParameterTuningJob
listTrainingJobsForHyperParameterTuningJob_sortBy = (ListTrainingJobsForHyperParameterTuningJob
 -> Maybe TrainingJobSortByOptions)
-> (ListTrainingJobsForHyperParameterTuningJob
    -> Maybe TrainingJobSortByOptions
    -> ListTrainingJobsForHyperParameterTuningJob)
-> Lens
     ListTrainingJobsForHyperParameterTuningJob
     ListTrainingJobsForHyperParameterTuningJob
     (Maybe TrainingJobSortByOptions)
     (Maybe TrainingJobSortByOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobsForHyperParameterTuningJob' {Maybe TrainingJobSortByOptions
sortBy :: Maybe TrainingJobSortByOptions
$sel:sortBy:ListTrainingJobsForHyperParameterTuningJob' :: ListTrainingJobsForHyperParameterTuningJob
-> Maybe TrainingJobSortByOptions
sortBy} -> Maybe TrainingJobSortByOptions
sortBy) (\s :: ListTrainingJobsForHyperParameterTuningJob
s@ListTrainingJobsForHyperParameterTuningJob' {} Maybe TrainingJobSortByOptions
a -> ListTrainingJobsForHyperParameterTuningJob
s {$sel:sortBy:ListTrainingJobsForHyperParameterTuningJob' :: Maybe TrainingJobSortByOptions
sortBy = Maybe TrainingJobSortByOptions
a} :: ListTrainingJobsForHyperParameterTuningJob)

-- | The name of the tuning job whose training jobs you want to list.
listTrainingJobsForHyperParameterTuningJob_hyperParameterTuningJobName :: Lens.Lens' ListTrainingJobsForHyperParameterTuningJob Prelude.Text
listTrainingJobsForHyperParameterTuningJob_hyperParameterTuningJobName :: (Text -> f Text)
-> ListTrainingJobsForHyperParameterTuningJob
-> f ListTrainingJobsForHyperParameterTuningJob
listTrainingJobsForHyperParameterTuningJob_hyperParameterTuningJobName = (ListTrainingJobsForHyperParameterTuningJob -> Text)
-> (ListTrainingJobsForHyperParameterTuningJob
    -> Text -> ListTrainingJobsForHyperParameterTuningJob)
-> Lens
     ListTrainingJobsForHyperParameterTuningJob
     ListTrainingJobsForHyperParameterTuningJob
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobsForHyperParameterTuningJob' {Text
hyperParameterTuningJobName :: Text
$sel:hyperParameterTuningJobName:ListTrainingJobsForHyperParameterTuningJob' :: ListTrainingJobsForHyperParameterTuningJob -> Text
hyperParameterTuningJobName} -> Text
hyperParameterTuningJobName) (\s :: ListTrainingJobsForHyperParameterTuningJob
s@ListTrainingJobsForHyperParameterTuningJob' {} Text
a -> ListTrainingJobsForHyperParameterTuningJob
s {$sel:hyperParameterTuningJobName:ListTrainingJobsForHyperParameterTuningJob' :: Text
hyperParameterTuningJobName = Text
a} :: ListTrainingJobsForHyperParameterTuningJob)

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

instance
  Prelude.Hashable
    ListTrainingJobsForHyperParameterTuningJob

instance
  Prelude.NFData
    ListTrainingJobsForHyperParameterTuningJob

instance
  Core.ToHeaders
    ListTrainingJobsForHyperParameterTuningJob
  where
  toHeaders :: ListTrainingJobsForHyperParameterTuningJob -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> ListTrainingJobsForHyperParameterTuningJob -> 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.ListTrainingJobsForHyperParameterTuningJob" ::
                          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
    ListTrainingJobsForHyperParameterTuningJob
  where
  toJSON :: ListTrainingJobsForHyperParameterTuningJob -> Value
toJSON
    ListTrainingJobsForHyperParameterTuningJob' {Maybe Natural
Maybe Text
Maybe SortOrder
Maybe TrainingJobSortByOptions
Maybe TrainingJobStatus
Text
hyperParameterTuningJobName :: Text
sortBy :: Maybe TrainingJobSortByOptions
maxResults :: Maybe Natural
statusEquals :: Maybe TrainingJobStatus
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
$sel:hyperParameterTuningJobName:ListTrainingJobsForHyperParameterTuningJob' :: ListTrainingJobsForHyperParameterTuningJob -> Text
$sel:sortBy:ListTrainingJobsForHyperParameterTuningJob' :: ListTrainingJobsForHyperParameterTuningJob
-> Maybe TrainingJobSortByOptions
$sel:maxResults:ListTrainingJobsForHyperParameterTuningJob' :: ListTrainingJobsForHyperParameterTuningJob -> Maybe Natural
$sel:statusEquals:ListTrainingJobsForHyperParameterTuningJob' :: ListTrainingJobsForHyperParameterTuningJob
-> Maybe TrainingJobStatus
$sel:sortOrder:ListTrainingJobsForHyperParameterTuningJob' :: ListTrainingJobsForHyperParameterTuningJob -> Maybe SortOrder
$sel:nextToken:ListTrainingJobsForHyperParameterTuningJob' :: ListTrainingJobsForHyperParameterTuningJob -> Maybe Text
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (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
"StatusEquals" Text -> TrainingJobStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TrainingJobStatus -> Pair)
-> Maybe TrainingJobStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TrainingJobStatus
statusEquals,
              (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
              (Text
"SortBy" Text -> TrainingJobSortByOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TrainingJobSortByOptions -> Pair)
-> Maybe TrainingJobSortByOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TrainingJobSortByOptions
sortBy,
              Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
                ( Text
"HyperParameterTuningJobName"
                    Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
hyperParameterTuningJobName
                )
            ]
        )

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

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

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

-- |
-- Create a value of 'ListTrainingJobsForHyperParameterTuningJobResponse' 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', 'listTrainingJobsForHyperParameterTuningJobResponse_nextToken' - If the result of this @ListTrainingJobsForHyperParameterTuningJob@
-- request was truncated, the response includes a @NextToken@. To retrieve
-- the next set of training jobs, use the token in the next request.
--
-- 'httpStatus', 'listTrainingJobsForHyperParameterTuningJobResponse_httpStatus' - The response's http status code.
--
-- 'trainingJobSummaries', 'listTrainingJobsForHyperParameterTuningJobResponse_trainingJobSummaries' - A list of TrainingJobSummary objects that describe the training jobs
-- that the @ListTrainingJobsForHyperParameterTuningJob@ request returned.
newListTrainingJobsForHyperParameterTuningJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTrainingJobsForHyperParameterTuningJobResponse
newListTrainingJobsForHyperParameterTuningJobResponse :: Int -> ListTrainingJobsForHyperParameterTuningJobResponse
newListTrainingJobsForHyperParameterTuningJobResponse
  Int
pHttpStatus_ =
    ListTrainingJobsForHyperParameterTuningJobResponse' :: Maybe Text
-> Int
-> [HyperParameterTrainingJobSummary]
-> ListTrainingJobsForHyperParameterTuningJobResponse
ListTrainingJobsForHyperParameterTuningJobResponse'
      { $sel:nextToken:ListTrainingJobsForHyperParameterTuningJobResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListTrainingJobsForHyperParameterTuningJobResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:trainingJobSummaries:ListTrainingJobsForHyperParameterTuningJobResponse' :: [HyperParameterTrainingJobSummary]
trainingJobSummaries =
          [HyperParameterTrainingJobSummary]
forall a. Monoid a => a
Prelude.mempty
      }

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

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

-- | A list of TrainingJobSummary objects that describe the training jobs
-- that the @ListTrainingJobsForHyperParameterTuningJob@ request returned.
listTrainingJobsForHyperParameterTuningJobResponse_trainingJobSummaries :: Lens.Lens' ListTrainingJobsForHyperParameterTuningJobResponse [HyperParameterTrainingJobSummary]
listTrainingJobsForHyperParameterTuningJobResponse_trainingJobSummaries :: ([HyperParameterTrainingJobSummary]
 -> f [HyperParameterTrainingJobSummary])
-> ListTrainingJobsForHyperParameterTuningJobResponse
-> f ListTrainingJobsForHyperParameterTuningJobResponse
listTrainingJobsForHyperParameterTuningJobResponse_trainingJobSummaries = (ListTrainingJobsForHyperParameterTuningJobResponse
 -> [HyperParameterTrainingJobSummary])
-> (ListTrainingJobsForHyperParameterTuningJobResponse
    -> [HyperParameterTrainingJobSummary]
    -> ListTrainingJobsForHyperParameterTuningJobResponse)
-> Lens'
     ListTrainingJobsForHyperParameterTuningJobResponse
     [HyperParameterTrainingJobSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrainingJobsForHyperParameterTuningJobResponse' {[HyperParameterTrainingJobSummary]
trainingJobSummaries :: [HyperParameterTrainingJobSummary]
$sel:trainingJobSummaries:ListTrainingJobsForHyperParameterTuningJobResponse' :: ListTrainingJobsForHyperParameterTuningJobResponse
-> [HyperParameterTrainingJobSummary]
trainingJobSummaries} -> [HyperParameterTrainingJobSummary]
trainingJobSummaries) (\s :: ListTrainingJobsForHyperParameterTuningJobResponse
s@ListTrainingJobsForHyperParameterTuningJobResponse' {} [HyperParameterTrainingJobSummary]
a -> ListTrainingJobsForHyperParameterTuningJobResponse
s {$sel:trainingJobSummaries:ListTrainingJobsForHyperParameterTuningJobResponse' :: [HyperParameterTrainingJobSummary]
trainingJobSummaries = [HyperParameterTrainingJobSummary]
a} :: ListTrainingJobsForHyperParameterTuningJobResponse) (([HyperParameterTrainingJobSummary]
  -> f [HyperParameterTrainingJobSummary])
 -> ListTrainingJobsForHyperParameterTuningJobResponse
 -> f ListTrainingJobsForHyperParameterTuningJobResponse)
-> (([HyperParameterTrainingJobSummary]
     -> f [HyperParameterTrainingJobSummary])
    -> [HyperParameterTrainingJobSummary]
    -> f [HyperParameterTrainingJobSummary])
-> ([HyperParameterTrainingJobSummary]
    -> f [HyperParameterTrainingJobSummary])
-> ListTrainingJobsForHyperParameterTuningJobResponse
-> f ListTrainingJobsForHyperParameterTuningJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([HyperParameterTrainingJobSummary]
 -> f [HyperParameterTrainingJobSummary])
-> [HyperParameterTrainingJobSummary]
-> f [HyperParameterTrainingJobSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListTrainingJobsForHyperParameterTuningJobResponse