{-# 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.ListTargetedSentimentDetectionJobs
-- 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 targeted sentiment detection jobs that you have
-- submitted.
module Amazonka.Comprehend.ListTargetedSentimentDetectionJobs
  ( -- * Creating a Request
    ListTargetedSentimentDetectionJobs (..),
    newListTargetedSentimentDetectionJobs,

    -- * Request Lenses
    listTargetedSentimentDetectionJobs_filter,
    listTargetedSentimentDetectionJobs_maxResults,
    listTargetedSentimentDetectionJobs_nextToken,

    -- * Destructuring the Response
    ListTargetedSentimentDetectionJobsResponse (..),
    newListTargetedSentimentDetectionJobsResponse,

    -- * Response Lenses
    listTargetedSentimentDetectionJobsResponse_nextToken,
    listTargetedSentimentDetectionJobsResponse_targetedSentimentDetectionJobPropertiesList,
    listTargetedSentimentDetectionJobsResponse_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:/ 'newListTargetedSentimentDetectionJobs' smart constructor.
data ListTargetedSentimentDetectionJobs = ListTargetedSentimentDetectionJobs'
  { -- | 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.
    ListTargetedSentimentDetectionJobs
-> Maybe TargetedSentimentDetectionJobFilter
filter' :: Prelude.Maybe TargetedSentimentDetectionJobFilter,
    -- | The maximum number of results to return in each page. The default is
    -- 100.
    ListTargetedSentimentDetectionJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Identifies the next page of results to return.
    ListTargetedSentimentDetectionJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListTargetedSentimentDetectionJobs
-> ListTargetedSentimentDetectionJobs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTargetedSentimentDetectionJobs
-> ListTargetedSentimentDetectionJobs -> Bool
$c/= :: ListTargetedSentimentDetectionJobs
-> ListTargetedSentimentDetectionJobs -> Bool
== :: ListTargetedSentimentDetectionJobs
-> ListTargetedSentimentDetectionJobs -> Bool
$c== :: ListTargetedSentimentDetectionJobs
-> ListTargetedSentimentDetectionJobs -> Bool
Prelude.Eq, ReadPrec [ListTargetedSentimentDetectionJobs]
ReadPrec ListTargetedSentimentDetectionJobs
Int -> ReadS ListTargetedSentimentDetectionJobs
ReadS [ListTargetedSentimentDetectionJobs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTargetedSentimentDetectionJobs]
$creadListPrec :: ReadPrec [ListTargetedSentimentDetectionJobs]
readPrec :: ReadPrec ListTargetedSentimentDetectionJobs
$creadPrec :: ReadPrec ListTargetedSentimentDetectionJobs
readList :: ReadS [ListTargetedSentimentDetectionJobs]
$creadList :: ReadS [ListTargetedSentimentDetectionJobs]
readsPrec :: Int -> ReadS ListTargetedSentimentDetectionJobs
$creadsPrec :: Int -> ReadS ListTargetedSentimentDetectionJobs
Prelude.Read, Int -> ListTargetedSentimentDetectionJobs -> ShowS
[ListTargetedSentimentDetectionJobs] -> ShowS
ListTargetedSentimentDetectionJobs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTargetedSentimentDetectionJobs] -> ShowS
$cshowList :: [ListTargetedSentimentDetectionJobs] -> ShowS
show :: ListTargetedSentimentDetectionJobs -> String
$cshow :: ListTargetedSentimentDetectionJobs -> String
showsPrec :: Int -> ListTargetedSentimentDetectionJobs -> ShowS
$cshowsPrec :: Int -> ListTargetedSentimentDetectionJobs -> ShowS
Prelude.Show, forall x.
Rep ListTargetedSentimentDetectionJobs x
-> ListTargetedSentimentDetectionJobs
forall x.
ListTargetedSentimentDetectionJobs
-> Rep ListTargetedSentimentDetectionJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTargetedSentimentDetectionJobs x
-> ListTargetedSentimentDetectionJobs
$cfrom :: forall x.
ListTargetedSentimentDetectionJobs
-> Rep ListTargetedSentimentDetectionJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListTargetedSentimentDetectionJobs' 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'', 'listTargetedSentimentDetectionJobs_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', 'listTargetedSentimentDetectionJobs_maxResults' - The maximum number of results to return in each page. The default is
-- 100.
--
-- 'nextToken', 'listTargetedSentimentDetectionJobs_nextToken' - Identifies the next page of results to return.
newListTargetedSentimentDetectionJobs ::
  ListTargetedSentimentDetectionJobs
newListTargetedSentimentDetectionJobs :: ListTargetedSentimentDetectionJobs
newListTargetedSentimentDetectionJobs =
  ListTargetedSentimentDetectionJobs'
    { $sel:filter':ListTargetedSentimentDetectionJobs' :: Maybe TargetedSentimentDetectionJobFilter
filter' =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListTargetedSentimentDetectionJobs' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTargetedSentimentDetectionJobs' :: 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.
listTargetedSentimentDetectionJobs_filter :: Lens.Lens' ListTargetedSentimentDetectionJobs (Prelude.Maybe TargetedSentimentDetectionJobFilter)
listTargetedSentimentDetectionJobs_filter :: Lens'
  ListTargetedSentimentDetectionJobs
  (Maybe TargetedSentimentDetectionJobFilter)
listTargetedSentimentDetectionJobs_filter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTargetedSentimentDetectionJobs' {Maybe TargetedSentimentDetectionJobFilter
filter' :: Maybe TargetedSentimentDetectionJobFilter
$sel:filter':ListTargetedSentimentDetectionJobs' :: ListTargetedSentimentDetectionJobs
-> Maybe TargetedSentimentDetectionJobFilter
filter'} -> Maybe TargetedSentimentDetectionJobFilter
filter') (\s :: ListTargetedSentimentDetectionJobs
s@ListTargetedSentimentDetectionJobs' {} Maybe TargetedSentimentDetectionJobFilter
a -> ListTargetedSentimentDetectionJobs
s {$sel:filter':ListTargetedSentimentDetectionJobs' :: Maybe TargetedSentimentDetectionJobFilter
filter' = Maybe TargetedSentimentDetectionJobFilter
a} :: ListTargetedSentimentDetectionJobs)

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

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

instance
  Core.AWSRequest
    ListTargetedSentimentDetectionJobs
  where
  type
    AWSResponse ListTargetedSentimentDetectionJobs =
      ListTargetedSentimentDetectionJobsResponse
  request :: (Service -> Service)
-> ListTargetedSentimentDetectionJobs
-> Request ListTargetedSentimentDetectionJobs
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 ListTargetedSentimentDetectionJobs
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListTargetedSentimentDetectionJobs)))
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 Text
-> Maybe [TargetedSentimentDetectionJobProperties]
-> Int
-> ListTargetedSentimentDetectionJobsResponse
ListTargetedSentimentDetectionJobsResponse'
            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
"NextToken")
            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
"TargetedSentimentDetectionJobPropertiesList"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListTargetedSentimentDetectionJobs
  where
  hashWithSalt :: Int -> ListTargetedSentimentDetectionJobs -> Int
hashWithSalt
    Int
_salt
    ListTargetedSentimentDetectionJobs' {Maybe Natural
Maybe Text
Maybe TargetedSentimentDetectionJobFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe TargetedSentimentDetectionJobFilter
$sel:nextToken:ListTargetedSentimentDetectionJobs' :: ListTargetedSentimentDetectionJobs -> Maybe Text
$sel:maxResults:ListTargetedSentimentDetectionJobs' :: ListTargetedSentimentDetectionJobs -> Maybe Natural
$sel:filter':ListTargetedSentimentDetectionJobs' :: ListTargetedSentimentDetectionJobs
-> Maybe TargetedSentimentDetectionJobFilter
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TargetedSentimentDetectionJobFilter
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
    ListTargetedSentimentDetectionJobs
  where
  rnf :: ListTargetedSentimentDetectionJobs -> ()
rnf ListTargetedSentimentDetectionJobs' {Maybe Natural
Maybe Text
Maybe TargetedSentimentDetectionJobFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe TargetedSentimentDetectionJobFilter
$sel:nextToken:ListTargetedSentimentDetectionJobs' :: ListTargetedSentimentDetectionJobs -> Maybe Text
$sel:maxResults:ListTargetedSentimentDetectionJobs' :: ListTargetedSentimentDetectionJobs -> Maybe Natural
$sel:filter':ListTargetedSentimentDetectionJobs' :: ListTargetedSentimentDetectionJobs
-> Maybe TargetedSentimentDetectionJobFilter
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe TargetedSentimentDetectionJobFilter
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
    ListTargetedSentimentDetectionJobs
  where
  toHeaders :: ListTargetedSentimentDetectionJobs -> 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.ListTargetedSentimentDetectionJobs" ::
                          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
    ListTargetedSentimentDetectionJobs
  where
  toJSON :: ListTargetedSentimentDetectionJobs -> Value
toJSON ListTargetedSentimentDetectionJobs' {Maybe Natural
Maybe Text
Maybe TargetedSentimentDetectionJobFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe TargetedSentimentDetectionJobFilter
$sel:nextToken:ListTargetedSentimentDetectionJobs' :: ListTargetedSentimentDetectionJobs -> Maybe Text
$sel:maxResults:ListTargetedSentimentDetectionJobs' :: ListTargetedSentimentDetectionJobs -> Maybe Natural
$sel:filter':ListTargetedSentimentDetectionJobs' :: ListTargetedSentimentDetectionJobs
-> Maybe TargetedSentimentDetectionJobFilter
..} =
    [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 TargetedSentimentDetectionJobFilter
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
    ListTargetedSentimentDetectionJobs
  where
  toPath :: ListTargetedSentimentDetectionJobs -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListTargetedSentimentDetectionJobsResponse' 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', 'listTargetedSentimentDetectionJobsResponse_nextToken' - Identifies the next page of results to return.
--
-- 'targetedSentimentDetectionJobPropertiesList', 'listTargetedSentimentDetectionJobsResponse_targetedSentimentDetectionJobPropertiesList' - A list containing the properties of each job that is returned.
--
-- 'httpStatus', 'listTargetedSentimentDetectionJobsResponse_httpStatus' - The response's http status code.
newListTargetedSentimentDetectionJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTargetedSentimentDetectionJobsResponse
newListTargetedSentimentDetectionJobsResponse :: Int -> ListTargetedSentimentDetectionJobsResponse
newListTargetedSentimentDetectionJobsResponse
  Int
pHttpStatus_ =
    ListTargetedSentimentDetectionJobsResponse'
      { $sel:nextToken:ListTargetedSentimentDetectionJobsResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:targetedSentimentDetectionJobPropertiesList:ListTargetedSentimentDetectionJobsResponse' :: Maybe [TargetedSentimentDetectionJobProperties]
targetedSentimentDetectionJobPropertiesList =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListTargetedSentimentDetectionJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

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

-- | A list containing the properties of each job that is returned.
listTargetedSentimentDetectionJobsResponse_targetedSentimentDetectionJobPropertiesList :: Lens.Lens' ListTargetedSentimentDetectionJobsResponse (Prelude.Maybe [TargetedSentimentDetectionJobProperties])
listTargetedSentimentDetectionJobsResponse_targetedSentimentDetectionJobPropertiesList :: Lens'
  ListTargetedSentimentDetectionJobsResponse
  (Maybe [TargetedSentimentDetectionJobProperties])
listTargetedSentimentDetectionJobsResponse_targetedSentimentDetectionJobPropertiesList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTargetedSentimentDetectionJobsResponse' {Maybe [TargetedSentimentDetectionJobProperties]
targetedSentimentDetectionJobPropertiesList :: Maybe [TargetedSentimentDetectionJobProperties]
$sel:targetedSentimentDetectionJobPropertiesList:ListTargetedSentimentDetectionJobsResponse' :: ListTargetedSentimentDetectionJobsResponse
-> Maybe [TargetedSentimentDetectionJobProperties]
targetedSentimentDetectionJobPropertiesList} -> Maybe [TargetedSentimentDetectionJobProperties]
targetedSentimentDetectionJobPropertiesList) (\s :: ListTargetedSentimentDetectionJobsResponse
s@ListTargetedSentimentDetectionJobsResponse' {} Maybe [TargetedSentimentDetectionJobProperties]
a -> ListTargetedSentimentDetectionJobsResponse
s {$sel:targetedSentimentDetectionJobPropertiesList:ListTargetedSentimentDetectionJobsResponse' :: Maybe [TargetedSentimentDetectionJobProperties]
targetedSentimentDetectionJobPropertiesList = Maybe [TargetedSentimentDetectionJobProperties]
a} :: ListTargetedSentimentDetectionJobsResponse) 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 response's http status code.
listTargetedSentimentDetectionJobsResponse_httpStatus :: Lens.Lens' ListTargetedSentimentDetectionJobsResponse Prelude.Int
listTargetedSentimentDetectionJobsResponse_httpStatus :: Lens' ListTargetedSentimentDetectionJobsResponse Int
listTargetedSentimentDetectionJobsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTargetedSentimentDetectionJobsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListTargetedSentimentDetectionJobsResponse' :: ListTargetedSentimentDetectionJobsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListTargetedSentimentDetectionJobsResponse
s@ListTargetedSentimentDetectionJobsResponse' {} Int
a -> ListTargetedSentimentDetectionJobsResponse
s {$sel:httpStatus:ListTargetedSentimentDetectionJobsResponse' :: Int
httpStatus = Int
a} :: ListTargetedSentimentDetectionJobsResponse)

instance
  Prelude.NFData
    ListTargetedSentimentDetectionJobsResponse
  where
  rnf :: ListTargetedSentimentDetectionJobsResponse -> ()
rnf ListTargetedSentimentDetectionJobsResponse' {Int
Maybe [TargetedSentimentDetectionJobProperties]
Maybe Text
httpStatus :: Int
targetedSentimentDetectionJobPropertiesList :: Maybe [TargetedSentimentDetectionJobProperties]
nextToken :: Maybe Text
$sel:httpStatus:ListTargetedSentimentDetectionJobsResponse' :: ListTargetedSentimentDetectionJobsResponse -> Int
$sel:targetedSentimentDetectionJobPropertiesList:ListTargetedSentimentDetectionJobsResponse' :: ListTargetedSentimentDetectionJobsResponse
-> Maybe [TargetedSentimentDetectionJobProperties]
$sel:nextToken:ListTargetedSentimentDetectionJobsResponse' :: ListTargetedSentimentDetectionJobsResponse -> Maybe Text
..} =
    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 [TargetedSentimentDetectionJobProperties]
targetedSentimentDetectionJobPropertiesList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus