{-# 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.ListInferenceRecommendationsJobSteps
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of the subtasks for an Inference Recommender job.
--
-- The supported subtasks are benchmarks, which evaluate the performance of
-- your model on different instance types.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListInferenceRecommendationsJobSteps
  ( -- * Creating a Request
    ListInferenceRecommendationsJobSteps (..),
    newListInferenceRecommendationsJobSteps,

    -- * Request Lenses
    listInferenceRecommendationsJobSteps_maxResults,
    listInferenceRecommendationsJobSteps_nextToken,
    listInferenceRecommendationsJobSteps_status,
    listInferenceRecommendationsJobSteps_stepType,
    listInferenceRecommendationsJobSteps_jobName,

    -- * Destructuring the Response
    ListInferenceRecommendationsJobStepsResponse (..),
    newListInferenceRecommendationsJobStepsResponse,

    -- * Response Lenses
    listInferenceRecommendationsJobStepsResponse_nextToken,
    listInferenceRecommendationsJobStepsResponse_steps,
    listInferenceRecommendationsJobStepsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListInferenceRecommendationsJobSteps' smart constructor.
data ListInferenceRecommendationsJobSteps = ListInferenceRecommendationsJobSteps'
  { -- | The maximum number of results to return.
    ListInferenceRecommendationsJobSteps -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A token that you can specify to return more results from the list.
    -- Specify this field if you have a token that was returned from a previous
    -- request.
    ListInferenceRecommendationsJobSteps -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A filter to return benchmarks of a specified status. If this field is
    -- left empty, then all benchmarks are returned.
    ListInferenceRecommendationsJobSteps
-> Maybe RecommendationJobStatus
status :: Prelude.Maybe RecommendationJobStatus,
    -- | A filter to return details about the specified type of subtask.
    --
    -- @BENCHMARK@: Evaluate the performance of your model on different
    -- instance types.
    ListInferenceRecommendationsJobSteps
-> Maybe RecommendationStepType
stepType :: Prelude.Maybe RecommendationStepType,
    -- | The name for the Inference Recommender job.
    ListInferenceRecommendationsJobSteps -> Text
jobName :: Prelude.Text
  }
  deriving (ListInferenceRecommendationsJobSteps
-> ListInferenceRecommendationsJobSteps -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInferenceRecommendationsJobSteps
-> ListInferenceRecommendationsJobSteps -> Bool
$c/= :: ListInferenceRecommendationsJobSteps
-> ListInferenceRecommendationsJobSteps -> Bool
== :: ListInferenceRecommendationsJobSteps
-> ListInferenceRecommendationsJobSteps -> Bool
$c== :: ListInferenceRecommendationsJobSteps
-> ListInferenceRecommendationsJobSteps -> Bool
Prelude.Eq, ReadPrec [ListInferenceRecommendationsJobSteps]
ReadPrec ListInferenceRecommendationsJobSteps
Int -> ReadS ListInferenceRecommendationsJobSteps
ReadS [ListInferenceRecommendationsJobSteps]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInferenceRecommendationsJobSteps]
$creadListPrec :: ReadPrec [ListInferenceRecommendationsJobSteps]
readPrec :: ReadPrec ListInferenceRecommendationsJobSteps
$creadPrec :: ReadPrec ListInferenceRecommendationsJobSteps
readList :: ReadS [ListInferenceRecommendationsJobSteps]
$creadList :: ReadS [ListInferenceRecommendationsJobSteps]
readsPrec :: Int -> ReadS ListInferenceRecommendationsJobSteps
$creadsPrec :: Int -> ReadS ListInferenceRecommendationsJobSteps
Prelude.Read, Int -> ListInferenceRecommendationsJobSteps -> ShowS
[ListInferenceRecommendationsJobSteps] -> ShowS
ListInferenceRecommendationsJobSteps -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInferenceRecommendationsJobSteps] -> ShowS
$cshowList :: [ListInferenceRecommendationsJobSteps] -> ShowS
show :: ListInferenceRecommendationsJobSteps -> String
$cshow :: ListInferenceRecommendationsJobSteps -> String
showsPrec :: Int -> ListInferenceRecommendationsJobSteps -> ShowS
$cshowsPrec :: Int -> ListInferenceRecommendationsJobSteps -> ShowS
Prelude.Show, forall x.
Rep ListInferenceRecommendationsJobSteps x
-> ListInferenceRecommendationsJobSteps
forall x.
ListInferenceRecommendationsJobSteps
-> Rep ListInferenceRecommendationsJobSteps x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListInferenceRecommendationsJobSteps x
-> ListInferenceRecommendationsJobSteps
$cfrom :: forall x.
ListInferenceRecommendationsJobSteps
-> Rep ListInferenceRecommendationsJobSteps x
Prelude.Generic)

-- |
-- Create a value of 'ListInferenceRecommendationsJobSteps' 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:
--
-- 'maxResults', 'listInferenceRecommendationsJobSteps_maxResults' - The maximum number of results to return.
--
-- 'nextToken', 'listInferenceRecommendationsJobSteps_nextToken' - A token that you can specify to return more results from the list.
-- Specify this field if you have a token that was returned from a previous
-- request.
--
-- 'status', 'listInferenceRecommendationsJobSteps_status' - A filter to return benchmarks of a specified status. If this field is
-- left empty, then all benchmarks are returned.
--
-- 'stepType', 'listInferenceRecommendationsJobSteps_stepType' - A filter to return details about the specified type of subtask.
--
-- @BENCHMARK@: Evaluate the performance of your model on different
-- instance types.
--
-- 'jobName', 'listInferenceRecommendationsJobSteps_jobName' - The name for the Inference Recommender job.
newListInferenceRecommendationsJobSteps ::
  -- | 'jobName'
  Prelude.Text ->
  ListInferenceRecommendationsJobSteps
newListInferenceRecommendationsJobSteps :: Text -> ListInferenceRecommendationsJobSteps
newListInferenceRecommendationsJobSteps Text
pJobName_ =
  ListInferenceRecommendationsJobSteps'
    { $sel:maxResults:ListInferenceRecommendationsJobSteps' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListInferenceRecommendationsJobSteps' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListInferenceRecommendationsJobSteps' :: Maybe RecommendationJobStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:stepType:ListInferenceRecommendationsJobSteps' :: Maybe RecommendationStepType
stepType = forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:ListInferenceRecommendationsJobSteps' :: Text
jobName = Text
pJobName_
    }

-- | The maximum number of results to return.
listInferenceRecommendationsJobSteps_maxResults :: Lens.Lens' ListInferenceRecommendationsJobSteps (Prelude.Maybe Prelude.Natural)
listInferenceRecommendationsJobSteps_maxResults :: Lens' ListInferenceRecommendationsJobSteps (Maybe Natural)
listInferenceRecommendationsJobSteps_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceRecommendationsJobSteps' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListInferenceRecommendationsJobSteps
s@ListInferenceRecommendationsJobSteps' {} Maybe Natural
a -> ListInferenceRecommendationsJobSteps
s {$sel:maxResults:ListInferenceRecommendationsJobSteps' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListInferenceRecommendationsJobSteps)

-- | A token that you can specify to return more results from the list.
-- Specify this field if you have a token that was returned from a previous
-- request.
listInferenceRecommendationsJobSteps_nextToken :: Lens.Lens' ListInferenceRecommendationsJobSteps (Prelude.Maybe Prelude.Text)
listInferenceRecommendationsJobSteps_nextToken :: Lens' ListInferenceRecommendationsJobSteps (Maybe Text)
listInferenceRecommendationsJobSteps_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceRecommendationsJobSteps' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListInferenceRecommendationsJobSteps
s@ListInferenceRecommendationsJobSteps' {} Maybe Text
a -> ListInferenceRecommendationsJobSteps
s {$sel:nextToken:ListInferenceRecommendationsJobSteps' :: Maybe Text
nextToken = Maybe Text
a} :: ListInferenceRecommendationsJobSteps)

-- | A filter to return benchmarks of a specified status. If this field is
-- left empty, then all benchmarks are returned.
listInferenceRecommendationsJobSteps_status :: Lens.Lens' ListInferenceRecommendationsJobSteps (Prelude.Maybe RecommendationJobStatus)
listInferenceRecommendationsJobSteps_status :: Lens'
  ListInferenceRecommendationsJobSteps
  (Maybe RecommendationJobStatus)
listInferenceRecommendationsJobSteps_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceRecommendationsJobSteps' {Maybe RecommendationJobStatus
status :: Maybe RecommendationJobStatus
$sel:status:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps
-> Maybe RecommendationJobStatus
status} -> Maybe RecommendationJobStatus
status) (\s :: ListInferenceRecommendationsJobSteps
s@ListInferenceRecommendationsJobSteps' {} Maybe RecommendationJobStatus
a -> ListInferenceRecommendationsJobSteps
s {$sel:status:ListInferenceRecommendationsJobSteps' :: Maybe RecommendationJobStatus
status = Maybe RecommendationJobStatus
a} :: ListInferenceRecommendationsJobSteps)

-- | A filter to return details about the specified type of subtask.
--
-- @BENCHMARK@: Evaluate the performance of your model on different
-- instance types.
listInferenceRecommendationsJobSteps_stepType :: Lens.Lens' ListInferenceRecommendationsJobSteps (Prelude.Maybe RecommendationStepType)
listInferenceRecommendationsJobSteps_stepType :: Lens'
  ListInferenceRecommendationsJobSteps (Maybe RecommendationStepType)
listInferenceRecommendationsJobSteps_stepType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceRecommendationsJobSteps' {Maybe RecommendationStepType
stepType :: Maybe RecommendationStepType
$sel:stepType:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps
-> Maybe RecommendationStepType
stepType} -> Maybe RecommendationStepType
stepType) (\s :: ListInferenceRecommendationsJobSteps
s@ListInferenceRecommendationsJobSteps' {} Maybe RecommendationStepType
a -> ListInferenceRecommendationsJobSteps
s {$sel:stepType:ListInferenceRecommendationsJobSteps' :: Maybe RecommendationStepType
stepType = Maybe RecommendationStepType
a} :: ListInferenceRecommendationsJobSteps)

-- | The name for the Inference Recommender job.
listInferenceRecommendationsJobSteps_jobName :: Lens.Lens' ListInferenceRecommendationsJobSteps Prelude.Text
listInferenceRecommendationsJobSteps_jobName :: Lens' ListInferenceRecommendationsJobSteps Text
listInferenceRecommendationsJobSteps_jobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceRecommendationsJobSteps' {Text
jobName :: Text
$sel:jobName:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Text
jobName} -> Text
jobName) (\s :: ListInferenceRecommendationsJobSteps
s@ListInferenceRecommendationsJobSteps' {} Text
a -> ListInferenceRecommendationsJobSteps
s {$sel:jobName:ListInferenceRecommendationsJobSteps' :: Text
jobName = Text
a} :: ListInferenceRecommendationsJobSteps)

instance
  Core.AWSPager
    ListInferenceRecommendationsJobSteps
  where
  page :: ListInferenceRecommendationsJobSteps
-> AWSResponse ListInferenceRecommendationsJobSteps
-> Maybe ListInferenceRecommendationsJobSteps
page ListInferenceRecommendationsJobSteps
rq AWSResponse ListInferenceRecommendationsJobSteps
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListInferenceRecommendationsJobSteps
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListInferenceRecommendationsJobStepsResponse (Maybe Text)
listInferenceRecommendationsJobStepsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListInferenceRecommendationsJobSteps
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListInferenceRecommendationsJobStepsResponse
  (Maybe [InferenceRecommendationsJobStep])
listInferenceRecommendationsJobStepsResponse_steps
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListInferenceRecommendationsJobSteps
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListInferenceRecommendationsJobSteps (Maybe Text)
listInferenceRecommendationsJobSteps_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListInferenceRecommendationsJobSteps
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListInferenceRecommendationsJobStepsResponse (Maybe Text)
listInferenceRecommendationsJobStepsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance
  Core.AWSRequest
    ListInferenceRecommendationsJobSteps
  where
  type
    AWSResponse ListInferenceRecommendationsJobSteps =
      ListInferenceRecommendationsJobStepsResponse
  request :: (Service -> Service)
-> ListInferenceRecommendationsJobSteps
-> Request ListInferenceRecommendationsJobSteps
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListInferenceRecommendationsJobSteps
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListInferenceRecommendationsJobSteps)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [InferenceRecommendationsJobStep]
-> Int
-> ListInferenceRecommendationsJobStepsResponse
ListInferenceRecommendationsJobStepsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Steps" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListInferenceRecommendationsJobSteps
  where
  hashWithSalt :: Int -> ListInferenceRecommendationsJobSteps -> Int
hashWithSalt
    Int
_salt
    ListInferenceRecommendationsJobSteps' {Maybe Natural
Maybe Text
Maybe RecommendationJobStatus
Maybe RecommendationStepType
Text
jobName :: Text
stepType :: Maybe RecommendationStepType
status :: Maybe RecommendationJobStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:jobName:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Text
$sel:stepType:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps
-> Maybe RecommendationStepType
$sel:status:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps
-> Maybe RecommendationJobStatus
$sel:nextToken:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Maybe Text
$sel:maxResults:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Maybe Natural
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RecommendationJobStatus
status
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RecommendationStepType
stepType
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobName

instance
  Prelude.NFData
    ListInferenceRecommendationsJobSteps
  where
  rnf :: ListInferenceRecommendationsJobSteps -> ()
rnf ListInferenceRecommendationsJobSteps' {Maybe Natural
Maybe Text
Maybe RecommendationJobStatus
Maybe RecommendationStepType
Text
jobName :: Text
stepType :: Maybe RecommendationStepType
status :: Maybe RecommendationJobStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:jobName:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Text
$sel:stepType:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps
-> Maybe RecommendationStepType
$sel:status:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps
-> Maybe RecommendationJobStatus
$sel:nextToken:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Maybe Text
$sel:maxResults:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RecommendationJobStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RecommendationStepType
stepType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jobName

instance
  Data.ToHeaders
    ListInferenceRecommendationsJobSteps
  where
  toHeaders :: ListInferenceRecommendationsJobSteps -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"SageMaker.ListInferenceRecommendationsJobSteps" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Data.ToJSON
    ListInferenceRecommendationsJobSteps
  where
  toJSON :: ListInferenceRecommendationsJobSteps -> Value
toJSON ListInferenceRecommendationsJobSteps' {Maybe Natural
Maybe Text
Maybe RecommendationJobStatus
Maybe RecommendationStepType
Text
jobName :: Text
stepType :: Maybe RecommendationStepType
status :: Maybe RecommendationJobStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:jobName:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Text
$sel:stepType:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps
-> Maybe RecommendationStepType
$sel:status:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps
-> Maybe RecommendationJobStatus
$sel:nextToken:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Maybe Text
$sel:maxResults:ListInferenceRecommendationsJobSteps' :: ListInferenceRecommendationsJobSteps -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"Status" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RecommendationJobStatus
status,
            (Key
"StepType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RecommendationStepType
stepType,
            forall a. a -> Maybe a
Prelude.Just (Key
"JobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
jobName)
          ]
      )

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

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

-- | /See:/ 'newListInferenceRecommendationsJobStepsResponse' smart constructor.
data ListInferenceRecommendationsJobStepsResponse = ListInferenceRecommendationsJobStepsResponse'
  { -- | A token that you can specify in your next request to return more results
    -- from the list.
    ListInferenceRecommendationsJobStepsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of all subtask details in Inference Recommender.
    ListInferenceRecommendationsJobStepsResponse
-> Maybe [InferenceRecommendationsJobStep]
steps :: Prelude.Maybe [InferenceRecommendationsJobStep],
    -- | The response's http status code.
    ListInferenceRecommendationsJobStepsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListInferenceRecommendationsJobStepsResponse
-> ListInferenceRecommendationsJobStepsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInferenceRecommendationsJobStepsResponse
-> ListInferenceRecommendationsJobStepsResponse -> Bool
$c/= :: ListInferenceRecommendationsJobStepsResponse
-> ListInferenceRecommendationsJobStepsResponse -> Bool
== :: ListInferenceRecommendationsJobStepsResponse
-> ListInferenceRecommendationsJobStepsResponse -> Bool
$c== :: ListInferenceRecommendationsJobStepsResponse
-> ListInferenceRecommendationsJobStepsResponse -> Bool
Prelude.Eq, ReadPrec [ListInferenceRecommendationsJobStepsResponse]
ReadPrec ListInferenceRecommendationsJobStepsResponse
Int -> ReadS ListInferenceRecommendationsJobStepsResponse
ReadS [ListInferenceRecommendationsJobStepsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInferenceRecommendationsJobStepsResponse]
$creadListPrec :: ReadPrec [ListInferenceRecommendationsJobStepsResponse]
readPrec :: ReadPrec ListInferenceRecommendationsJobStepsResponse
$creadPrec :: ReadPrec ListInferenceRecommendationsJobStepsResponse
readList :: ReadS [ListInferenceRecommendationsJobStepsResponse]
$creadList :: ReadS [ListInferenceRecommendationsJobStepsResponse]
readsPrec :: Int -> ReadS ListInferenceRecommendationsJobStepsResponse
$creadsPrec :: Int -> ReadS ListInferenceRecommendationsJobStepsResponse
Prelude.Read, Int -> ListInferenceRecommendationsJobStepsResponse -> ShowS
[ListInferenceRecommendationsJobStepsResponse] -> ShowS
ListInferenceRecommendationsJobStepsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInferenceRecommendationsJobStepsResponse] -> ShowS
$cshowList :: [ListInferenceRecommendationsJobStepsResponse] -> ShowS
show :: ListInferenceRecommendationsJobStepsResponse -> String
$cshow :: ListInferenceRecommendationsJobStepsResponse -> String
showsPrec :: Int -> ListInferenceRecommendationsJobStepsResponse -> ShowS
$cshowsPrec :: Int -> ListInferenceRecommendationsJobStepsResponse -> ShowS
Prelude.Show, forall x.
Rep ListInferenceRecommendationsJobStepsResponse x
-> ListInferenceRecommendationsJobStepsResponse
forall x.
ListInferenceRecommendationsJobStepsResponse
-> Rep ListInferenceRecommendationsJobStepsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListInferenceRecommendationsJobStepsResponse x
-> ListInferenceRecommendationsJobStepsResponse
$cfrom :: forall x.
ListInferenceRecommendationsJobStepsResponse
-> Rep ListInferenceRecommendationsJobStepsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListInferenceRecommendationsJobStepsResponse' 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', 'listInferenceRecommendationsJobStepsResponse_nextToken' - A token that you can specify in your next request to return more results
-- from the list.
--
-- 'steps', 'listInferenceRecommendationsJobStepsResponse_steps' - A list of all subtask details in Inference Recommender.
--
-- 'httpStatus', 'listInferenceRecommendationsJobStepsResponse_httpStatus' - The response's http status code.
newListInferenceRecommendationsJobStepsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListInferenceRecommendationsJobStepsResponse
newListInferenceRecommendationsJobStepsResponse :: Int -> ListInferenceRecommendationsJobStepsResponse
newListInferenceRecommendationsJobStepsResponse
  Int
pHttpStatus_ =
    ListInferenceRecommendationsJobStepsResponse'
      { $sel:nextToken:ListInferenceRecommendationsJobStepsResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:steps:ListInferenceRecommendationsJobStepsResponse' :: Maybe [InferenceRecommendationsJobStep]
steps = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListInferenceRecommendationsJobStepsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A token that you can specify in your next request to return more results
-- from the list.
listInferenceRecommendationsJobStepsResponse_nextToken :: Lens.Lens' ListInferenceRecommendationsJobStepsResponse (Prelude.Maybe Prelude.Text)
listInferenceRecommendationsJobStepsResponse_nextToken :: Lens' ListInferenceRecommendationsJobStepsResponse (Maybe Text)
listInferenceRecommendationsJobStepsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceRecommendationsJobStepsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListInferenceRecommendationsJobStepsResponse' :: ListInferenceRecommendationsJobStepsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListInferenceRecommendationsJobStepsResponse
s@ListInferenceRecommendationsJobStepsResponse' {} Maybe Text
a -> ListInferenceRecommendationsJobStepsResponse
s {$sel:nextToken:ListInferenceRecommendationsJobStepsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListInferenceRecommendationsJobStepsResponse)

-- | A list of all subtask details in Inference Recommender.
listInferenceRecommendationsJobStepsResponse_steps :: Lens.Lens' ListInferenceRecommendationsJobStepsResponse (Prelude.Maybe [InferenceRecommendationsJobStep])
listInferenceRecommendationsJobStepsResponse_steps :: Lens'
  ListInferenceRecommendationsJobStepsResponse
  (Maybe [InferenceRecommendationsJobStep])
listInferenceRecommendationsJobStepsResponse_steps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceRecommendationsJobStepsResponse' {Maybe [InferenceRecommendationsJobStep]
steps :: Maybe [InferenceRecommendationsJobStep]
$sel:steps:ListInferenceRecommendationsJobStepsResponse' :: ListInferenceRecommendationsJobStepsResponse
-> Maybe [InferenceRecommendationsJobStep]
steps} -> Maybe [InferenceRecommendationsJobStep]
steps) (\s :: ListInferenceRecommendationsJobStepsResponse
s@ListInferenceRecommendationsJobStepsResponse' {} Maybe [InferenceRecommendationsJobStep]
a -> ListInferenceRecommendationsJobStepsResponse
s {$sel:steps:ListInferenceRecommendationsJobStepsResponse' :: Maybe [InferenceRecommendationsJobStep]
steps = Maybe [InferenceRecommendationsJobStep]
a} :: ListInferenceRecommendationsJobStepsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListInferenceRecommendationsJobStepsResponse
  where
  rnf :: ListInferenceRecommendationsJobStepsResponse -> ()
rnf ListInferenceRecommendationsJobStepsResponse' {Int
Maybe [InferenceRecommendationsJobStep]
Maybe Text
httpStatus :: Int
steps :: Maybe [InferenceRecommendationsJobStep]
nextToken :: Maybe Text
$sel:httpStatus:ListInferenceRecommendationsJobStepsResponse' :: ListInferenceRecommendationsJobStepsResponse -> Int
$sel:steps:ListInferenceRecommendationsJobStepsResponse' :: ListInferenceRecommendationsJobStepsResponse
-> Maybe [InferenceRecommendationsJobStep]
$sel:nextToken:ListInferenceRecommendationsJobStepsResponse' :: ListInferenceRecommendationsJobStepsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InferenceRecommendationsJobStep]
steps
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus