{-# 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.ListPiiEntitiesDetectionJobs
-- 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 PII entity detection jobs that you have submitted.
--
-- This operation returns paginated results.
module Amazonka.Comprehend.ListPiiEntitiesDetectionJobs
  ( -- * Creating a Request
    ListPiiEntitiesDetectionJobs (..),
    newListPiiEntitiesDetectionJobs,

    -- * Request Lenses
    listPiiEntitiesDetectionJobs_filter,
    listPiiEntitiesDetectionJobs_maxResults,
    listPiiEntitiesDetectionJobs_nextToken,

    -- * Destructuring the Response
    ListPiiEntitiesDetectionJobsResponse (..),
    newListPiiEntitiesDetectionJobsResponse,

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

-- |
-- Create a value of 'ListPiiEntitiesDetectionJobs' 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'', 'listPiiEntitiesDetectionJobs_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', 'listPiiEntitiesDetectionJobs_maxResults' - The maximum number of results to return in each page.
--
-- 'nextToken', 'listPiiEntitiesDetectionJobs_nextToken' - Identifies the next page of results to return.
newListPiiEntitiesDetectionJobs ::
  ListPiiEntitiesDetectionJobs
newListPiiEntitiesDetectionJobs :: ListPiiEntitiesDetectionJobs
newListPiiEntitiesDetectionJobs =
  ListPiiEntitiesDetectionJobs'
    { $sel:filter':ListPiiEntitiesDetectionJobs' :: Maybe PiiEntitiesDetectionJobFilter
filter' =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListPiiEntitiesDetectionJobs' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPiiEntitiesDetectionJobs' :: 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.
listPiiEntitiesDetectionJobs_filter :: Lens.Lens' ListPiiEntitiesDetectionJobs (Prelude.Maybe PiiEntitiesDetectionJobFilter)
listPiiEntitiesDetectionJobs_filter :: Lens'
  ListPiiEntitiesDetectionJobs (Maybe PiiEntitiesDetectionJobFilter)
listPiiEntitiesDetectionJobs_filter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPiiEntitiesDetectionJobs' {Maybe PiiEntitiesDetectionJobFilter
filter' :: Maybe PiiEntitiesDetectionJobFilter
$sel:filter':ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe PiiEntitiesDetectionJobFilter
filter'} -> Maybe PiiEntitiesDetectionJobFilter
filter') (\s :: ListPiiEntitiesDetectionJobs
s@ListPiiEntitiesDetectionJobs' {} Maybe PiiEntitiesDetectionJobFilter
a -> ListPiiEntitiesDetectionJobs
s {$sel:filter':ListPiiEntitiesDetectionJobs' :: Maybe PiiEntitiesDetectionJobFilter
filter' = Maybe PiiEntitiesDetectionJobFilter
a} :: ListPiiEntitiesDetectionJobs)

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

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

instance Core.AWSPager ListPiiEntitiesDetectionJobs where
  page :: ListPiiEntitiesDetectionJobs
-> AWSResponse ListPiiEntitiesDetectionJobs
-> Maybe ListPiiEntitiesDetectionJobs
page ListPiiEntitiesDetectionJobs
rq AWSResponse ListPiiEntitiesDetectionJobs
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListPiiEntitiesDetectionJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListPiiEntitiesDetectionJobsResponse (Maybe Text)
listPiiEntitiesDetectionJobsResponse_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 ListPiiEntitiesDetectionJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListPiiEntitiesDetectionJobsResponse
  (Maybe [PiiEntitiesDetectionJobProperties])
listPiiEntitiesDetectionJobsResponse_piiEntitiesDetectionJobPropertiesList
            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.$ ListPiiEntitiesDetectionJobs
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListPiiEntitiesDetectionJobs (Maybe Text)
listPiiEntitiesDetectionJobs_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListPiiEntitiesDetectionJobs
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListPiiEntitiesDetectionJobsResponse (Maybe Text)
listPiiEntitiesDetectionJobsResponse_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 ListPiiEntitiesDetectionJobs where
  type
    AWSResponse ListPiiEntitiesDetectionJobs =
      ListPiiEntitiesDetectionJobsResponse
  request :: (Service -> Service)
-> ListPiiEntitiesDetectionJobs
-> Request ListPiiEntitiesDetectionJobs
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 ListPiiEntitiesDetectionJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListPiiEntitiesDetectionJobs)))
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 [PiiEntitiesDetectionJobProperties]
-> Int
-> ListPiiEntitiesDetectionJobsResponse
ListPiiEntitiesDetectionJobsResponse'
            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
"PiiEntitiesDetectionJobPropertiesList"
                            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
    ListPiiEntitiesDetectionJobs
  where
  hashWithSalt :: Int -> ListPiiEntitiesDetectionJobs -> Int
hashWithSalt Int
_salt ListPiiEntitiesDetectionJobs' {Maybe Natural
Maybe Text
Maybe PiiEntitiesDetectionJobFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe PiiEntitiesDetectionJobFilter
$sel:nextToken:ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe Text
$sel:maxResults:ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe Natural
$sel:filter':ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe PiiEntitiesDetectionJobFilter
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PiiEntitiesDetectionJobFilter
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 ListPiiEntitiesDetectionJobs where
  rnf :: ListPiiEntitiesDetectionJobs -> ()
rnf ListPiiEntitiesDetectionJobs' {Maybe Natural
Maybe Text
Maybe PiiEntitiesDetectionJobFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe PiiEntitiesDetectionJobFilter
$sel:nextToken:ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe Text
$sel:maxResults:ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe Natural
$sel:filter':ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe PiiEntitiesDetectionJobFilter
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe PiiEntitiesDetectionJobFilter
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 ListPiiEntitiesDetectionJobs where
  toHeaders :: ListPiiEntitiesDetectionJobs -> 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.ListPiiEntitiesDetectionJobs" ::
                          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 ListPiiEntitiesDetectionJobs where
  toJSON :: ListPiiEntitiesDetectionJobs -> Value
toJSON ListPiiEntitiesDetectionJobs' {Maybe Natural
Maybe Text
Maybe PiiEntitiesDetectionJobFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe PiiEntitiesDetectionJobFilter
$sel:nextToken:ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe Text
$sel:maxResults:ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe Natural
$sel:filter':ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe PiiEntitiesDetectionJobFilter
..} =
    [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 PiiEntitiesDetectionJobFilter
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 ListPiiEntitiesDetectionJobs where
  toPath :: ListPiiEntitiesDetectionJobs -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListPiiEntitiesDetectionJobsResponse' 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', 'listPiiEntitiesDetectionJobsResponse_nextToken' - Identifies the next page of results to return.
--
-- 'piiEntitiesDetectionJobPropertiesList', 'listPiiEntitiesDetectionJobsResponse_piiEntitiesDetectionJobPropertiesList' - A list containing the properties of each job that is returned.
--
-- 'httpStatus', 'listPiiEntitiesDetectionJobsResponse_httpStatus' - The response's http status code.
newListPiiEntitiesDetectionJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPiiEntitiesDetectionJobsResponse
newListPiiEntitiesDetectionJobsResponse :: Int -> ListPiiEntitiesDetectionJobsResponse
newListPiiEntitiesDetectionJobsResponse Int
pHttpStatus_ =
  ListPiiEntitiesDetectionJobsResponse'
    { $sel:nextToken:ListPiiEntitiesDetectionJobsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:piiEntitiesDetectionJobPropertiesList:ListPiiEntitiesDetectionJobsResponse' :: Maybe [PiiEntitiesDetectionJobProperties]
piiEntitiesDetectionJobPropertiesList =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPiiEntitiesDetectionJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | A list containing the properties of each job that is returned.
listPiiEntitiesDetectionJobsResponse_piiEntitiesDetectionJobPropertiesList :: Lens.Lens' ListPiiEntitiesDetectionJobsResponse (Prelude.Maybe [PiiEntitiesDetectionJobProperties])
listPiiEntitiesDetectionJobsResponse_piiEntitiesDetectionJobPropertiesList :: Lens'
  ListPiiEntitiesDetectionJobsResponse
  (Maybe [PiiEntitiesDetectionJobProperties])
listPiiEntitiesDetectionJobsResponse_piiEntitiesDetectionJobPropertiesList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPiiEntitiesDetectionJobsResponse' {Maybe [PiiEntitiesDetectionJobProperties]
piiEntitiesDetectionJobPropertiesList :: Maybe [PiiEntitiesDetectionJobProperties]
$sel:piiEntitiesDetectionJobPropertiesList:ListPiiEntitiesDetectionJobsResponse' :: ListPiiEntitiesDetectionJobsResponse
-> Maybe [PiiEntitiesDetectionJobProperties]
piiEntitiesDetectionJobPropertiesList} -> Maybe [PiiEntitiesDetectionJobProperties]
piiEntitiesDetectionJobPropertiesList) (\s :: ListPiiEntitiesDetectionJobsResponse
s@ListPiiEntitiesDetectionJobsResponse' {} Maybe [PiiEntitiesDetectionJobProperties]
a -> ListPiiEntitiesDetectionJobsResponse
s {$sel:piiEntitiesDetectionJobPropertiesList:ListPiiEntitiesDetectionJobsResponse' :: Maybe [PiiEntitiesDetectionJobProperties]
piiEntitiesDetectionJobPropertiesList = Maybe [PiiEntitiesDetectionJobProperties]
a} :: ListPiiEntitiesDetectionJobsResponse) 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.
listPiiEntitiesDetectionJobsResponse_httpStatus :: Lens.Lens' ListPiiEntitiesDetectionJobsResponse Prelude.Int
listPiiEntitiesDetectionJobsResponse_httpStatus :: Lens' ListPiiEntitiesDetectionJobsResponse Int
listPiiEntitiesDetectionJobsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPiiEntitiesDetectionJobsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListPiiEntitiesDetectionJobsResponse' :: ListPiiEntitiesDetectionJobsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListPiiEntitiesDetectionJobsResponse
s@ListPiiEntitiesDetectionJobsResponse' {} Int
a -> ListPiiEntitiesDetectionJobsResponse
s {$sel:httpStatus:ListPiiEntitiesDetectionJobsResponse' :: Int
httpStatus = Int
a} :: ListPiiEntitiesDetectionJobsResponse)

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