{-# 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.DeviceFarm.ListJobs
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about jobs for a given test run.
--
-- This operation returns paginated results.
module Amazonka.DeviceFarm.ListJobs
  ( -- * Creating a Request
    ListJobs (..),
    newListJobs,

    -- * Request Lenses
    listJobs_nextToken,
    listJobs_arn,

    -- * Destructuring the Response
    ListJobsResponse (..),
    newListJobsResponse,

    -- * Response Lenses
    listJobsResponse_jobs,
    listJobsResponse_nextToken,
    listJobsResponse_httpStatus,
  )
where

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

-- | Represents a request to the list jobs operation.
--
-- /See:/ 'newListJobs' smart constructor.
data ListJobs = ListJobs'
  { -- | An identifier that was returned from the previous call to this
    -- operation, which can be used to return the next set of items in the
    -- list.
    ListJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The run\'s Amazon Resource Name (ARN).
    ListJobs -> Text
arn :: Prelude.Text
  }
  deriving (ListJobs -> ListJobs -> Bool
(ListJobs -> ListJobs -> Bool)
-> (ListJobs -> ListJobs -> Bool) -> Eq ListJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobs -> ListJobs -> Bool
$c/= :: ListJobs -> ListJobs -> Bool
== :: ListJobs -> ListJobs -> Bool
$c== :: ListJobs -> ListJobs -> Bool
Prelude.Eq, ReadPrec [ListJobs]
ReadPrec ListJobs
Int -> ReadS ListJobs
ReadS [ListJobs]
(Int -> ReadS ListJobs)
-> ReadS [ListJobs]
-> ReadPrec ListJobs
-> ReadPrec [ListJobs]
-> Read ListJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobs]
$creadListPrec :: ReadPrec [ListJobs]
readPrec :: ReadPrec ListJobs
$creadPrec :: ReadPrec ListJobs
readList :: ReadS [ListJobs]
$creadList :: ReadS [ListJobs]
readsPrec :: Int -> ReadS ListJobs
$creadsPrec :: Int -> ReadS ListJobs
Prelude.Read, Int -> ListJobs -> ShowS
[ListJobs] -> ShowS
ListJobs -> String
(Int -> ListJobs -> ShowS)
-> (ListJobs -> String) -> ([ListJobs] -> ShowS) -> Show ListJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobs] -> ShowS
$cshowList :: [ListJobs] -> ShowS
show :: ListJobs -> String
$cshow :: ListJobs -> String
showsPrec :: Int -> ListJobs -> ShowS
$cshowsPrec :: Int -> ListJobs -> ShowS
Prelude.Show, (forall x. ListJobs -> Rep ListJobs x)
-> (forall x. Rep ListJobs x -> ListJobs) -> Generic ListJobs
forall x. Rep ListJobs x -> ListJobs
forall x. ListJobs -> Rep ListJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListJobs x -> ListJobs
$cfrom :: forall x. ListJobs -> Rep ListJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListJobs' 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', 'listJobs_nextToken' - An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
--
-- 'arn', 'listJobs_arn' - The run\'s Amazon Resource Name (ARN).
newListJobs ::
  -- | 'arn'
  Prelude.Text ->
  ListJobs
newListJobs :: Text -> ListJobs
newListJobs Text
pArn_ =
  ListJobs' :: Maybe Text -> Text -> ListJobs
ListJobs' {$sel:nextToken:ListJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing, $sel:arn:ListJobs' :: Text
arn = Text
pArn_}

-- | An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
listJobs_nextToken :: Lens.Lens' ListJobs (Prelude.Maybe Prelude.Text)
listJobs_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListJobs -> f ListJobs
listJobs_nextToken = (ListJobs -> Maybe Text)
-> (ListJobs -> Maybe Text -> ListJobs)
-> Lens ListJobs ListJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobs' :: ListJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobs
s@ListJobs' {} Maybe Text
a -> ListJobs
s {$sel:nextToken:ListJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobs)

-- | The run\'s Amazon Resource Name (ARN).
listJobs_arn :: Lens.Lens' ListJobs Prelude.Text
listJobs_arn :: (Text -> f Text) -> ListJobs -> f ListJobs
listJobs_arn = (ListJobs -> Text)
-> (ListJobs -> Text -> ListJobs)
-> Lens ListJobs ListJobs Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobs' {Text
arn :: Text
$sel:arn:ListJobs' :: ListJobs -> Text
arn} -> Text
arn) (\s :: ListJobs
s@ListJobs' {} Text
a -> ListJobs
s {$sel:arn:ListJobs' :: Text
arn = Text
a} :: ListJobs)

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

instance Prelude.NFData ListJobs

instance Core.ToHeaders ListJobs where
  toHeaders :: ListJobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListJobs -> 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
"DeviceFarm_20150623.ListJobs" ::
                          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 ListJobs where
  toJSON :: ListJobs -> Value
toJSON ListJobs' {Maybe Text
Text
arn :: Text
nextToken :: Maybe Text
$sel:arn:ListJobs' :: ListJobs -> Text
$sel:nextToken:ListJobs' :: ListJobs -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"arn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
arn)
          ]
      )

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

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

-- | Represents the result of a list jobs request.
--
-- /See:/ 'newListJobsResponse' smart constructor.
data ListJobsResponse = ListJobsResponse'
  { -- | Information about the jobs.
    ListJobsResponse -> Maybe [Job]
jobs :: Prelude.Maybe [Job],
    -- | If the number of items that are returned is significantly large, this is
    -- an identifier that is also returned. It can be used in a subsequent call
    -- to this operation to return the next set of items in the list.
    ListJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListJobsResponse -> ListJobsResponse -> Bool
(ListJobsResponse -> ListJobsResponse -> Bool)
-> (ListJobsResponse -> ListJobsResponse -> Bool)
-> Eq ListJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobsResponse -> ListJobsResponse -> Bool
$c/= :: ListJobsResponse -> ListJobsResponse -> Bool
== :: ListJobsResponse -> ListJobsResponse -> Bool
$c== :: ListJobsResponse -> ListJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListJobsResponse]
ReadPrec ListJobsResponse
Int -> ReadS ListJobsResponse
ReadS [ListJobsResponse]
(Int -> ReadS ListJobsResponse)
-> ReadS [ListJobsResponse]
-> ReadPrec ListJobsResponse
-> ReadPrec [ListJobsResponse]
-> Read ListJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobsResponse]
$creadListPrec :: ReadPrec [ListJobsResponse]
readPrec :: ReadPrec ListJobsResponse
$creadPrec :: ReadPrec ListJobsResponse
readList :: ReadS [ListJobsResponse]
$creadList :: ReadS [ListJobsResponse]
readsPrec :: Int -> ReadS ListJobsResponse
$creadsPrec :: Int -> ReadS ListJobsResponse
Prelude.Read, Int -> ListJobsResponse -> ShowS
[ListJobsResponse] -> ShowS
ListJobsResponse -> String
(Int -> ListJobsResponse -> ShowS)
-> (ListJobsResponse -> String)
-> ([ListJobsResponse] -> ShowS)
-> Show ListJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobsResponse] -> ShowS
$cshowList :: [ListJobsResponse] -> ShowS
show :: ListJobsResponse -> String
$cshow :: ListJobsResponse -> String
showsPrec :: Int -> ListJobsResponse -> ShowS
$cshowsPrec :: Int -> ListJobsResponse -> ShowS
Prelude.Show, (forall x. ListJobsResponse -> Rep ListJobsResponse x)
-> (forall x. Rep ListJobsResponse x -> ListJobsResponse)
-> Generic ListJobsResponse
forall x. Rep ListJobsResponse x -> ListJobsResponse
forall x. ListJobsResponse -> Rep ListJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListJobsResponse x -> ListJobsResponse
$cfrom :: forall x. ListJobsResponse -> Rep ListJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListJobsResponse' 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:
--
-- 'jobs', 'listJobsResponse_jobs' - Information about the jobs.
--
-- 'nextToken', 'listJobsResponse_nextToken' - If the number of items that are returned is significantly large, this is
-- an identifier that is also returned. It can be used in a subsequent call
-- to this operation to return the next set of items in the list.
--
-- 'httpStatus', 'listJobsResponse_httpStatus' - The response's http status code.
newListJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListJobsResponse
newListJobsResponse :: Int -> ListJobsResponse
newListJobsResponse Int
pHttpStatus_ =
  ListJobsResponse' :: Maybe [Job] -> Maybe Text -> Int -> ListJobsResponse
ListJobsResponse'
    { $sel:jobs:ListJobsResponse' :: Maybe [Job]
jobs = Maybe [Job]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the jobs.
listJobsResponse_jobs :: Lens.Lens' ListJobsResponse (Prelude.Maybe [Job])
listJobsResponse_jobs :: (Maybe [Job] -> f (Maybe [Job]))
-> ListJobsResponse -> f ListJobsResponse
listJobsResponse_jobs = (ListJobsResponse -> Maybe [Job])
-> (ListJobsResponse -> Maybe [Job] -> ListJobsResponse)
-> Lens' ListJobsResponse (Maybe [Job])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobsResponse' {Maybe [Job]
jobs :: Maybe [Job]
$sel:jobs:ListJobsResponse' :: ListJobsResponse -> Maybe [Job]
jobs} -> Maybe [Job]
jobs) (\s :: ListJobsResponse
s@ListJobsResponse' {} Maybe [Job]
a -> ListJobsResponse
s {$sel:jobs:ListJobsResponse' :: Maybe [Job]
jobs = Maybe [Job]
a} :: ListJobsResponse) ((Maybe [Job] -> f (Maybe [Job]))
 -> ListJobsResponse -> f ListJobsResponse)
-> ((Maybe [Job] -> f (Maybe [Job]))
    -> Maybe [Job] -> f (Maybe [Job]))
-> (Maybe [Job] -> f (Maybe [Job]))
-> ListJobsResponse
-> f ListJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Job] [Job] [Job] [Job]
-> Iso (Maybe [Job]) (Maybe [Job]) (Maybe [Job]) (Maybe [Job])
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 [Job] [Job] [Job] [Job]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the number of items that are returned is significantly large, this is
-- an identifier that is also returned. It can be used in a subsequent call
-- to this operation to return the next set of items in the list.
listJobsResponse_nextToken :: Lens.Lens' ListJobsResponse (Prelude.Maybe Prelude.Text)
listJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListJobsResponse -> f ListJobsResponse
listJobsResponse_nextToken = (ListJobsResponse -> Maybe Text)
-> (ListJobsResponse -> Maybe Text -> ListJobsResponse)
-> Lens' ListJobsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobsResponse' :: ListJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobsResponse
s@ListJobsResponse' {} Maybe Text
a -> ListJobsResponse
s {$sel:nextToken:ListJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobsResponse)

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

instance Prelude.NFData ListJobsResponse