{-# 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.Comprehend.ListKeyPhrasesDetectionJobs
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Get a list of key phrase detection jobs that you have submitted.
--
-- This operation returns paginated results.
module Amazonka.Comprehend.ListKeyPhrasesDetectionJobs
  ( -- * Creating a Request
    ListKeyPhrasesDetectionJobs (..),
    newListKeyPhrasesDetectionJobs,

    -- * Request Lenses
    listKeyPhrasesDetectionJobs_filter,
    listKeyPhrasesDetectionJobs_maxResults,
    listKeyPhrasesDetectionJobs_nextToken,

    -- * Destructuring the Response
    ListKeyPhrasesDetectionJobsResponse (..),
    newListKeyPhrasesDetectionJobsResponse,

    -- * Response Lenses
    listKeyPhrasesDetectionJobsResponse_keyPhrasesDetectionJobPropertiesList,
    listKeyPhrasesDetectionJobsResponse_nextToken,
    listKeyPhrasesDetectionJobsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListKeyPhrasesDetectionJobs' smart constructor.
data ListKeyPhrasesDetectionJobs = ListKeyPhrasesDetectionJobs'
  { -- | Filters the jobs that are returned. You can filter jobs on their name,
    -- status, or the date and time that they were submitted. You can only set
    -- one filter at a time.
    ListKeyPhrasesDetectionJobs -> Maybe KeyPhrasesDetectionJobFilter
filter' :: Prelude.Maybe KeyPhrasesDetectionJobFilter,
    -- | The maximum number of results to return in each page. The default is
    -- 100.
    ListKeyPhrasesDetectionJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Identifies the next page of results to return.
    ListKeyPhrasesDetectionJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListKeyPhrasesDetectionJobs -> ListKeyPhrasesDetectionJobs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListKeyPhrasesDetectionJobs -> ListKeyPhrasesDetectionJobs -> Bool
$c/= :: ListKeyPhrasesDetectionJobs -> ListKeyPhrasesDetectionJobs -> Bool
== :: ListKeyPhrasesDetectionJobs -> ListKeyPhrasesDetectionJobs -> Bool
$c== :: ListKeyPhrasesDetectionJobs -> ListKeyPhrasesDetectionJobs -> Bool
Prelude.Eq, ReadPrec [ListKeyPhrasesDetectionJobs]
ReadPrec ListKeyPhrasesDetectionJobs
Int -> ReadS ListKeyPhrasesDetectionJobs
ReadS [ListKeyPhrasesDetectionJobs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListKeyPhrasesDetectionJobs]
$creadListPrec :: ReadPrec [ListKeyPhrasesDetectionJobs]
readPrec :: ReadPrec ListKeyPhrasesDetectionJobs
$creadPrec :: ReadPrec ListKeyPhrasesDetectionJobs
readList :: ReadS [ListKeyPhrasesDetectionJobs]
$creadList :: ReadS [ListKeyPhrasesDetectionJobs]
readsPrec :: Int -> ReadS ListKeyPhrasesDetectionJobs
$creadsPrec :: Int -> ReadS ListKeyPhrasesDetectionJobs
Prelude.Read, Int -> ListKeyPhrasesDetectionJobs -> ShowS
[ListKeyPhrasesDetectionJobs] -> ShowS
ListKeyPhrasesDetectionJobs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListKeyPhrasesDetectionJobs] -> ShowS
$cshowList :: [ListKeyPhrasesDetectionJobs] -> ShowS
show :: ListKeyPhrasesDetectionJobs -> String
$cshow :: ListKeyPhrasesDetectionJobs -> String
showsPrec :: Int -> ListKeyPhrasesDetectionJobs -> ShowS
$cshowsPrec :: Int -> ListKeyPhrasesDetectionJobs -> ShowS
Prelude.Show, forall x.
Rep ListKeyPhrasesDetectionJobs x -> ListKeyPhrasesDetectionJobs
forall x.
ListKeyPhrasesDetectionJobs -> Rep ListKeyPhrasesDetectionJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListKeyPhrasesDetectionJobs x -> ListKeyPhrasesDetectionJobs
$cfrom :: forall x.
ListKeyPhrasesDetectionJobs -> Rep ListKeyPhrasesDetectionJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListKeyPhrasesDetectionJobs' 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:
--
-- 'filter'', 'listKeyPhrasesDetectionJobs_filter' - Filters the jobs that are returned. You can filter jobs on their name,
-- status, or the date and time that they were submitted. You can only set
-- one filter at a time.
--
-- 'maxResults', 'listKeyPhrasesDetectionJobs_maxResults' - The maximum number of results to return in each page. The default is
-- 100.
--
-- 'nextToken', 'listKeyPhrasesDetectionJobs_nextToken' - Identifies the next page of results to return.
newListKeyPhrasesDetectionJobs ::
  ListKeyPhrasesDetectionJobs
newListKeyPhrasesDetectionJobs :: ListKeyPhrasesDetectionJobs
newListKeyPhrasesDetectionJobs =
  ListKeyPhrasesDetectionJobs'
    { $sel:filter':ListKeyPhrasesDetectionJobs' :: Maybe KeyPhrasesDetectionJobFilter
filter' =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListKeyPhrasesDetectionJobs' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListKeyPhrasesDetectionJobs' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Filters the jobs that are returned. You can filter jobs on their name,
-- status, or the date and time that they were submitted. You can only set
-- one filter at a time.
listKeyPhrasesDetectionJobs_filter :: Lens.Lens' ListKeyPhrasesDetectionJobs (Prelude.Maybe KeyPhrasesDetectionJobFilter)
listKeyPhrasesDetectionJobs_filter :: Lens'
  ListKeyPhrasesDetectionJobs (Maybe KeyPhrasesDetectionJobFilter)
listKeyPhrasesDetectionJobs_filter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListKeyPhrasesDetectionJobs' {Maybe KeyPhrasesDetectionJobFilter
filter' :: Maybe KeyPhrasesDetectionJobFilter
$sel:filter':ListKeyPhrasesDetectionJobs' :: ListKeyPhrasesDetectionJobs -> Maybe KeyPhrasesDetectionJobFilter
filter'} -> Maybe KeyPhrasesDetectionJobFilter
filter') (\s :: ListKeyPhrasesDetectionJobs
s@ListKeyPhrasesDetectionJobs' {} Maybe KeyPhrasesDetectionJobFilter
a -> ListKeyPhrasesDetectionJobs
s {$sel:filter':ListKeyPhrasesDetectionJobs' :: Maybe KeyPhrasesDetectionJobFilter
filter' = Maybe KeyPhrasesDetectionJobFilter
a} :: ListKeyPhrasesDetectionJobs)

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

-- | Identifies the next page of results to return.
listKeyPhrasesDetectionJobs_nextToken :: Lens.Lens' ListKeyPhrasesDetectionJobs (Prelude.Maybe Prelude.Text)
listKeyPhrasesDetectionJobs_nextToken :: Lens' ListKeyPhrasesDetectionJobs (Maybe Text)
listKeyPhrasesDetectionJobs_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListKeyPhrasesDetectionJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListKeyPhrasesDetectionJobs' :: ListKeyPhrasesDetectionJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListKeyPhrasesDetectionJobs
s@ListKeyPhrasesDetectionJobs' {} Maybe Text
a -> ListKeyPhrasesDetectionJobs
s {$sel:nextToken:ListKeyPhrasesDetectionJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListKeyPhrasesDetectionJobs)

instance Core.AWSPager ListKeyPhrasesDetectionJobs where
  page :: ListKeyPhrasesDetectionJobs
-> AWSResponse ListKeyPhrasesDetectionJobs
-> Maybe ListKeyPhrasesDetectionJobs
page ListKeyPhrasesDetectionJobs
rq AWSResponse ListKeyPhrasesDetectionJobs
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListKeyPhrasesDetectionJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListKeyPhrasesDetectionJobsResponse (Maybe Text)
listKeyPhrasesDetectionJobsResponse_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 ListKeyPhrasesDetectionJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListKeyPhrasesDetectionJobsResponse
  (Maybe [KeyPhrasesDetectionJobProperties])
listKeyPhrasesDetectionJobsResponse_keyPhrasesDetectionJobPropertiesList
            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.$ ListKeyPhrasesDetectionJobs
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListKeyPhrasesDetectionJobs (Maybe Text)
listKeyPhrasesDetectionJobs_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListKeyPhrasesDetectionJobs
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListKeyPhrasesDetectionJobsResponse (Maybe Text)
listKeyPhrasesDetectionJobsResponse_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 ListKeyPhrasesDetectionJobs where
  type
    AWSResponse ListKeyPhrasesDetectionJobs =
      ListKeyPhrasesDetectionJobsResponse
  request :: (Service -> Service)
-> ListKeyPhrasesDetectionJobs
-> Request ListKeyPhrasesDetectionJobs
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 ListKeyPhrasesDetectionJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListKeyPhrasesDetectionJobs)))
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 [KeyPhrasesDetectionJobProperties]
-> Maybe Text -> Int -> ListKeyPhrasesDetectionJobsResponse
ListKeyPhrasesDetectionJobsResponse'
            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
"KeyPhrasesDetectionJobPropertiesList"
                            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 ListKeyPhrasesDetectionJobs where
  hashWithSalt :: Int -> ListKeyPhrasesDetectionJobs -> Int
hashWithSalt Int
_salt ListKeyPhrasesDetectionJobs' {Maybe Natural
Maybe Text
Maybe KeyPhrasesDetectionJobFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe KeyPhrasesDetectionJobFilter
$sel:nextToken:ListKeyPhrasesDetectionJobs' :: ListKeyPhrasesDetectionJobs -> Maybe Text
$sel:maxResults:ListKeyPhrasesDetectionJobs' :: ListKeyPhrasesDetectionJobs -> Maybe Natural
$sel:filter':ListKeyPhrasesDetectionJobs' :: ListKeyPhrasesDetectionJobs -> Maybe KeyPhrasesDetectionJobFilter
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KeyPhrasesDetectionJobFilter
filter'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

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

instance Data.ToHeaders ListKeyPhrasesDetectionJobs where
  toHeaders :: ListKeyPhrasesDetectionJobs -> 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
"Comprehend_20171127.ListKeyPhrasesDetectionJobs" ::
                          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 ListKeyPhrasesDetectionJobs where
  toJSON :: ListKeyPhrasesDetectionJobs -> Value
toJSON ListKeyPhrasesDetectionJobs' {Maybe Natural
Maybe Text
Maybe KeyPhrasesDetectionJobFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe KeyPhrasesDetectionJobFilter
$sel:nextToken:ListKeyPhrasesDetectionJobs' :: ListKeyPhrasesDetectionJobs -> Maybe Text
$sel:maxResults:ListKeyPhrasesDetectionJobs' :: ListKeyPhrasesDetectionJobs -> Maybe Natural
$sel:filter':ListKeyPhrasesDetectionJobs' :: ListKeyPhrasesDetectionJobs -> Maybe KeyPhrasesDetectionJobFilter
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filter" 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 KeyPhrasesDetectionJobFilter
filter',
            (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
          ]
      )

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

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

-- | /See:/ 'newListKeyPhrasesDetectionJobsResponse' smart constructor.
data ListKeyPhrasesDetectionJobsResponse = ListKeyPhrasesDetectionJobsResponse'
  { -- | A list containing the properties of each job that is returned.
    ListKeyPhrasesDetectionJobsResponse
-> Maybe [KeyPhrasesDetectionJobProperties]
keyPhrasesDetectionJobPropertiesList :: Prelude.Maybe [KeyPhrasesDetectionJobProperties],
    -- | Identifies the next page of results to return.
    ListKeyPhrasesDetectionJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListKeyPhrasesDetectionJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListKeyPhrasesDetectionJobsResponse
-> ListKeyPhrasesDetectionJobsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListKeyPhrasesDetectionJobsResponse
-> ListKeyPhrasesDetectionJobsResponse -> Bool
$c/= :: ListKeyPhrasesDetectionJobsResponse
-> ListKeyPhrasesDetectionJobsResponse -> Bool
== :: ListKeyPhrasesDetectionJobsResponse
-> ListKeyPhrasesDetectionJobsResponse -> Bool
$c== :: ListKeyPhrasesDetectionJobsResponse
-> ListKeyPhrasesDetectionJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListKeyPhrasesDetectionJobsResponse]
ReadPrec ListKeyPhrasesDetectionJobsResponse
Int -> ReadS ListKeyPhrasesDetectionJobsResponse
ReadS [ListKeyPhrasesDetectionJobsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListKeyPhrasesDetectionJobsResponse]
$creadListPrec :: ReadPrec [ListKeyPhrasesDetectionJobsResponse]
readPrec :: ReadPrec ListKeyPhrasesDetectionJobsResponse
$creadPrec :: ReadPrec ListKeyPhrasesDetectionJobsResponse
readList :: ReadS [ListKeyPhrasesDetectionJobsResponse]
$creadList :: ReadS [ListKeyPhrasesDetectionJobsResponse]
readsPrec :: Int -> ReadS ListKeyPhrasesDetectionJobsResponse
$creadsPrec :: Int -> ReadS ListKeyPhrasesDetectionJobsResponse
Prelude.Read, Int -> ListKeyPhrasesDetectionJobsResponse -> ShowS
[ListKeyPhrasesDetectionJobsResponse] -> ShowS
ListKeyPhrasesDetectionJobsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListKeyPhrasesDetectionJobsResponse] -> ShowS
$cshowList :: [ListKeyPhrasesDetectionJobsResponse] -> ShowS
show :: ListKeyPhrasesDetectionJobsResponse -> String
$cshow :: ListKeyPhrasesDetectionJobsResponse -> String
showsPrec :: Int -> ListKeyPhrasesDetectionJobsResponse -> ShowS
$cshowsPrec :: Int -> ListKeyPhrasesDetectionJobsResponse -> ShowS
Prelude.Show, forall x.
Rep ListKeyPhrasesDetectionJobsResponse x
-> ListKeyPhrasesDetectionJobsResponse
forall x.
ListKeyPhrasesDetectionJobsResponse
-> Rep ListKeyPhrasesDetectionJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListKeyPhrasesDetectionJobsResponse x
-> ListKeyPhrasesDetectionJobsResponse
$cfrom :: forall x.
ListKeyPhrasesDetectionJobsResponse
-> Rep ListKeyPhrasesDetectionJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListKeyPhrasesDetectionJobsResponse' 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:
--
-- 'keyPhrasesDetectionJobPropertiesList', 'listKeyPhrasesDetectionJobsResponse_keyPhrasesDetectionJobPropertiesList' - A list containing the properties of each job that is returned.
--
-- 'nextToken', 'listKeyPhrasesDetectionJobsResponse_nextToken' - Identifies the next page of results to return.
--
-- 'httpStatus', 'listKeyPhrasesDetectionJobsResponse_httpStatus' - The response's http status code.
newListKeyPhrasesDetectionJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListKeyPhrasesDetectionJobsResponse
newListKeyPhrasesDetectionJobsResponse :: Int -> ListKeyPhrasesDetectionJobsResponse
newListKeyPhrasesDetectionJobsResponse Int
pHttpStatus_ =
  ListKeyPhrasesDetectionJobsResponse'
    { $sel:keyPhrasesDetectionJobPropertiesList:ListKeyPhrasesDetectionJobsResponse' :: Maybe [KeyPhrasesDetectionJobProperties]
keyPhrasesDetectionJobPropertiesList =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListKeyPhrasesDetectionJobsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListKeyPhrasesDetectionJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list containing the properties of each job that is returned.
listKeyPhrasesDetectionJobsResponse_keyPhrasesDetectionJobPropertiesList :: Lens.Lens' ListKeyPhrasesDetectionJobsResponse (Prelude.Maybe [KeyPhrasesDetectionJobProperties])
listKeyPhrasesDetectionJobsResponse_keyPhrasesDetectionJobPropertiesList :: Lens'
  ListKeyPhrasesDetectionJobsResponse
  (Maybe [KeyPhrasesDetectionJobProperties])
listKeyPhrasesDetectionJobsResponse_keyPhrasesDetectionJobPropertiesList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListKeyPhrasesDetectionJobsResponse' {Maybe [KeyPhrasesDetectionJobProperties]
keyPhrasesDetectionJobPropertiesList :: Maybe [KeyPhrasesDetectionJobProperties]
$sel:keyPhrasesDetectionJobPropertiesList:ListKeyPhrasesDetectionJobsResponse' :: ListKeyPhrasesDetectionJobsResponse
-> Maybe [KeyPhrasesDetectionJobProperties]
keyPhrasesDetectionJobPropertiesList} -> Maybe [KeyPhrasesDetectionJobProperties]
keyPhrasesDetectionJobPropertiesList) (\s :: ListKeyPhrasesDetectionJobsResponse
s@ListKeyPhrasesDetectionJobsResponse' {} Maybe [KeyPhrasesDetectionJobProperties]
a -> ListKeyPhrasesDetectionJobsResponse
s {$sel:keyPhrasesDetectionJobPropertiesList:ListKeyPhrasesDetectionJobsResponse' :: Maybe [KeyPhrasesDetectionJobProperties]
keyPhrasesDetectionJobPropertiesList = Maybe [KeyPhrasesDetectionJobProperties]
a} :: ListKeyPhrasesDetectionJobsResponse) 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

-- | Identifies the next page of results to return.
listKeyPhrasesDetectionJobsResponse_nextToken :: Lens.Lens' ListKeyPhrasesDetectionJobsResponse (Prelude.Maybe Prelude.Text)
listKeyPhrasesDetectionJobsResponse_nextToken :: Lens' ListKeyPhrasesDetectionJobsResponse (Maybe Text)
listKeyPhrasesDetectionJobsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListKeyPhrasesDetectionJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListKeyPhrasesDetectionJobsResponse' :: ListKeyPhrasesDetectionJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListKeyPhrasesDetectionJobsResponse
s@ListKeyPhrasesDetectionJobsResponse' {} Maybe Text
a -> ListKeyPhrasesDetectionJobsResponse
s {$sel:nextToken:ListKeyPhrasesDetectionJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListKeyPhrasesDetectionJobsResponse)

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

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