{-# 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.Personalize.ListBatchSegmentJobs
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a list of the batch segment jobs that have been performed off of a
-- solution version that you specify.
--
-- This operation returns paginated results.
module Amazonka.Personalize.ListBatchSegmentJobs
  ( -- * Creating a Request
    ListBatchSegmentJobs (..),
    newListBatchSegmentJobs,

    -- * Request Lenses
    listBatchSegmentJobs_maxResults,
    listBatchSegmentJobs_nextToken,
    listBatchSegmentJobs_solutionVersionArn,

    -- * Destructuring the Response
    ListBatchSegmentJobsResponse (..),
    newListBatchSegmentJobsResponse,

    -- * Response Lenses
    listBatchSegmentJobsResponse_batchSegmentJobs,
    listBatchSegmentJobsResponse_nextToken,
    listBatchSegmentJobsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListBatchSegmentJobs' smart constructor.
data ListBatchSegmentJobs = ListBatchSegmentJobs'
  { -- | The maximum number of batch segment job results to return in each page.
    -- The default value is 100.
    ListBatchSegmentJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token to request the next page of results.
    ListBatchSegmentJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the solution version that the batch
    -- segment jobs used to generate batch segments.
    ListBatchSegmentJobs -> Maybe Text
solutionVersionArn :: Prelude.Maybe Prelude.Text
  }
  deriving (ListBatchSegmentJobs -> ListBatchSegmentJobs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBatchSegmentJobs -> ListBatchSegmentJobs -> Bool
$c/= :: ListBatchSegmentJobs -> ListBatchSegmentJobs -> Bool
== :: ListBatchSegmentJobs -> ListBatchSegmentJobs -> Bool
$c== :: ListBatchSegmentJobs -> ListBatchSegmentJobs -> Bool
Prelude.Eq, ReadPrec [ListBatchSegmentJobs]
ReadPrec ListBatchSegmentJobs
Int -> ReadS ListBatchSegmentJobs
ReadS [ListBatchSegmentJobs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBatchSegmentJobs]
$creadListPrec :: ReadPrec [ListBatchSegmentJobs]
readPrec :: ReadPrec ListBatchSegmentJobs
$creadPrec :: ReadPrec ListBatchSegmentJobs
readList :: ReadS [ListBatchSegmentJobs]
$creadList :: ReadS [ListBatchSegmentJobs]
readsPrec :: Int -> ReadS ListBatchSegmentJobs
$creadsPrec :: Int -> ReadS ListBatchSegmentJobs
Prelude.Read, Int -> ListBatchSegmentJobs -> ShowS
[ListBatchSegmentJobs] -> ShowS
ListBatchSegmentJobs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBatchSegmentJobs] -> ShowS
$cshowList :: [ListBatchSegmentJobs] -> ShowS
show :: ListBatchSegmentJobs -> String
$cshow :: ListBatchSegmentJobs -> String
showsPrec :: Int -> ListBatchSegmentJobs -> ShowS
$cshowsPrec :: Int -> ListBatchSegmentJobs -> ShowS
Prelude.Show, forall x. Rep ListBatchSegmentJobs x -> ListBatchSegmentJobs
forall x. ListBatchSegmentJobs -> Rep ListBatchSegmentJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBatchSegmentJobs x -> ListBatchSegmentJobs
$cfrom :: forall x. ListBatchSegmentJobs -> Rep ListBatchSegmentJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListBatchSegmentJobs' 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', 'listBatchSegmentJobs_maxResults' - The maximum number of batch segment job results to return in each page.
-- The default value is 100.
--
-- 'nextToken', 'listBatchSegmentJobs_nextToken' - The token to request the next page of results.
--
-- 'solutionVersionArn', 'listBatchSegmentJobs_solutionVersionArn' - The Amazon Resource Name (ARN) of the solution version that the batch
-- segment jobs used to generate batch segments.
newListBatchSegmentJobs ::
  ListBatchSegmentJobs
newListBatchSegmentJobs :: ListBatchSegmentJobs
newListBatchSegmentJobs =
  ListBatchSegmentJobs'
    { $sel:maxResults:ListBatchSegmentJobs' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBatchSegmentJobs' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:solutionVersionArn:ListBatchSegmentJobs' :: Maybe Text
solutionVersionArn = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of batch segment job results to return in each page.
-- The default value is 100.
listBatchSegmentJobs_maxResults :: Lens.Lens' ListBatchSegmentJobs (Prelude.Maybe Prelude.Natural)
listBatchSegmentJobs_maxResults :: Lens' ListBatchSegmentJobs (Maybe Natural)
listBatchSegmentJobs_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBatchSegmentJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListBatchSegmentJobs
s@ListBatchSegmentJobs' {} Maybe Natural
a -> ListBatchSegmentJobs
s {$sel:maxResults:ListBatchSegmentJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListBatchSegmentJobs)

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

-- | The Amazon Resource Name (ARN) of the solution version that the batch
-- segment jobs used to generate batch segments.
listBatchSegmentJobs_solutionVersionArn :: Lens.Lens' ListBatchSegmentJobs (Prelude.Maybe Prelude.Text)
listBatchSegmentJobs_solutionVersionArn :: Lens' ListBatchSegmentJobs (Maybe Text)
listBatchSegmentJobs_solutionVersionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBatchSegmentJobs' {Maybe Text
solutionVersionArn :: Maybe Text
$sel:solutionVersionArn:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> Maybe Text
solutionVersionArn} -> Maybe Text
solutionVersionArn) (\s :: ListBatchSegmentJobs
s@ListBatchSegmentJobs' {} Maybe Text
a -> ListBatchSegmentJobs
s {$sel:solutionVersionArn:ListBatchSegmentJobs' :: Maybe Text
solutionVersionArn = Maybe Text
a} :: ListBatchSegmentJobs)

instance Core.AWSPager ListBatchSegmentJobs where
  page :: ListBatchSegmentJobs
-> AWSResponse ListBatchSegmentJobs -> Maybe ListBatchSegmentJobs
page ListBatchSegmentJobs
rq AWSResponse ListBatchSegmentJobs
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListBatchSegmentJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListBatchSegmentJobsResponse (Maybe Text)
listBatchSegmentJobsResponse_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 ListBatchSegmentJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListBatchSegmentJobsResponse (Maybe [BatchSegmentJobSummary])
listBatchSegmentJobsResponse_batchSegmentJobs
            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.$ ListBatchSegmentJobs
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListBatchSegmentJobs (Maybe Text)
listBatchSegmentJobs_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListBatchSegmentJobs
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListBatchSegmentJobsResponse (Maybe Text)
listBatchSegmentJobsResponse_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 ListBatchSegmentJobs where
  type
    AWSResponse ListBatchSegmentJobs =
      ListBatchSegmentJobsResponse
  request :: (Service -> Service)
-> ListBatchSegmentJobs -> Request ListBatchSegmentJobs
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListBatchSegmentJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListBatchSegmentJobs)))
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 [BatchSegmentJobSummary]
-> Maybe Text -> Int -> ListBatchSegmentJobsResponse
ListBatchSegmentJobsResponse'
            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
"batchSegmentJobs"
                            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 ListBatchSegmentJobs where
  hashWithSalt :: Int -> ListBatchSegmentJobs -> Int
hashWithSalt Int
_salt ListBatchSegmentJobs' {Maybe Natural
Maybe Text
solutionVersionArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:solutionVersionArn:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> Maybe Text
$sel:nextToken:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> Maybe Text
$sel:maxResults:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> 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 Text
solutionVersionArn

instance Prelude.NFData ListBatchSegmentJobs where
  rnf :: ListBatchSegmentJobs -> ()
rnf ListBatchSegmentJobs' {Maybe Natural
Maybe Text
solutionVersionArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:solutionVersionArn:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> Maybe Text
$sel:nextToken:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> Maybe Text
$sel:maxResults:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> 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 Text
solutionVersionArn

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

instance Data.ToJSON ListBatchSegmentJobs where
  toJSON :: ListBatchSegmentJobs -> Value
toJSON ListBatchSegmentJobs' {Maybe Natural
Maybe Text
solutionVersionArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:solutionVersionArn:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> Maybe Text
$sel:nextToken:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> Maybe Text
$sel:maxResults:ListBatchSegmentJobs' :: ListBatchSegmentJobs -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"solutionVersionArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
solutionVersionArn
          ]
      )

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

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

-- | /See:/ 'newListBatchSegmentJobsResponse' smart constructor.
data ListBatchSegmentJobsResponse = ListBatchSegmentJobsResponse'
  { -- | A list containing information on each job that is returned.
    ListBatchSegmentJobsResponse -> Maybe [BatchSegmentJobSummary]
batchSegmentJobs :: Prelude.Maybe [BatchSegmentJobSummary],
    -- | The token to use to retrieve the next page of results. The value is
    -- @null@ when there are no more results to return.
    ListBatchSegmentJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListBatchSegmentJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListBatchSegmentJobsResponse
-> ListBatchSegmentJobsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBatchSegmentJobsResponse
-> ListBatchSegmentJobsResponse -> Bool
$c/= :: ListBatchSegmentJobsResponse
-> ListBatchSegmentJobsResponse -> Bool
== :: ListBatchSegmentJobsResponse
-> ListBatchSegmentJobsResponse -> Bool
$c== :: ListBatchSegmentJobsResponse
-> ListBatchSegmentJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListBatchSegmentJobsResponse]
ReadPrec ListBatchSegmentJobsResponse
Int -> ReadS ListBatchSegmentJobsResponse
ReadS [ListBatchSegmentJobsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBatchSegmentJobsResponse]
$creadListPrec :: ReadPrec [ListBatchSegmentJobsResponse]
readPrec :: ReadPrec ListBatchSegmentJobsResponse
$creadPrec :: ReadPrec ListBatchSegmentJobsResponse
readList :: ReadS [ListBatchSegmentJobsResponse]
$creadList :: ReadS [ListBatchSegmentJobsResponse]
readsPrec :: Int -> ReadS ListBatchSegmentJobsResponse
$creadsPrec :: Int -> ReadS ListBatchSegmentJobsResponse
Prelude.Read, Int -> ListBatchSegmentJobsResponse -> ShowS
[ListBatchSegmentJobsResponse] -> ShowS
ListBatchSegmentJobsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBatchSegmentJobsResponse] -> ShowS
$cshowList :: [ListBatchSegmentJobsResponse] -> ShowS
show :: ListBatchSegmentJobsResponse -> String
$cshow :: ListBatchSegmentJobsResponse -> String
showsPrec :: Int -> ListBatchSegmentJobsResponse -> ShowS
$cshowsPrec :: Int -> ListBatchSegmentJobsResponse -> ShowS
Prelude.Show, forall x.
Rep ListBatchSegmentJobsResponse x -> ListBatchSegmentJobsResponse
forall x.
ListBatchSegmentJobsResponse -> Rep ListBatchSegmentJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBatchSegmentJobsResponse x -> ListBatchSegmentJobsResponse
$cfrom :: forall x.
ListBatchSegmentJobsResponse -> Rep ListBatchSegmentJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListBatchSegmentJobsResponse' 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:
--
-- 'batchSegmentJobs', 'listBatchSegmentJobsResponse_batchSegmentJobs' - A list containing information on each job that is returned.
--
-- 'nextToken', 'listBatchSegmentJobsResponse_nextToken' - The token to use to retrieve the next page of results. The value is
-- @null@ when there are no more results to return.
--
-- 'httpStatus', 'listBatchSegmentJobsResponse_httpStatus' - The response's http status code.
newListBatchSegmentJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListBatchSegmentJobsResponse
newListBatchSegmentJobsResponse :: Int -> ListBatchSegmentJobsResponse
newListBatchSegmentJobsResponse Int
pHttpStatus_ =
  ListBatchSegmentJobsResponse'
    { $sel:batchSegmentJobs:ListBatchSegmentJobsResponse' :: Maybe [BatchSegmentJobSummary]
batchSegmentJobs =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListBatchSegmentJobsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListBatchSegmentJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list containing information on each job that is returned.
listBatchSegmentJobsResponse_batchSegmentJobs :: Lens.Lens' ListBatchSegmentJobsResponse (Prelude.Maybe [BatchSegmentJobSummary])
listBatchSegmentJobsResponse_batchSegmentJobs :: Lens' ListBatchSegmentJobsResponse (Maybe [BatchSegmentJobSummary])
listBatchSegmentJobsResponse_batchSegmentJobs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBatchSegmentJobsResponse' {Maybe [BatchSegmentJobSummary]
batchSegmentJobs :: Maybe [BatchSegmentJobSummary]
$sel:batchSegmentJobs:ListBatchSegmentJobsResponse' :: ListBatchSegmentJobsResponse -> Maybe [BatchSegmentJobSummary]
batchSegmentJobs} -> Maybe [BatchSegmentJobSummary]
batchSegmentJobs) (\s :: ListBatchSegmentJobsResponse
s@ListBatchSegmentJobsResponse' {} Maybe [BatchSegmentJobSummary]
a -> ListBatchSegmentJobsResponse
s {$sel:batchSegmentJobs:ListBatchSegmentJobsResponse' :: Maybe [BatchSegmentJobSummary]
batchSegmentJobs = Maybe [BatchSegmentJobSummary]
a} :: ListBatchSegmentJobsResponse) 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 to use to retrieve the next page of results. The value is
-- @null@ when there are no more results to return.
listBatchSegmentJobsResponse_nextToken :: Lens.Lens' ListBatchSegmentJobsResponse (Prelude.Maybe Prelude.Text)
listBatchSegmentJobsResponse_nextToken :: Lens' ListBatchSegmentJobsResponse (Maybe Text)
listBatchSegmentJobsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBatchSegmentJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBatchSegmentJobsResponse' :: ListBatchSegmentJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBatchSegmentJobsResponse
s@ListBatchSegmentJobsResponse' {} Maybe Text
a -> ListBatchSegmentJobsResponse
s {$sel:nextToken:ListBatchSegmentJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListBatchSegmentJobsResponse)

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

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