{-# 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.DataBrew.ListJobRuns
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all of the previous runs of a particular DataBrew job.
--
-- This operation returns paginated results.
module Amazonka.DataBrew.ListJobRuns
  ( -- * Creating a Request
    ListJobRuns (..),
    newListJobRuns,

    -- * Request Lenses
    listJobRuns_nextToken,
    listJobRuns_maxResults,
    listJobRuns_name,

    -- * Destructuring the Response
    ListJobRunsResponse (..),
    newListJobRunsResponse,

    -- * Response Lenses
    listJobRunsResponse_nextToken,
    listJobRunsResponse_httpStatus,
    listJobRunsResponse_jobRuns,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DataBrew.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

-- | /See:/ 'newListJobRuns' smart constructor.
data ListJobRuns = ListJobRuns'
  { -- | The token returned by a previous call to retrieve the next set of
    -- results.
    ListJobRuns -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in this request.
    ListJobRuns -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The name of the job.
    ListJobRuns -> Text
name :: Prelude.Text
  }
  deriving (ListJobRuns -> ListJobRuns -> Bool
(ListJobRuns -> ListJobRuns -> Bool)
-> (ListJobRuns -> ListJobRuns -> Bool) -> Eq ListJobRuns
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobRuns -> ListJobRuns -> Bool
$c/= :: ListJobRuns -> ListJobRuns -> Bool
== :: ListJobRuns -> ListJobRuns -> Bool
$c== :: ListJobRuns -> ListJobRuns -> Bool
Prelude.Eq, ReadPrec [ListJobRuns]
ReadPrec ListJobRuns
Int -> ReadS ListJobRuns
ReadS [ListJobRuns]
(Int -> ReadS ListJobRuns)
-> ReadS [ListJobRuns]
-> ReadPrec ListJobRuns
-> ReadPrec [ListJobRuns]
-> Read ListJobRuns
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobRuns]
$creadListPrec :: ReadPrec [ListJobRuns]
readPrec :: ReadPrec ListJobRuns
$creadPrec :: ReadPrec ListJobRuns
readList :: ReadS [ListJobRuns]
$creadList :: ReadS [ListJobRuns]
readsPrec :: Int -> ReadS ListJobRuns
$creadsPrec :: Int -> ReadS ListJobRuns
Prelude.Read, Int -> ListJobRuns -> ShowS
[ListJobRuns] -> ShowS
ListJobRuns -> String
(Int -> ListJobRuns -> ShowS)
-> (ListJobRuns -> String)
-> ([ListJobRuns] -> ShowS)
-> Show ListJobRuns
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobRuns] -> ShowS
$cshowList :: [ListJobRuns] -> ShowS
show :: ListJobRuns -> String
$cshow :: ListJobRuns -> String
showsPrec :: Int -> ListJobRuns -> ShowS
$cshowsPrec :: Int -> ListJobRuns -> ShowS
Prelude.Show, (forall x. ListJobRuns -> Rep ListJobRuns x)
-> (forall x. Rep ListJobRuns x -> ListJobRuns)
-> Generic ListJobRuns
forall x. Rep ListJobRuns x -> ListJobRuns
forall x. ListJobRuns -> Rep ListJobRuns x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListJobRuns x -> ListJobRuns
$cfrom :: forall x. ListJobRuns -> Rep ListJobRuns x
Prelude.Generic)

-- |
-- Create a value of 'ListJobRuns' 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', 'listJobRuns_nextToken' - The token returned by a previous call to retrieve the next set of
-- results.
--
-- 'maxResults', 'listJobRuns_maxResults' - The maximum number of results to return in this request.
--
-- 'name', 'listJobRuns_name' - The name of the job.
newListJobRuns ::
  -- | 'name'
  Prelude.Text ->
  ListJobRuns
newListJobRuns :: Text -> ListJobRuns
newListJobRuns Text
pName_ =
  ListJobRuns' :: Maybe Text -> Maybe Natural -> Text -> ListJobRuns
ListJobRuns'
    { $sel:nextToken:ListJobRuns' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListJobRuns' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ListJobRuns' :: Text
name = Text
pName_
    }

-- | The token returned by a previous call to retrieve the next set of
-- results.
listJobRuns_nextToken :: Lens.Lens' ListJobRuns (Prelude.Maybe Prelude.Text)
listJobRuns_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListJobRuns -> f ListJobRuns
listJobRuns_nextToken = (ListJobRuns -> Maybe Text)
-> (ListJobRuns -> Maybe Text -> ListJobRuns)
-> Lens ListJobRuns ListJobRuns (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobRuns' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobRuns' :: ListJobRuns -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobRuns
s@ListJobRuns' {} Maybe Text
a -> ListJobRuns
s {$sel:nextToken:ListJobRuns' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobRuns)

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

-- | The name of the job.
listJobRuns_name :: Lens.Lens' ListJobRuns Prelude.Text
listJobRuns_name :: (Text -> f Text) -> ListJobRuns -> f ListJobRuns
listJobRuns_name = (ListJobRuns -> Text)
-> (ListJobRuns -> Text -> ListJobRuns)
-> Lens ListJobRuns ListJobRuns Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobRuns' {Text
name :: Text
$sel:name:ListJobRuns' :: ListJobRuns -> Text
name} -> Text
name) (\s :: ListJobRuns
s@ListJobRuns' {} Text
a -> ListJobRuns
s {$sel:name:ListJobRuns' :: Text
name = Text
a} :: ListJobRuns)

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

instance Prelude.Hashable ListJobRuns

instance Prelude.NFData ListJobRuns

instance Core.ToHeaders ListJobRuns where
  toHeaders :: ListJobRuns -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListJobRuns -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath ListJobRuns where
  toPath :: ListJobRuns -> ByteString
toPath ListJobRuns' {Maybe Natural
Maybe Text
Text
name :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:name:ListJobRuns' :: ListJobRuns -> Text
$sel:maxResults:ListJobRuns' :: ListJobRuns -> Maybe Natural
$sel:nextToken:ListJobRuns' :: ListJobRuns -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/jobs/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name, ByteString
"/jobRuns"]

instance Core.ToQuery ListJobRuns where
  toQuery :: ListJobRuns -> QueryString
toQuery ListJobRuns' {Maybe Natural
Maybe Text
Text
name :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:name:ListJobRuns' :: ListJobRuns -> Text
$sel:maxResults:ListJobRuns' :: ListJobRuns -> Maybe Natural
$sel:nextToken:ListJobRuns' :: ListJobRuns -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListJobRunsResponse' smart constructor.
data ListJobRunsResponse = ListJobRunsResponse'
  { -- | A token that you can use in a subsequent call to retrieve the next set
    -- of results.
    ListJobRunsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListJobRunsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of job runs that have occurred for the specified job.
    ListJobRunsResponse -> [JobRun]
jobRuns :: [JobRun]
  }
  deriving (ListJobRunsResponse -> ListJobRunsResponse -> Bool
(ListJobRunsResponse -> ListJobRunsResponse -> Bool)
-> (ListJobRunsResponse -> ListJobRunsResponse -> Bool)
-> Eq ListJobRunsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobRunsResponse -> ListJobRunsResponse -> Bool
$c/= :: ListJobRunsResponse -> ListJobRunsResponse -> Bool
== :: ListJobRunsResponse -> ListJobRunsResponse -> Bool
$c== :: ListJobRunsResponse -> ListJobRunsResponse -> Bool
Prelude.Eq, ReadPrec [ListJobRunsResponse]
ReadPrec ListJobRunsResponse
Int -> ReadS ListJobRunsResponse
ReadS [ListJobRunsResponse]
(Int -> ReadS ListJobRunsResponse)
-> ReadS [ListJobRunsResponse]
-> ReadPrec ListJobRunsResponse
-> ReadPrec [ListJobRunsResponse]
-> Read ListJobRunsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobRunsResponse]
$creadListPrec :: ReadPrec [ListJobRunsResponse]
readPrec :: ReadPrec ListJobRunsResponse
$creadPrec :: ReadPrec ListJobRunsResponse
readList :: ReadS [ListJobRunsResponse]
$creadList :: ReadS [ListJobRunsResponse]
readsPrec :: Int -> ReadS ListJobRunsResponse
$creadsPrec :: Int -> ReadS ListJobRunsResponse
Prelude.Read, Int -> ListJobRunsResponse -> ShowS
[ListJobRunsResponse] -> ShowS
ListJobRunsResponse -> String
(Int -> ListJobRunsResponse -> ShowS)
-> (ListJobRunsResponse -> String)
-> ([ListJobRunsResponse] -> ShowS)
-> Show ListJobRunsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobRunsResponse] -> ShowS
$cshowList :: [ListJobRunsResponse] -> ShowS
show :: ListJobRunsResponse -> String
$cshow :: ListJobRunsResponse -> String
showsPrec :: Int -> ListJobRunsResponse -> ShowS
$cshowsPrec :: Int -> ListJobRunsResponse -> ShowS
Prelude.Show, (forall x. ListJobRunsResponse -> Rep ListJobRunsResponse x)
-> (forall x. Rep ListJobRunsResponse x -> ListJobRunsResponse)
-> Generic ListJobRunsResponse
forall x. Rep ListJobRunsResponse x -> ListJobRunsResponse
forall x. ListJobRunsResponse -> Rep ListJobRunsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListJobRunsResponse x -> ListJobRunsResponse
$cfrom :: forall x. ListJobRunsResponse -> Rep ListJobRunsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListJobRunsResponse' 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', 'listJobRunsResponse_nextToken' - A token that you can use in a subsequent call to retrieve the next set
-- of results.
--
-- 'httpStatus', 'listJobRunsResponse_httpStatus' - The response's http status code.
--
-- 'jobRuns', 'listJobRunsResponse_jobRuns' - A list of job runs that have occurred for the specified job.
newListJobRunsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListJobRunsResponse
newListJobRunsResponse :: Int -> ListJobRunsResponse
newListJobRunsResponse Int
pHttpStatus_ =
  ListJobRunsResponse' :: Maybe Text -> Int -> [JobRun] -> ListJobRunsResponse
ListJobRunsResponse'
    { $sel:nextToken:ListJobRunsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListJobRunsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:jobRuns:ListJobRunsResponse' :: [JobRun]
jobRuns = [JobRun]
forall a. Monoid a => a
Prelude.mempty
    }

-- | A token that you can use in a subsequent call to retrieve the next set
-- of results.
listJobRunsResponse_nextToken :: Lens.Lens' ListJobRunsResponse (Prelude.Maybe Prelude.Text)
listJobRunsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListJobRunsResponse -> f ListJobRunsResponse
listJobRunsResponse_nextToken = (ListJobRunsResponse -> Maybe Text)
-> (ListJobRunsResponse -> Maybe Text -> ListJobRunsResponse)
-> Lens' ListJobRunsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobRunsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobRunsResponse' :: ListJobRunsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobRunsResponse
s@ListJobRunsResponse' {} Maybe Text
a -> ListJobRunsResponse
s {$sel:nextToken:ListJobRunsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobRunsResponse)

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

-- | A list of job runs that have occurred for the specified job.
listJobRunsResponse_jobRuns :: Lens.Lens' ListJobRunsResponse [JobRun]
listJobRunsResponse_jobRuns :: ([JobRun] -> f [JobRun])
-> ListJobRunsResponse -> f ListJobRunsResponse
listJobRunsResponse_jobRuns = (ListJobRunsResponse -> [JobRun])
-> (ListJobRunsResponse -> [JobRun] -> ListJobRunsResponse)
-> Lens' ListJobRunsResponse [JobRun]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobRunsResponse' {[JobRun]
jobRuns :: [JobRun]
$sel:jobRuns:ListJobRunsResponse' :: ListJobRunsResponse -> [JobRun]
jobRuns} -> [JobRun]
jobRuns) (\s :: ListJobRunsResponse
s@ListJobRunsResponse' {} [JobRun]
a -> ListJobRunsResponse
s {$sel:jobRuns:ListJobRunsResponse' :: [JobRun]
jobRuns = [JobRun]
a} :: ListJobRunsResponse) (([JobRun] -> f [JobRun])
 -> ListJobRunsResponse -> f ListJobRunsResponse)
-> (([JobRun] -> f [JobRun]) -> [JobRun] -> f [JobRun])
-> ([JobRun] -> f [JobRun])
-> ListJobRunsResponse
-> f ListJobRunsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([JobRun] -> f [JobRun]) -> [JobRun] -> f [JobRun]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListJobRunsResponse