{-# 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.ComprehendMedical.ListPHIDetectionJobs
-- 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 protected health information (PHI) detection jobs that
-- you have submitted.
module Amazonka.ComprehendMedical.ListPHIDetectionJobs
  ( -- * Creating a Request
    ListPHIDetectionJobs (..),
    newListPHIDetectionJobs,

    -- * Request Lenses
    listPHIDetectionJobs_nextToken,
    listPHIDetectionJobs_filter,
    listPHIDetectionJobs_maxResults,

    -- * Destructuring the Response
    ListPHIDetectionJobsResponse (..),
    newListPHIDetectionJobsResponse,

    -- * Response Lenses
    listPHIDetectionJobsResponse_nextToken,
    listPHIDetectionJobsResponse_comprehendMedicalAsyncJobPropertiesList,
    listPHIDetectionJobsResponse_httpStatus,
  )
where

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

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

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

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

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

instance Core.AWSRequest ListPHIDetectionJobs where
  type
    AWSResponse ListPHIDetectionJobs =
      ListPHIDetectionJobsResponse
  request :: ListPHIDetectionJobs -> Request ListPHIDetectionJobs
request = Service -> ListPHIDetectionJobs -> Request ListPHIDetectionJobs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListPHIDetectionJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListPHIDetectionJobs)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListPHIDetectionJobs))
-> Logger
-> Service
-> Proxy ListPHIDetectionJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListPHIDetectionJobs)))
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 [ComprehendMedicalAsyncJobProperties]
-> Int
-> ListPHIDetectionJobsResponse
ListPHIDetectionJobsResponse'
            (Maybe Text
 -> Maybe [ComprehendMedicalAsyncJobProperties]
 -> Int
 -> ListPHIDetectionJobsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ComprehendMedicalAsyncJobProperties]
      -> Int -> ListPHIDetectionJobsResponse)
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 [ComprehendMedicalAsyncJobProperties]
   -> Int -> ListPHIDetectionJobsResponse)
-> Either String (Maybe [ComprehendMedicalAsyncJobProperties])
-> Either String (Int -> ListPHIDetectionJobsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either
     String (Maybe (Maybe [ComprehendMedicalAsyncJobProperties]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ComprehendMedicalAsyncJobPropertiesList"
                            Either String (Maybe (Maybe [ComprehendMedicalAsyncJobProperties]))
-> Maybe [ComprehendMedicalAsyncJobProperties]
-> Either String (Maybe [ComprehendMedicalAsyncJobProperties])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ComprehendMedicalAsyncJobProperties]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListPHIDetectionJobsResponse)
-> Either String Int -> Either String ListPHIDetectionJobsResponse
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 ListPHIDetectionJobs

instance Prelude.NFData ListPHIDetectionJobs

instance Core.ToHeaders ListPHIDetectionJobs where
  toHeaders :: ListPHIDetectionJobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListPHIDetectionJobs -> 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
"ComprehendMedical_20181030.ListPHIDetectionJobs" ::
                          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 ListPHIDetectionJobs where
  toJSON :: ListPHIDetectionJobs -> Value
toJSON ListPHIDetectionJobs' {Maybe Natural
Maybe Text
Maybe ComprehendMedicalAsyncJobFilter
maxResults :: Maybe Natural
filter' :: Maybe ComprehendMedicalAsyncJobFilter
nextToken :: Maybe Text
$sel:maxResults:ListPHIDetectionJobs' :: ListPHIDetectionJobs -> Maybe Natural
$sel:filter':ListPHIDetectionJobs' :: ListPHIDetectionJobs -> Maybe ComprehendMedicalAsyncJobFilter
$sel:nextToken:ListPHIDetectionJobs' :: ListPHIDetectionJobs -> 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 -> ComprehendMedicalAsyncJobFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ComprehendMedicalAsyncJobFilter -> Pair)
-> Maybe ComprehendMedicalAsyncJobFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ComprehendMedicalAsyncJobFilter
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 ListPHIDetectionJobs where
  toPath :: ListPHIDetectionJobs -> ByteString
toPath = ByteString -> ListPHIDetectionJobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'ListPHIDetectionJobsResponse' 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', 'listPHIDetectionJobsResponse_nextToken' - Identifies the next page of results to return.
--
-- 'comprehendMedicalAsyncJobPropertiesList', 'listPHIDetectionJobsResponse_comprehendMedicalAsyncJobPropertiesList' - A list containing the properties of each job returned.
--
-- 'httpStatus', 'listPHIDetectionJobsResponse_httpStatus' - The response's http status code.
newListPHIDetectionJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPHIDetectionJobsResponse
newListPHIDetectionJobsResponse :: Int -> ListPHIDetectionJobsResponse
newListPHIDetectionJobsResponse Int
pHttpStatus_ =
  ListPHIDetectionJobsResponse' :: Maybe Text
-> Maybe [ComprehendMedicalAsyncJobProperties]
-> Int
-> ListPHIDetectionJobsResponse
ListPHIDetectionJobsResponse'
    { $sel:nextToken:ListPHIDetectionJobsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:comprehendMedicalAsyncJobPropertiesList:ListPHIDetectionJobsResponse' :: Maybe [ComprehendMedicalAsyncJobProperties]
comprehendMedicalAsyncJobPropertiesList =
        Maybe [ComprehendMedicalAsyncJobProperties]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPHIDetectionJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | A list containing the properties of each job returned.
listPHIDetectionJobsResponse_comprehendMedicalAsyncJobPropertiesList :: Lens.Lens' ListPHIDetectionJobsResponse (Prelude.Maybe [ComprehendMedicalAsyncJobProperties])
listPHIDetectionJobsResponse_comprehendMedicalAsyncJobPropertiesList :: (Maybe [ComprehendMedicalAsyncJobProperties]
 -> f (Maybe [ComprehendMedicalAsyncJobProperties]))
-> ListPHIDetectionJobsResponse -> f ListPHIDetectionJobsResponse
listPHIDetectionJobsResponse_comprehendMedicalAsyncJobPropertiesList = (ListPHIDetectionJobsResponse
 -> Maybe [ComprehendMedicalAsyncJobProperties])
-> (ListPHIDetectionJobsResponse
    -> Maybe [ComprehendMedicalAsyncJobProperties]
    -> ListPHIDetectionJobsResponse)
-> Lens
     ListPHIDetectionJobsResponse
     ListPHIDetectionJobsResponse
     (Maybe [ComprehendMedicalAsyncJobProperties])
     (Maybe [ComprehendMedicalAsyncJobProperties])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPHIDetectionJobsResponse' {Maybe [ComprehendMedicalAsyncJobProperties]
comprehendMedicalAsyncJobPropertiesList :: Maybe [ComprehendMedicalAsyncJobProperties]
$sel:comprehendMedicalAsyncJobPropertiesList:ListPHIDetectionJobsResponse' :: ListPHIDetectionJobsResponse
-> Maybe [ComprehendMedicalAsyncJobProperties]
comprehendMedicalAsyncJobPropertiesList} -> Maybe [ComprehendMedicalAsyncJobProperties]
comprehendMedicalAsyncJobPropertiesList) (\s :: ListPHIDetectionJobsResponse
s@ListPHIDetectionJobsResponse' {} Maybe [ComprehendMedicalAsyncJobProperties]
a -> ListPHIDetectionJobsResponse
s {$sel:comprehendMedicalAsyncJobPropertiesList:ListPHIDetectionJobsResponse' :: Maybe [ComprehendMedicalAsyncJobProperties]
comprehendMedicalAsyncJobPropertiesList = Maybe [ComprehendMedicalAsyncJobProperties]
a} :: ListPHIDetectionJobsResponse) ((Maybe [ComprehendMedicalAsyncJobProperties]
  -> f (Maybe [ComprehendMedicalAsyncJobProperties]))
 -> ListPHIDetectionJobsResponse -> f ListPHIDetectionJobsResponse)
-> ((Maybe [ComprehendMedicalAsyncJobProperties]
     -> f (Maybe [ComprehendMedicalAsyncJobProperties]))
    -> Maybe [ComprehendMedicalAsyncJobProperties]
    -> f (Maybe [ComprehendMedicalAsyncJobProperties]))
-> (Maybe [ComprehendMedicalAsyncJobProperties]
    -> f (Maybe [ComprehendMedicalAsyncJobProperties]))
-> ListPHIDetectionJobsResponse
-> f ListPHIDetectionJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ComprehendMedicalAsyncJobProperties]
  [ComprehendMedicalAsyncJobProperties]
  [ComprehendMedicalAsyncJobProperties]
  [ComprehendMedicalAsyncJobProperties]
-> Iso
     (Maybe [ComprehendMedicalAsyncJobProperties])
     (Maybe [ComprehendMedicalAsyncJobProperties])
     (Maybe [ComprehendMedicalAsyncJobProperties])
     (Maybe [ComprehendMedicalAsyncJobProperties])
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
  [ComprehendMedicalAsyncJobProperties]
  [ComprehendMedicalAsyncJobProperties]
  [ComprehendMedicalAsyncJobProperties]
  [ComprehendMedicalAsyncJobProperties]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListPHIDetectionJobsResponse