{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a list of the PII entity detection jobs that you have submitted.
module Amazonka.Comprehend.ListPiiEntitiesDetectionJobs
  ( -- * Creating a Request
    ListPiiEntitiesDetectionJobs (..),
    newListPiiEntitiesDetectionJobs,

    -- * Request Lenses
    listPiiEntitiesDetectionJobs_nextToken,
    listPiiEntitiesDetectionJobs_filter,
    listPiiEntitiesDetectionJobs_maxResults,

    -- * 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.Lens as Lens
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'
  { -- | Identifies the next page of results to return.
    ListPiiEntitiesDetectionJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | 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
  }
  deriving (ListPiiEntitiesDetectionJobs
-> ListPiiEntitiesDetectionJobs -> Bool
(ListPiiEntitiesDetectionJobs
 -> ListPiiEntitiesDetectionJobs -> Bool)
-> (ListPiiEntitiesDetectionJobs
    -> ListPiiEntitiesDetectionJobs -> Bool)
-> Eq ListPiiEntitiesDetectionJobs
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]
(Int -> ReadS ListPiiEntitiesDetectionJobs)
-> ReadS [ListPiiEntitiesDetectionJobs]
-> ReadPrec ListPiiEntitiesDetectionJobs
-> ReadPrec [ListPiiEntitiesDetectionJobs]
-> Read 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
(Int -> ListPiiEntitiesDetectionJobs -> ShowS)
-> (ListPiiEntitiesDetectionJobs -> String)
-> ([ListPiiEntitiesDetectionJobs] -> ShowS)
-> Show ListPiiEntitiesDetectionJobs
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.
 ListPiiEntitiesDetectionJobs -> Rep ListPiiEntitiesDetectionJobs x)
-> (forall x.
    Rep ListPiiEntitiesDetectionJobs x -> ListPiiEntitiesDetectionJobs)
-> Generic ListPiiEntitiesDetectionJobs
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:
--
-- 'nextToken', 'listPiiEntitiesDetectionJobs_nextToken' - Identifies the next page of results to return.
--
-- '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.
newListPiiEntitiesDetectionJobs ::
  ListPiiEntitiesDetectionJobs
newListPiiEntitiesDetectionJobs :: ListPiiEntitiesDetectionJobs
newListPiiEntitiesDetectionJobs =
  ListPiiEntitiesDetectionJobs' :: Maybe Text
-> Maybe PiiEntitiesDetectionJobFilter
-> Maybe Natural
-> ListPiiEntitiesDetectionJobs
ListPiiEntitiesDetectionJobs'
    { $sel:nextToken:ListPiiEntitiesDetectionJobs' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:filter':ListPiiEntitiesDetectionJobs' :: Maybe PiiEntitiesDetectionJobFilter
filter' = Maybe PiiEntitiesDetectionJobFilter
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListPiiEntitiesDetectionJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Identifies the next page of results to return.
listPiiEntitiesDetectionJobs_nextToken :: Lens.Lens' ListPiiEntitiesDetectionJobs (Prelude.Maybe Prelude.Text)
listPiiEntitiesDetectionJobs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPiiEntitiesDetectionJobs -> f ListPiiEntitiesDetectionJobs
listPiiEntitiesDetectionJobs_nextToken = (ListPiiEntitiesDetectionJobs -> Maybe Text)
-> (ListPiiEntitiesDetectionJobs
    -> Maybe Text -> ListPiiEntitiesDetectionJobs)
-> Lens
     ListPiiEntitiesDetectionJobs
     ListPiiEntitiesDetectionJobs
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe PiiEntitiesDetectionJobFilter
 -> f (Maybe PiiEntitiesDetectionJobFilter))
-> ListPiiEntitiesDetectionJobs -> f ListPiiEntitiesDetectionJobs
listPiiEntitiesDetectionJobs_filter = (ListPiiEntitiesDetectionJobs
 -> Maybe PiiEntitiesDetectionJobFilter)
-> (ListPiiEntitiesDetectionJobs
    -> Maybe PiiEntitiesDetectionJobFilter
    -> ListPiiEntitiesDetectionJobs)
-> Lens
     ListPiiEntitiesDetectionJobs
     ListPiiEntitiesDetectionJobs
     (Maybe PiiEntitiesDetectionJobFilter)
     (Maybe PiiEntitiesDetectionJobFilter)
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 :: (Maybe Natural -> f (Maybe Natural))
-> ListPiiEntitiesDetectionJobs -> f ListPiiEntitiesDetectionJobs
listPiiEntitiesDetectionJobs_maxResults = (ListPiiEntitiesDetectionJobs -> Maybe Natural)
-> (ListPiiEntitiesDetectionJobs
    -> Maybe Natural -> ListPiiEntitiesDetectionJobs)
-> Lens
     ListPiiEntitiesDetectionJobs
     ListPiiEntitiesDetectionJobs
     (Maybe Natural)
     (Maybe Natural)
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)

instance Core.AWSRequest ListPiiEntitiesDetectionJobs where
  type
    AWSResponse ListPiiEntitiesDetectionJobs =
      ListPiiEntitiesDetectionJobsResponse
  request :: ListPiiEntitiesDetectionJobs
-> Request ListPiiEntitiesDetectionJobs
request = Service
-> ListPiiEntitiesDetectionJobs
-> Request ListPiiEntitiesDetectionJobs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListPiiEntitiesDetectionJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListPiiEntitiesDetectionJobs)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListPiiEntitiesDetectionJobs))
-> Logger
-> Service
-> Proxy ListPiiEntitiesDetectionJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListPiiEntitiesDetectionJobs)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [PiiEntitiesDetectionJobProperties]
-> Int
-> ListPiiEntitiesDetectionJobsResponse
ListPiiEntitiesDetectionJobsResponse'
            (Maybe Text
 -> Maybe [PiiEntitiesDetectionJobProperties]
 -> Int
 -> ListPiiEntitiesDetectionJobsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [PiiEntitiesDetectionJobProperties]
      -> Int -> ListPiiEntitiesDetectionJobsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String
  (Maybe [PiiEntitiesDetectionJobProperties]
   -> Int -> ListPiiEntitiesDetectionJobsResponse)
-> Either String (Maybe [PiiEntitiesDetectionJobProperties])
-> Either String (Int -> ListPiiEntitiesDetectionJobsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either
     String (Maybe (Maybe [PiiEntitiesDetectionJobProperties]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PiiEntitiesDetectionJobPropertiesList"
                            Either String (Maybe (Maybe [PiiEntitiesDetectionJobProperties]))
-> Maybe [PiiEntitiesDetectionJobProperties]
-> Either String (Maybe [PiiEntitiesDetectionJobProperties])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [PiiEntitiesDetectionJobProperties]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListPiiEntitiesDetectionJobsResponse)
-> Either String Int
-> Either String ListPiiEntitiesDetectionJobsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListPiiEntitiesDetectionJobs

instance Prelude.NFData ListPiiEntitiesDetectionJobs

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

instance Core.ToJSON ListPiiEntitiesDetectionJobs where
  toJSON :: ListPiiEntitiesDetectionJobs -> Value
toJSON ListPiiEntitiesDetectionJobs' {Maybe Natural
Maybe Text
Maybe PiiEntitiesDetectionJobFilter
maxResults :: Maybe Natural
filter' :: Maybe PiiEntitiesDetectionJobFilter
nextToken :: Maybe Text
$sel:maxResults:ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe Natural
$sel:filter':ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe PiiEntitiesDetectionJobFilter
$sel:nextToken:ListPiiEntitiesDetectionJobs' :: ListPiiEntitiesDetectionJobs -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"Filter" Text -> PiiEntitiesDetectionJobFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PiiEntitiesDetectionJobFilter -> Pair)
-> Maybe PiiEntitiesDetectionJobFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PiiEntitiesDetectionJobFilter
filter',
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

instance Core.ToQuery ListPiiEntitiesDetectionJobs where
  toQuery :: ListPiiEntitiesDetectionJobs -> QueryString
toQuery = QueryString -> ListPiiEntitiesDetectionJobs -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(ListPiiEntitiesDetectionJobsResponse
 -> ListPiiEntitiesDetectionJobsResponse -> Bool)
-> (ListPiiEntitiesDetectionJobsResponse
    -> ListPiiEntitiesDetectionJobsResponse -> Bool)
-> Eq ListPiiEntitiesDetectionJobsResponse
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]
(Int -> ReadS ListPiiEntitiesDetectionJobsResponse)
-> ReadS [ListPiiEntitiesDetectionJobsResponse]
-> ReadPrec ListPiiEntitiesDetectionJobsResponse
-> ReadPrec [ListPiiEntitiesDetectionJobsResponse]
-> Read 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
(Int -> ListPiiEntitiesDetectionJobsResponse -> ShowS)
-> (ListPiiEntitiesDetectionJobsResponse -> String)
-> ([ListPiiEntitiesDetectionJobsResponse] -> ShowS)
-> Show ListPiiEntitiesDetectionJobsResponse
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.
 ListPiiEntitiesDetectionJobsResponse
 -> Rep ListPiiEntitiesDetectionJobsResponse x)
-> (forall x.
    Rep ListPiiEntitiesDetectionJobsResponse x
    -> ListPiiEntitiesDetectionJobsResponse)
-> Generic ListPiiEntitiesDetectionJobsResponse
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' :: Maybe Text
-> Maybe [PiiEntitiesDetectionJobProperties]
-> Int
-> ListPiiEntitiesDetectionJobsResponse
ListPiiEntitiesDetectionJobsResponse'
    { $sel:nextToken:ListPiiEntitiesDetectionJobsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:piiEntitiesDetectionJobPropertiesList:ListPiiEntitiesDetectionJobsResponse' :: Maybe [PiiEntitiesDetectionJobProperties]
piiEntitiesDetectionJobPropertiesList =
        Maybe [PiiEntitiesDetectionJobProperties]
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 :: (Maybe Text -> f (Maybe Text))
-> ListPiiEntitiesDetectionJobsResponse
-> f ListPiiEntitiesDetectionJobsResponse
listPiiEntitiesDetectionJobsResponse_nextToken = (ListPiiEntitiesDetectionJobsResponse -> Maybe Text)
-> (ListPiiEntitiesDetectionJobsResponse
    -> Maybe Text -> ListPiiEntitiesDetectionJobsResponse)
-> Lens
     ListPiiEntitiesDetectionJobsResponse
     ListPiiEntitiesDetectionJobsResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe [PiiEntitiesDetectionJobProperties]
 -> f (Maybe [PiiEntitiesDetectionJobProperties]))
-> ListPiiEntitiesDetectionJobsResponse
-> f ListPiiEntitiesDetectionJobsResponse
listPiiEntitiesDetectionJobsResponse_piiEntitiesDetectionJobPropertiesList = (ListPiiEntitiesDetectionJobsResponse
 -> Maybe [PiiEntitiesDetectionJobProperties])
-> (ListPiiEntitiesDetectionJobsResponse
    -> Maybe [PiiEntitiesDetectionJobProperties]
    -> ListPiiEntitiesDetectionJobsResponse)
-> Lens
     ListPiiEntitiesDetectionJobsResponse
     ListPiiEntitiesDetectionJobsResponse
     (Maybe [PiiEntitiesDetectionJobProperties])
     (Maybe [PiiEntitiesDetectionJobProperties])
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) ((Maybe [PiiEntitiesDetectionJobProperties]
  -> f (Maybe [PiiEntitiesDetectionJobProperties]))
 -> ListPiiEntitiesDetectionJobsResponse
 -> f ListPiiEntitiesDetectionJobsResponse)
-> ((Maybe [PiiEntitiesDetectionJobProperties]
     -> f (Maybe [PiiEntitiesDetectionJobProperties]))
    -> Maybe [PiiEntitiesDetectionJobProperties]
    -> f (Maybe [PiiEntitiesDetectionJobProperties]))
-> (Maybe [PiiEntitiesDetectionJobProperties]
    -> f (Maybe [PiiEntitiesDetectionJobProperties]))
-> ListPiiEntitiesDetectionJobsResponse
-> f ListPiiEntitiesDetectionJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PiiEntitiesDetectionJobProperties]
  [PiiEntitiesDetectionJobProperties]
  [PiiEntitiesDetectionJobProperties]
  [PiiEntitiesDetectionJobProperties]
-> Iso
     (Maybe [PiiEntitiesDetectionJobProperties])
     (Maybe [PiiEntitiesDetectionJobProperties])
     (Maybe [PiiEntitiesDetectionJobProperties])
     (Maybe [PiiEntitiesDetectionJobProperties])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [PiiEntitiesDetectionJobProperties]
  [PiiEntitiesDetectionJobProperties]
  [PiiEntitiesDetectionJobProperties]
  [PiiEntitiesDetectionJobProperties]
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 :: (Int -> f Int)
-> ListPiiEntitiesDetectionJobsResponse
-> f ListPiiEntitiesDetectionJobsResponse
listPiiEntitiesDetectionJobsResponse_httpStatus = (ListPiiEntitiesDetectionJobsResponse -> Int)
-> (ListPiiEntitiesDetectionJobsResponse
    -> Int -> ListPiiEntitiesDetectionJobsResponse)
-> Lens
     ListPiiEntitiesDetectionJobsResponse
     ListPiiEntitiesDetectionJobsResponse
     Int
     Int
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