{-# 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.IoT.ListJobExecutionsForJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the job executions for a job.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions ListJobExecutionsForJob>
-- action.
--
-- This operation returns paginated results.
module Amazonka.IoT.ListJobExecutionsForJob
  ( -- * Creating a Request
    ListJobExecutionsForJob (..),
    newListJobExecutionsForJob,

    -- * Request Lenses
    listJobExecutionsForJob_maxResults,
    listJobExecutionsForJob_nextToken,
    listJobExecutionsForJob_status,
    listJobExecutionsForJob_jobId,

    -- * Destructuring the Response
    ListJobExecutionsForJobResponse (..),
    newListJobExecutionsForJobResponse,

    -- * Response Lenses
    listJobExecutionsForJobResponse_executionSummaries,
    listJobExecutionsForJobResponse_nextToken,
    listJobExecutionsForJobResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListJobExecutionsForJob' smart constructor.
data ListJobExecutionsForJob = ListJobExecutionsForJob'
  { -- | The maximum number of results to be returned per request.
    ListJobExecutionsForJob -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token to retrieve the next set of results.
    ListJobExecutionsForJob -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The status of the job.
    ListJobExecutionsForJob -> Maybe JobExecutionStatus
status :: Prelude.Maybe JobExecutionStatus,
    -- | The unique identifier you assigned to this job when it was created.
    ListJobExecutionsForJob -> Text
jobId :: Prelude.Text
  }
  deriving (ListJobExecutionsForJob -> ListJobExecutionsForJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobExecutionsForJob -> ListJobExecutionsForJob -> Bool
$c/= :: ListJobExecutionsForJob -> ListJobExecutionsForJob -> Bool
== :: ListJobExecutionsForJob -> ListJobExecutionsForJob -> Bool
$c== :: ListJobExecutionsForJob -> ListJobExecutionsForJob -> Bool
Prelude.Eq, ReadPrec [ListJobExecutionsForJob]
ReadPrec ListJobExecutionsForJob
Int -> ReadS ListJobExecutionsForJob
ReadS [ListJobExecutionsForJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobExecutionsForJob]
$creadListPrec :: ReadPrec [ListJobExecutionsForJob]
readPrec :: ReadPrec ListJobExecutionsForJob
$creadPrec :: ReadPrec ListJobExecutionsForJob
readList :: ReadS [ListJobExecutionsForJob]
$creadList :: ReadS [ListJobExecutionsForJob]
readsPrec :: Int -> ReadS ListJobExecutionsForJob
$creadsPrec :: Int -> ReadS ListJobExecutionsForJob
Prelude.Read, Int -> ListJobExecutionsForJob -> ShowS
[ListJobExecutionsForJob] -> ShowS
ListJobExecutionsForJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobExecutionsForJob] -> ShowS
$cshowList :: [ListJobExecutionsForJob] -> ShowS
show :: ListJobExecutionsForJob -> String
$cshow :: ListJobExecutionsForJob -> String
showsPrec :: Int -> ListJobExecutionsForJob -> ShowS
$cshowsPrec :: Int -> ListJobExecutionsForJob -> ShowS
Prelude.Show, forall x. Rep ListJobExecutionsForJob x -> ListJobExecutionsForJob
forall x. ListJobExecutionsForJob -> Rep ListJobExecutionsForJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListJobExecutionsForJob x -> ListJobExecutionsForJob
$cfrom :: forall x. ListJobExecutionsForJob -> Rep ListJobExecutionsForJob x
Prelude.Generic)

-- |
-- Create a value of 'ListJobExecutionsForJob' 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', 'listJobExecutionsForJob_maxResults' - The maximum number of results to be returned per request.
--
-- 'nextToken', 'listJobExecutionsForJob_nextToken' - The token to retrieve the next set of results.
--
-- 'status', 'listJobExecutionsForJob_status' - The status of the job.
--
-- 'jobId', 'listJobExecutionsForJob_jobId' - The unique identifier you assigned to this job when it was created.
newListJobExecutionsForJob ::
  -- | 'jobId'
  Prelude.Text ->
  ListJobExecutionsForJob
newListJobExecutionsForJob :: Text -> ListJobExecutionsForJob
newListJobExecutionsForJob Text
pJobId_ =
  ListJobExecutionsForJob'
    { $sel:maxResults:ListJobExecutionsForJob' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListJobExecutionsForJob' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListJobExecutionsForJob' :: Maybe JobExecutionStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:ListJobExecutionsForJob' :: Text
jobId = Text
pJobId_
    }

-- | The maximum number of results to be returned per request.
listJobExecutionsForJob_maxResults :: Lens.Lens' ListJobExecutionsForJob (Prelude.Maybe Prelude.Natural)
listJobExecutionsForJob_maxResults :: Lens' ListJobExecutionsForJob (Maybe Natural)
listJobExecutionsForJob_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForJob' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListJobExecutionsForJob
s@ListJobExecutionsForJob' {} Maybe Natural
a -> ListJobExecutionsForJob
s {$sel:maxResults:ListJobExecutionsForJob' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListJobExecutionsForJob)

-- | The token to retrieve the next set of results.
listJobExecutionsForJob_nextToken :: Lens.Lens' ListJobExecutionsForJob (Prelude.Maybe Prelude.Text)
listJobExecutionsForJob_nextToken :: Lens' ListJobExecutionsForJob (Maybe Text)
listJobExecutionsForJob_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForJob' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobExecutionsForJob
s@ListJobExecutionsForJob' {} Maybe Text
a -> ListJobExecutionsForJob
s {$sel:nextToken:ListJobExecutionsForJob' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobExecutionsForJob)

-- | The status of the job.
listJobExecutionsForJob_status :: Lens.Lens' ListJobExecutionsForJob (Prelude.Maybe JobExecutionStatus)
listJobExecutionsForJob_status :: Lens' ListJobExecutionsForJob (Maybe JobExecutionStatus)
listJobExecutionsForJob_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForJob' {Maybe JobExecutionStatus
status :: Maybe JobExecutionStatus
$sel:status:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe JobExecutionStatus
status} -> Maybe JobExecutionStatus
status) (\s :: ListJobExecutionsForJob
s@ListJobExecutionsForJob' {} Maybe JobExecutionStatus
a -> ListJobExecutionsForJob
s {$sel:status:ListJobExecutionsForJob' :: Maybe JobExecutionStatus
status = Maybe JobExecutionStatus
a} :: ListJobExecutionsForJob)

-- | The unique identifier you assigned to this job when it was created.
listJobExecutionsForJob_jobId :: Lens.Lens' ListJobExecutionsForJob Prelude.Text
listJobExecutionsForJob_jobId :: Lens' ListJobExecutionsForJob Text
listJobExecutionsForJob_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForJob' {Text
jobId :: Text
$sel:jobId:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Text
jobId} -> Text
jobId) (\s :: ListJobExecutionsForJob
s@ListJobExecutionsForJob' {} Text
a -> ListJobExecutionsForJob
s {$sel:jobId:ListJobExecutionsForJob' :: Text
jobId = Text
a} :: ListJobExecutionsForJob)

instance Core.AWSPager ListJobExecutionsForJob where
  page :: ListJobExecutionsForJob
-> AWSResponse ListJobExecutionsForJob
-> Maybe ListJobExecutionsForJob
page ListJobExecutionsForJob
rq AWSResponse ListJobExecutionsForJob
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListJobExecutionsForJob
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListJobExecutionsForJobResponse (Maybe Text)
listJobExecutionsForJobResponse_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 ListJobExecutionsForJob
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListJobExecutionsForJobResponse (Maybe [JobExecutionSummaryForJob])
listJobExecutionsForJobResponse_executionSummaries
            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.$ ListJobExecutionsForJob
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListJobExecutionsForJob (Maybe Text)
listJobExecutionsForJob_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListJobExecutionsForJob
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListJobExecutionsForJobResponse (Maybe Text)
listJobExecutionsForJobResponse_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 ListJobExecutionsForJob where
  type
    AWSResponse ListJobExecutionsForJob =
      ListJobExecutionsForJobResponse
  request :: (Service -> Service)
-> ListJobExecutionsForJob -> Request ListJobExecutionsForJob
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListJobExecutionsForJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListJobExecutionsForJob)))
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 [JobExecutionSummaryForJob]
-> Maybe Text -> Int -> ListJobExecutionsForJobResponse
ListJobExecutionsForJobResponse'
            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
"executionSummaries"
                            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.<*> (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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListJobExecutionsForJob where
  hashWithSalt :: Int -> ListJobExecutionsForJob -> Int
hashWithSalt Int
_salt ListJobExecutionsForJob' {Maybe Natural
Maybe Text
Maybe JobExecutionStatus
Text
jobId :: Text
status :: Maybe JobExecutionStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:jobId:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Text
$sel:status:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe JobExecutionStatus
$sel:nextToken:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe Text
$sel:maxResults:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> 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 JobExecutionStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobId

instance Prelude.NFData ListJobExecutionsForJob where
  rnf :: ListJobExecutionsForJob -> ()
rnf ListJobExecutionsForJob' {Maybe Natural
Maybe Text
Maybe JobExecutionStatus
Text
jobId :: Text
status :: Maybe JobExecutionStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:jobId:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Text
$sel:status:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe JobExecutionStatus
$sel:nextToken:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe Text
$sel:maxResults:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> 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 JobExecutionStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jobId

instance Data.ToHeaders ListJobExecutionsForJob where
  toHeaders :: ListJobExecutionsForJob -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath ListJobExecutionsForJob where
  toPath :: ListJobExecutionsForJob -> ByteString
toPath ListJobExecutionsForJob' {Maybe Natural
Maybe Text
Maybe JobExecutionStatus
Text
jobId :: Text
status :: Maybe JobExecutionStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:jobId:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Text
$sel:status:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe JobExecutionStatus
$sel:nextToken:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe Text
$sel:maxResults:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/jobs/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
jobId, ByteString
"/things"]

instance Data.ToQuery ListJobExecutionsForJob where
  toQuery :: ListJobExecutionsForJob -> QueryString
toQuery ListJobExecutionsForJob' {Maybe Natural
Maybe Text
Maybe JobExecutionStatus
Text
jobId :: Text
status :: Maybe JobExecutionStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:jobId:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Text
$sel:status:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe JobExecutionStatus
$sel:nextToken:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe Text
$sel:maxResults:ListJobExecutionsForJob' :: ListJobExecutionsForJob -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"status" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe JobExecutionStatus
status
      ]

-- | /See:/ 'newListJobExecutionsForJobResponse' smart constructor.
data ListJobExecutionsForJobResponse = ListJobExecutionsForJobResponse'
  { -- | A list of job execution summaries.
    ListJobExecutionsForJobResponse
-> Maybe [JobExecutionSummaryForJob]
executionSummaries :: Prelude.Maybe [JobExecutionSummaryForJob],
    -- | The token for the next set of results, or __null__ if there are no
    -- additional results.
    ListJobExecutionsForJobResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListJobExecutionsForJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListJobExecutionsForJobResponse
-> ListJobExecutionsForJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobExecutionsForJobResponse
-> ListJobExecutionsForJobResponse -> Bool
$c/= :: ListJobExecutionsForJobResponse
-> ListJobExecutionsForJobResponse -> Bool
== :: ListJobExecutionsForJobResponse
-> ListJobExecutionsForJobResponse -> Bool
$c== :: ListJobExecutionsForJobResponse
-> ListJobExecutionsForJobResponse -> Bool
Prelude.Eq, ReadPrec [ListJobExecutionsForJobResponse]
ReadPrec ListJobExecutionsForJobResponse
Int -> ReadS ListJobExecutionsForJobResponse
ReadS [ListJobExecutionsForJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobExecutionsForJobResponse]
$creadListPrec :: ReadPrec [ListJobExecutionsForJobResponse]
readPrec :: ReadPrec ListJobExecutionsForJobResponse
$creadPrec :: ReadPrec ListJobExecutionsForJobResponse
readList :: ReadS [ListJobExecutionsForJobResponse]
$creadList :: ReadS [ListJobExecutionsForJobResponse]
readsPrec :: Int -> ReadS ListJobExecutionsForJobResponse
$creadsPrec :: Int -> ReadS ListJobExecutionsForJobResponse
Prelude.Read, Int -> ListJobExecutionsForJobResponse -> ShowS
[ListJobExecutionsForJobResponse] -> ShowS
ListJobExecutionsForJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobExecutionsForJobResponse] -> ShowS
$cshowList :: [ListJobExecutionsForJobResponse] -> ShowS
show :: ListJobExecutionsForJobResponse -> String
$cshow :: ListJobExecutionsForJobResponse -> String
showsPrec :: Int -> ListJobExecutionsForJobResponse -> ShowS
$cshowsPrec :: Int -> ListJobExecutionsForJobResponse -> ShowS
Prelude.Show, forall x.
Rep ListJobExecutionsForJobResponse x
-> ListJobExecutionsForJobResponse
forall x.
ListJobExecutionsForJobResponse
-> Rep ListJobExecutionsForJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListJobExecutionsForJobResponse x
-> ListJobExecutionsForJobResponse
$cfrom :: forall x.
ListJobExecutionsForJobResponse
-> Rep ListJobExecutionsForJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListJobExecutionsForJobResponse' 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:
--
-- 'executionSummaries', 'listJobExecutionsForJobResponse_executionSummaries' - A list of job execution summaries.
--
-- 'nextToken', 'listJobExecutionsForJobResponse_nextToken' - The token for the next set of results, or __null__ if there are no
-- additional results.
--
-- 'httpStatus', 'listJobExecutionsForJobResponse_httpStatus' - The response's http status code.
newListJobExecutionsForJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListJobExecutionsForJobResponse
newListJobExecutionsForJobResponse :: Int -> ListJobExecutionsForJobResponse
newListJobExecutionsForJobResponse Int
pHttpStatus_ =
  ListJobExecutionsForJobResponse'
    { $sel:executionSummaries:ListJobExecutionsForJobResponse' :: Maybe [JobExecutionSummaryForJob]
executionSummaries =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListJobExecutionsForJobResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListJobExecutionsForJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of job execution summaries.
listJobExecutionsForJobResponse_executionSummaries :: Lens.Lens' ListJobExecutionsForJobResponse (Prelude.Maybe [JobExecutionSummaryForJob])
listJobExecutionsForJobResponse_executionSummaries :: Lens'
  ListJobExecutionsForJobResponse (Maybe [JobExecutionSummaryForJob])
listJobExecutionsForJobResponse_executionSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForJobResponse' {Maybe [JobExecutionSummaryForJob]
executionSummaries :: Maybe [JobExecutionSummaryForJob]
$sel:executionSummaries:ListJobExecutionsForJobResponse' :: ListJobExecutionsForJobResponse
-> Maybe [JobExecutionSummaryForJob]
executionSummaries} -> Maybe [JobExecutionSummaryForJob]
executionSummaries) (\s :: ListJobExecutionsForJobResponse
s@ListJobExecutionsForJobResponse' {} Maybe [JobExecutionSummaryForJob]
a -> ListJobExecutionsForJobResponse
s {$sel:executionSummaries:ListJobExecutionsForJobResponse' :: Maybe [JobExecutionSummaryForJob]
executionSummaries = Maybe [JobExecutionSummaryForJob]
a} :: ListJobExecutionsForJobResponse) 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 token for the next set of results, or __null__ if there are no
-- additional results.
listJobExecutionsForJobResponse_nextToken :: Lens.Lens' ListJobExecutionsForJobResponse (Prelude.Maybe Prelude.Text)
listJobExecutionsForJobResponse_nextToken :: Lens' ListJobExecutionsForJobResponse (Maybe Text)
listJobExecutionsForJobResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobExecutionsForJobResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobExecutionsForJobResponse' :: ListJobExecutionsForJobResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobExecutionsForJobResponse
s@ListJobExecutionsForJobResponse' {} Maybe Text
a -> ListJobExecutionsForJobResponse
s {$sel:nextToken:ListJobExecutionsForJobResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobExecutionsForJobResponse)

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

instance
  Prelude.NFData
    ListJobExecutionsForJobResponse
  where
  rnf :: ListJobExecutionsForJobResponse -> ()
rnf ListJobExecutionsForJobResponse' {Int
Maybe [JobExecutionSummaryForJob]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
executionSummaries :: Maybe [JobExecutionSummaryForJob]
$sel:httpStatus:ListJobExecutionsForJobResponse' :: ListJobExecutionsForJobResponse -> Int
$sel:nextToken:ListJobExecutionsForJobResponse' :: ListJobExecutionsForJobResponse -> Maybe Text
$sel:executionSummaries:ListJobExecutionsForJobResponse' :: ListJobExecutionsForJobResponse
-> Maybe [JobExecutionSummaryForJob]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [JobExecutionSummaryForJob]
executionSummaries
      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 Int
httpStatus