{-# 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.EMR.ListSteps
-- 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)
--
-- Provides a list of steps for the cluster in reverse order unless you
-- specify @stepIds@ with the request or filter by @StepStates@. You can
-- specify a maximum of 10 @stepIDs@. The CLI automatically paginates
-- results to return a list greater than 50 steps. To return more than 50
-- steps using the CLI, specify a @Marker@, which is a pagination token
-- that indicates the next set of steps to retrieve.
--
-- This operation returns paginated results.
module Amazonka.EMR.ListSteps
  ( -- * Creating a Request
    ListSteps (..),
    newListSteps,

    -- * Request Lenses
    listSteps_stepIds,
    listSteps_stepStates,
    listSteps_marker,
    listSteps_clusterId,

    -- * Destructuring the Response
    ListStepsResponse (..),
    newListStepsResponse,

    -- * Response Lenses
    listStepsResponse_steps,
    listStepsResponse_marker,
    listStepsResponse_httpStatus,
  )
where

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

-- | This input determines which steps to list.
--
-- /See:/ 'newListSteps' smart constructor.
data ListSteps = ListSteps'
  { -- | The filter to limit the step list based on the identifier of the steps.
    -- You can specify a maximum of ten Step IDs. The character constraint
    -- applies to the overall length of the array.
    ListSteps -> Maybe [Text]
stepIds :: Prelude.Maybe [Prelude.Text],
    -- | The filter to limit the step list based on certain states.
    ListSteps -> Maybe [StepState]
stepStates :: Prelude.Maybe [StepState],
    -- | The maximum number of steps that a single @ListSteps@ action returns is
    -- 50. To return a longer list of steps, use multiple @ListSteps@ actions
    -- along with the @Marker@ parameter, which is a pagination token that
    -- indicates the next set of results to retrieve.
    ListSteps -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the cluster for which to list the steps.
    ListSteps -> Text
clusterId :: Prelude.Text
  }
  deriving (ListSteps -> ListSteps -> Bool
(ListSteps -> ListSteps -> Bool)
-> (ListSteps -> ListSteps -> Bool) -> Eq ListSteps
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSteps -> ListSteps -> Bool
$c/= :: ListSteps -> ListSteps -> Bool
== :: ListSteps -> ListSteps -> Bool
$c== :: ListSteps -> ListSteps -> Bool
Prelude.Eq, ReadPrec [ListSteps]
ReadPrec ListSteps
Int -> ReadS ListSteps
ReadS [ListSteps]
(Int -> ReadS ListSteps)
-> ReadS [ListSteps]
-> ReadPrec ListSteps
-> ReadPrec [ListSteps]
-> Read ListSteps
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSteps]
$creadListPrec :: ReadPrec [ListSteps]
readPrec :: ReadPrec ListSteps
$creadPrec :: ReadPrec ListSteps
readList :: ReadS [ListSteps]
$creadList :: ReadS [ListSteps]
readsPrec :: Int -> ReadS ListSteps
$creadsPrec :: Int -> ReadS ListSteps
Prelude.Read, Int -> ListSteps -> ShowS
[ListSteps] -> ShowS
ListSteps -> String
(Int -> ListSteps -> ShowS)
-> (ListSteps -> String)
-> ([ListSteps] -> ShowS)
-> Show ListSteps
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSteps] -> ShowS
$cshowList :: [ListSteps] -> ShowS
show :: ListSteps -> String
$cshow :: ListSteps -> String
showsPrec :: Int -> ListSteps -> ShowS
$cshowsPrec :: Int -> ListSteps -> ShowS
Prelude.Show, (forall x. ListSteps -> Rep ListSteps x)
-> (forall x. Rep ListSteps x -> ListSteps) -> Generic ListSteps
forall x. Rep ListSteps x -> ListSteps
forall x. ListSteps -> Rep ListSteps x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSteps x -> ListSteps
$cfrom :: forall x. ListSteps -> Rep ListSteps x
Prelude.Generic)

-- |
-- Create a value of 'ListSteps' 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:
--
-- 'stepIds', 'listSteps_stepIds' - The filter to limit the step list based on the identifier of the steps.
-- You can specify a maximum of ten Step IDs. The character constraint
-- applies to the overall length of the array.
--
-- 'stepStates', 'listSteps_stepStates' - The filter to limit the step list based on certain states.
--
-- 'marker', 'listSteps_marker' - The maximum number of steps that a single @ListSteps@ action returns is
-- 50. To return a longer list of steps, use multiple @ListSteps@ actions
-- along with the @Marker@ parameter, which is a pagination token that
-- indicates the next set of results to retrieve.
--
-- 'clusterId', 'listSteps_clusterId' - The identifier of the cluster for which to list the steps.
newListSteps ::
  -- | 'clusterId'
  Prelude.Text ->
  ListSteps
newListSteps :: Text -> ListSteps
newListSteps Text
pClusterId_ =
  ListSteps' :: Maybe [Text]
-> Maybe [StepState] -> Maybe Text -> Text -> ListSteps
ListSteps'
    { $sel:stepIds:ListSteps' :: Maybe [Text]
stepIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:stepStates:ListSteps' :: Maybe [StepState]
stepStates = Maybe [StepState]
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListSteps' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterId:ListSteps' :: Text
clusterId = Text
pClusterId_
    }

-- | The filter to limit the step list based on the identifier of the steps.
-- You can specify a maximum of ten Step IDs. The character constraint
-- applies to the overall length of the array.
listSteps_stepIds :: Lens.Lens' ListSteps (Prelude.Maybe [Prelude.Text])
listSteps_stepIds :: (Maybe [Text] -> f (Maybe [Text])) -> ListSteps -> f ListSteps
listSteps_stepIds = (ListSteps -> Maybe [Text])
-> (ListSteps -> Maybe [Text] -> ListSteps)
-> Lens ListSteps ListSteps (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSteps' {Maybe [Text]
stepIds :: Maybe [Text]
$sel:stepIds:ListSteps' :: ListSteps -> Maybe [Text]
stepIds} -> Maybe [Text]
stepIds) (\s :: ListSteps
s@ListSteps' {} Maybe [Text]
a -> ListSteps
s {$sel:stepIds:ListSteps' :: Maybe [Text]
stepIds = Maybe [Text]
a} :: ListSteps) ((Maybe [Text] -> f (Maybe [Text])) -> ListSteps -> f ListSteps)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListSteps
-> f ListSteps
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The filter to limit the step list based on certain states.
listSteps_stepStates :: Lens.Lens' ListSteps (Prelude.Maybe [StepState])
listSteps_stepStates :: (Maybe [StepState] -> f (Maybe [StepState]))
-> ListSteps -> f ListSteps
listSteps_stepStates = (ListSteps -> Maybe [StepState])
-> (ListSteps -> Maybe [StepState] -> ListSteps)
-> Lens ListSteps ListSteps (Maybe [StepState]) (Maybe [StepState])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSteps' {Maybe [StepState]
stepStates :: Maybe [StepState]
$sel:stepStates:ListSteps' :: ListSteps -> Maybe [StepState]
stepStates} -> Maybe [StepState]
stepStates) (\s :: ListSteps
s@ListSteps' {} Maybe [StepState]
a -> ListSteps
s {$sel:stepStates:ListSteps' :: Maybe [StepState]
stepStates = Maybe [StepState]
a} :: ListSteps) ((Maybe [StepState] -> f (Maybe [StepState]))
 -> ListSteps -> f ListSteps)
-> ((Maybe [StepState] -> f (Maybe [StepState]))
    -> Maybe [StepState] -> f (Maybe [StepState]))
-> (Maybe [StepState] -> f (Maybe [StepState]))
-> ListSteps
-> f ListSteps
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [StepState] [StepState] [StepState] [StepState]
-> Iso
     (Maybe [StepState])
     (Maybe [StepState])
     (Maybe [StepState])
     (Maybe [StepState])
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 [StepState] [StepState] [StepState] [StepState]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of steps that a single @ListSteps@ action returns is
-- 50. To return a longer list of steps, use multiple @ListSteps@ actions
-- along with the @Marker@ parameter, which is a pagination token that
-- indicates the next set of results to retrieve.
listSteps_marker :: Lens.Lens' ListSteps (Prelude.Maybe Prelude.Text)
listSteps_marker :: (Maybe Text -> f (Maybe Text)) -> ListSteps -> f ListSteps
listSteps_marker = (ListSteps -> Maybe Text)
-> (ListSteps -> Maybe Text -> ListSteps)
-> Lens ListSteps ListSteps (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSteps' {Maybe Text
marker :: Maybe Text
$sel:marker:ListSteps' :: ListSteps -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListSteps
s@ListSteps' {} Maybe Text
a -> ListSteps
s {$sel:marker:ListSteps' :: Maybe Text
marker = Maybe Text
a} :: ListSteps)

-- | The identifier of the cluster for which to list the steps.
listSteps_clusterId :: Lens.Lens' ListSteps Prelude.Text
listSteps_clusterId :: (Text -> f Text) -> ListSteps -> f ListSteps
listSteps_clusterId = (ListSteps -> Text)
-> (ListSteps -> Text -> ListSteps)
-> Lens ListSteps ListSteps Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSteps' {Text
clusterId :: Text
$sel:clusterId:ListSteps' :: ListSteps -> Text
clusterId} -> Text
clusterId) (\s :: ListSteps
s@ListSteps' {} Text
a -> ListSteps
s {$sel:clusterId:ListSteps' :: Text
clusterId = Text
a} :: ListSteps)

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

instance Prelude.Hashable ListSteps

instance Prelude.NFData ListSteps

instance Core.ToHeaders ListSteps where
  toHeaders :: ListSteps -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListSteps -> 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
"ElasticMapReduce.ListSteps" :: 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 ListSteps where
  toJSON :: ListSteps -> Value
toJSON ListSteps' {Maybe [Text]
Maybe [StepState]
Maybe Text
Text
clusterId :: Text
marker :: Maybe Text
stepStates :: Maybe [StepState]
stepIds :: Maybe [Text]
$sel:clusterId:ListSteps' :: ListSteps -> Text
$sel:marker:ListSteps' :: ListSteps -> Maybe Text
$sel:stepStates:ListSteps' :: ListSteps -> Maybe [StepState]
$sel:stepIds:ListSteps' :: ListSteps -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"StepIds" 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]
stepIds,
            (Text
"StepStates" Text -> [StepState] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([StepState] -> Pair) -> Maybe [StepState] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StepState]
stepStates,
            (Text
"Marker" 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
marker,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClusterId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clusterId)
          ]
      )

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

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

-- | This output contains the list of steps returned in reverse order. This
-- means that the last step is the first element in the list.
--
-- /See:/ 'newListStepsResponse' smart constructor.
data ListStepsResponse = ListStepsResponse'
  { -- | The filtered list of steps for the cluster.
    ListStepsResponse -> Maybe [StepSummary]
steps :: Prelude.Maybe [StepSummary],
    -- | The maximum number of steps that a single @ListSteps@ action returns is
    -- 50. To return a longer list of steps, use multiple @ListSteps@ actions
    -- along with the @Marker@ parameter, which is a pagination token that
    -- indicates the next set of results to retrieve.
    ListStepsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListStepsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListStepsResponse -> ListStepsResponse -> Bool
(ListStepsResponse -> ListStepsResponse -> Bool)
-> (ListStepsResponse -> ListStepsResponse -> Bool)
-> Eq ListStepsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListStepsResponse -> ListStepsResponse -> Bool
$c/= :: ListStepsResponse -> ListStepsResponse -> Bool
== :: ListStepsResponse -> ListStepsResponse -> Bool
$c== :: ListStepsResponse -> ListStepsResponse -> Bool
Prelude.Eq, ReadPrec [ListStepsResponse]
ReadPrec ListStepsResponse
Int -> ReadS ListStepsResponse
ReadS [ListStepsResponse]
(Int -> ReadS ListStepsResponse)
-> ReadS [ListStepsResponse]
-> ReadPrec ListStepsResponse
-> ReadPrec [ListStepsResponse]
-> Read ListStepsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListStepsResponse]
$creadListPrec :: ReadPrec [ListStepsResponse]
readPrec :: ReadPrec ListStepsResponse
$creadPrec :: ReadPrec ListStepsResponse
readList :: ReadS [ListStepsResponse]
$creadList :: ReadS [ListStepsResponse]
readsPrec :: Int -> ReadS ListStepsResponse
$creadsPrec :: Int -> ReadS ListStepsResponse
Prelude.Read, Int -> ListStepsResponse -> ShowS
[ListStepsResponse] -> ShowS
ListStepsResponse -> String
(Int -> ListStepsResponse -> ShowS)
-> (ListStepsResponse -> String)
-> ([ListStepsResponse] -> ShowS)
-> Show ListStepsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListStepsResponse] -> ShowS
$cshowList :: [ListStepsResponse] -> ShowS
show :: ListStepsResponse -> String
$cshow :: ListStepsResponse -> String
showsPrec :: Int -> ListStepsResponse -> ShowS
$cshowsPrec :: Int -> ListStepsResponse -> ShowS
Prelude.Show, (forall x. ListStepsResponse -> Rep ListStepsResponse x)
-> (forall x. Rep ListStepsResponse x -> ListStepsResponse)
-> Generic ListStepsResponse
forall x. Rep ListStepsResponse x -> ListStepsResponse
forall x. ListStepsResponse -> Rep ListStepsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListStepsResponse x -> ListStepsResponse
$cfrom :: forall x. ListStepsResponse -> Rep ListStepsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListStepsResponse' 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:
--
-- 'steps', 'listStepsResponse_steps' - The filtered list of steps for the cluster.
--
-- 'marker', 'listStepsResponse_marker' - The maximum number of steps that a single @ListSteps@ action returns is
-- 50. To return a longer list of steps, use multiple @ListSteps@ actions
-- along with the @Marker@ parameter, which is a pagination token that
-- indicates the next set of results to retrieve.
--
-- 'httpStatus', 'listStepsResponse_httpStatus' - The response's http status code.
newListStepsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListStepsResponse
newListStepsResponse :: Int -> ListStepsResponse
newListStepsResponse Int
pHttpStatus_ =
  ListStepsResponse' :: Maybe [StepSummary] -> Maybe Text -> Int -> ListStepsResponse
ListStepsResponse'
    { $sel:steps:ListStepsResponse' :: Maybe [StepSummary]
steps = Maybe [StepSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListStepsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListStepsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The filtered list of steps for the cluster.
listStepsResponse_steps :: Lens.Lens' ListStepsResponse (Prelude.Maybe [StepSummary])
listStepsResponse_steps :: (Maybe [StepSummary] -> f (Maybe [StepSummary]))
-> ListStepsResponse -> f ListStepsResponse
listStepsResponse_steps = (ListStepsResponse -> Maybe [StepSummary])
-> (ListStepsResponse -> Maybe [StepSummary] -> ListStepsResponse)
-> Lens' ListStepsResponse (Maybe [StepSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStepsResponse' {Maybe [StepSummary]
steps :: Maybe [StepSummary]
$sel:steps:ListStepsResponse' :: ListStepsResponse -> Maybe [StepSummary]
steps} -> Maybe [StepSummary]
steps) (\s :: ListStepsResponse
s@ListStepsResponse' {} Maybe [StepSummary]
a -> ListStepsResponse
s {$sel:steps:ListStepsResponse' :: Maybe [StepSummary]
steps = Maybe [StepSummary]
a} :: ListStepsResponse) ((Maybe [StepSummary] -> f (Maybe [StepSummary]))
 -> ListStepsResponse -> f ListStepsResponse)
-> ((Maybe [StepSummary] -> f (Maybe [StepSummary]))
    -> Maybe [StepSummary] -> f (Maybe [StepSummary]))
-> (Maybe [StepSummary] -> f (Maybe [StepSummary]))
-> ListStepsResponse
-> f ListStepsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [StepSummary] [StepSummary] [StepSummary] [StepSummary]
-> Iso
     (Maybe [StepSummary])
     (Maybe [StepSummary])
     (Maybe [StepSummary])
     (Maybe [StepSummary])
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 [StepSummary] [StepSummary] [StepSummary] [StepSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of steps that a single @ListSteps@ action returns is
-- 50. To return a longer list of steps, use multiple @ListSteps@ actions
-- along with the @Marker@ parameter, which is a pagination token that
-- indicates the next set of results to retrieve.
listStepsResponse_marker :: Lens.Lens' ListStepsResponse (Prelude.Maybe Prelude.Text)
listStepsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> ListStepsResponse -> f ListStepsResponse
listStepsResponse_marker = (ListStepsResponse -> Maybe Text)
-> (ListStepsResponse -> Maybe Text -> ListStepsResponse)
-> Lens' ListStepsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListStepsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListStepsResponse' :: ListStepsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListStepsResponse
s@ListStepsResponse' {} Maybe Text
a -> ListStepsResponse
s {$sel:marker:ListStepsResponse' :: Maybe Text
marker = Maybe Text
a} :: ListStepsResponse)

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

instance Prelude.NFData ListStepsResponse