{-# 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.ListEntitiesDetectionV2Jobs
-- 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 medical entity detection jobs that you have submitted.
module Amazonka.ComprehendMedical.ListEntitiesDetectionV2Jobs
  ( -- * Creating a Request
    ListEntitiesDetectionV2Jobs (..),
    newListEntitiesDetectionV2Jobs,

    -- * Request Lenses
    listEntitiesDetectionV2Jobs_nextToken,
    listEntitiesDetectionV2Jobs_filter,
    listEntitiesDetectionV2Jobs_maxResults,

    -- * Destructuring the Response
    ListEntitiesDetectionV2JobsResponse (..),
    newListEntitiesDetectionV2JobsResponse,

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

-- |
-- Create a value of 'ListEntitiesDetectionV2Jobs' 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', 'listEntitiesDetectionV2Jobs_nextToken' - Identifies the next page of results to return.
--
-- 'filter'', 'listEntitiesDetectionV2Jobs_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', 'listEntitiesDetectionV2Jobs_maxResults' - The maximum number of results to return in each page. The default is
-- 100.
newListEntitiesDetectionV2Jobs ::
  ListEntitiesDetectionV2Jobs
newListEntitiesDetectionV2Jobs :: ListEntitiesDetectionV2Jobs
newListEntitiesDetectionV2Jobs =
  ListEntitiesDetectionV2Jobs' :: Maybe Text
-> Maybe ComprehendMedicalAsyncJobFilter
-> Maybe Natural
-> ListEntitiesDetectionV2Jobs
ListEntitiesDetectionV2Jobs'
    { $sel:nextToken:ListEntitiesDetectionV2Jobs' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:filter':ListEntitiesDetectionV2Jobs' :: Maybe ComprehendMedicalAsyncJobFilter
filter' = Maybe ComprehendMedicalAsyncJobFilter
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListEntitiesDetectionV2Jobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

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

-- | 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.
listEntitiesDetectionV2Jobs_filter :: Lens.Lens' ListEntitiesDetectionV2Jobs (Prelude.Maybe ComprehendMedicalAsyncJobFilter)
listEntitiesDetectionV2Jobs_filter :: (Maybe ComprehendMedicalAsyncJobFilter
 -> f (Maybe ComprehendMedicalAsyncJobFilter))
-> ListEntitiesDetectionV2Jobs -> f ListEntitiesDetectionV2Jobs
listEntitiesDetectionV2Jobs_filter = (ListEntitiesDetectionV2Jobs
 -> Maybe ComprehendMedicalAsyncJobFilter)
-> (ListEntitiesDetectionV2Jobs
    -> Maybe ComprehendMedicalAsyncJobFilter
    -> ListEntitiesDetectionV2Jobs)
-> Lens
     ListEntitiesDetectionV2Jobs
     ListEntitiesDetectionV2Jobs
     (Maybe ComprehendMedicalAsyncJobFilter)
     (Maybe ComprehendMedicalAsyncJobFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEntitiesDetectionV2Jobs' {Maybe ComprehendMedicalAsyncJobFilter
filter' :: Maybe ComprehendMedicalAsyncJobFilter
$sel:filter':ListEntitiesDetectionV2Jobs' :: ListEntitiesDetectionV2Jobs
-> Maybe ComprehendMedicalAsyncJobFilter
filter'} -> Maybe ComprehendMedicalAsyncJobFilter
filter') (\s :: ListEntitiesDetectionV2Jobs
s@ListEntitiesDetectionV2Jobs' {} Maybe ComprehendMedicalAsyncJobFilter
a -> ListEntitiesDetectionV2Jobs
s {$sel:filter':ListEntitiesDetectionV2Jobs' :: Maybe ComprehendMedicalAsyncJobFilter
filter' = Maybe ComprehendMedicalAsyncJobFilter
a} :: ListEntitiesDetectionV2Jobs)

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

instance Core.AWSRequest ListEntitiesDetectionV2Jobs where
  type
    AWSResponse ListEntitiesDetectionV2Jobs =
      ListEntitiesDetectionV2JobsResponse
  request :: ListEntitiesDetectionV2Jobs -> Request ListEntitiesDetectionV2Jobs
request = Service
-> ListEntitiesDetectionV2Jobs
-> Request ListEntitiesDetectionV2Jobs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListEntitiesDetectionV2Jobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListEntitiesDetectionV2Jobs)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListEntitiesDetectionV2Jobs))
-> Logger
-> Service
-> Proxy ListEntitiesDetectionV2Jobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListEntitiesDetectionV2Jobs)))
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
-> ListEntitiesDetectionV2JobsResponse
ListEntitiesDetectionV2JobsResponse'
            (Maybe Text
 -> Maybe [ComprehendMedicalAsyncJobProperties]
 -> Int
 -> ListEntitiesDetectionV2JobsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ComprehendMedicalAsyncJobProperties]
      -> Int -> ListEntitiesDetectionV2JobsResponse)
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 -> ListEntitiesDetectionV2JobsResponse)
-> Either String (Maybe [ComprehendMedicalAsyncJobProperties])
-> Either String (Int -> ListEntitiesDetectionV2JobsResponse)
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 -> ListEntitiesDetectionV2JobsResponse)
-> Either String Int
-> Either String ListEntitiesDetectionV2JobsResponse
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 ListEntitiesDetectionV2Jobs

instance Prelude.NFData ListEntitiesDetectionV2Jobs

instance Core.ToHeaders ListEntitiesDetectionV2Jobs where
  toHeaders :: ListEntitiesDetectionV2Jobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListEntitiesDetectionV2Jobs -> 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.ListEntitiesDetectionV2Jobs" ::
                          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 ListEntitiesDetectionV2Jobs where
  toJSON :: ListEntitiesDetectionV2Jobs -> Value
toJSON ListEntitiesDetectionV2Jobs' {Maybe Natural
Maybe Text
Maybe ComprehendMedicalAsyncJobFilter
maxResults :: Maybe Natural
filter' :: Maybe ComprehendMedicalAsyncJobFilter
nextToken :: Maybe Text
$sel:maxResults:ListEntitiesDetectionV2Jobs' :: ListEntitiesDetectionV2Jobs -> Maybe Natural
$sel:filter':ListEntitiesDetectionV2Jobs' :: ListEntitiesDetectionV2Jobs
-> Maybe ComprehendMedicalAsyncJobFilter
$sel:nextToken:ListEntitiesDetectionV2Jobs' :: ListEntitiesDetectionV2Jobs -> 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 ListEntitiesDetectionV2Jobs where
  toPath :: ListEntitiesDetectionV2Jobs -> ByteString
toPath = ByteString -> ListEntitiesDetectionV2Jobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

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

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

-- | A list containing the properties of each job returned.
listEntitiesDetectionV2JobsResponse_comprehendMedicalAsyncJobPropertiesList :: Lens.Lens' ListEntitiesDetectionV2JobsResponse (Prelude.Maybe [ComprehendMedicalAsyncJobProperties])
listEntitiesDetectionV2JobsResponse_comprehendMedicalAsyncJobPropertiesList :: (Maybe [ComprehendMedicalAsyncJobProperties]
 -> f (Maybe [ComprehendMedicalAsyncJobProperties]))
-> ListEntitiesDetectionV2JobsResponse
-> f ListEntitiesDetectionV2JobsResponse
listEntitiesDetectionV2JobsResponse_comprehendMedicalAsyncJobPropertiesList = (ListEntitiesDetectionV2JobsResponse
 -> Maybe [ComprehendMedicalAsyncJobProperties])
-> (ListEntitiesDetectionV2JobsResponse
    -> Maybe [ComprehendMedicalAsyncJobProperties]
    -> ListEntitiesDetectionV2JobsResponse)
-> Lens
     ListEntitiesDetectionV2JobsResponse
     ListEntitiesDetectionV2JobsResponse
     (Maybe [ComprehendMedicalAsyncJobProperties])
     (Maybe [ComprehendMedicalAsyncJobProperties])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEntitiesDetectionV2JobsResponse' {Maybe [ComprehendMedicalAsyncJobProperties]
comprehendMedicalAsyncJobPropertiesList :: Maybe [ComprehendMedicalAsyncJobProperties]
$sel:comprehendMedicalAsyncJobPropertiesList:ListEntitiesDetectionV2JobsResponse' :: ListEntitiesDetectionV2JobsResponse
-> Maybe [ComprehendMedicalAsyncJobProperties]
comprehendMedicalAsyncJobPropertiesList} -> Maybe [ComprehendMedicalAsyncJobProperties]
comprehendMedicalAsyncJobPropertiesList) (\s :: ListEntitiesDetectionV2JobsResponse
s@ListEntitiesDetectionV2JobsResponse' {} Maybe [ComprehendMedicalAsyncJobProperties]
a -> ListEntitiesDetectionV2JobsResponse
s {$sel:comprehendMedicalAsyncJobPropertiesList:ListEntitiesDetectionV2JobsResponse' :: Maybe [ComprehendMedicalAsyncJobProperties]
comprehendMedicalAsyncJobPropertiesList = Maybe [ComprehendMedicalAsyncJobProperties]
a} :: ListEntitiesDetectionV2JobsResponse) ((Maybe [ComprehendMedicalAsyncJobProperties]
  -> f (Maybe [ComprehendMedicalAsyncJobProperties]))
 -> ListEntitiesDetectionV2JobsResponse
 -> f ListEntitiesDetectionV2JobsResponse)
-> ((Maybe [ComprehendMedicalAsyncJobProperties]
     -> f (Maybe [ComprehendMedicalAsyncJobProperties]))
    -> Maybe [ComprehendMedicalAsyncJobProperties]
    -> f (Maybe [ComprehendMedicalAsyncJobProperties]))
-> (Maybe [ComprehendMedicalAsyncJobProperties]
    -> f (Maybe [ComprehendMedicalAsyncJobProperties]))
-> ListEntitiesDetectionV2JobsResponse
-> f ListEntitiesDetectionV2JobsResponse
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.
listEntitiesDetectionV2JobsResponse_httpStatus :: Lens.Lens' ListEntitiesDetectionV2JobsResponse Prelude.Int
listEntitiesDetectionV2JobsResponse_httpStatus :: (Int -> f Int)
-> ListEntitiesDetectionV2JobsResponse
-> f ListEntitiesDetectionV2JobsResponse
listEntitiesDetectionV2JobsResponse_httpStatus = (ListEntitiesDetectionV2JobsResponse -> Int)
-> (ListEntitiesDetectionV2JobsResponse
    -> Int -> ListEntitiesDetectionV2JobsResponse)
-> Lens
     ListEntitiesDetectionV2JobsResponse
     ListEntitiesDetectionV2JobsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEntitiesDetectionV2JobsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListEntitiesDetectionV2JobsResponse' :: ListEntitiesDetectionV2JobsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListEntitiesDetectionV2JobsResponse
s@ListEntitiesDetectionV2JobsResponse' {} Int
a -> ListEntitiesDetectionV2JobsResponse
s {$sel:httpStatus:ListEntitiesDetectionV2JobsResponse' :: Int
httpStatus = Int
a} :: ListEntitiesDetectionV2JobsResponse)

instance
  Prelude.NFData
    ListEntitiesDetectionV2JobsResponse