{-# 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.Transcribe.ListMedicalTranscriptionJobs
-- 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)
--
-- Lists medical transcription jobs with a specified status or substring
-- that matches their names.
module Amazonka.Transcribe.ListMedicalTranscriptionJobs
  ( -- * Creating a Request
    ListMedicalTranscriptionJobs (..),
    newListMedicalTranscriptionJobs,

    -- * Request Lenses
    listMedicalTranscriptionJobs_status,
    listMedicalTranscriptionJobs_nextToken,
    listMedicalTranscriptionJobs_jobNameContains,
    listMedicalTranscriptionJobs_maxResults,

    -- * Destructuring the Response
    ListMedicalTranscriptionJobsResponse (..),
    newListMedicalTranscriptionJobsResponse,

    -- * Response Lenses
    listMedicalTranscriptionJobsResponse_status,
    listMedicalTranscriptionJobsResponse_nextToken,
    listMedicalTranscriptionJobsResponse_medicalTranscriptionJobSummaries,
    listMedicalTranscriptionJobsResponse_httpStatus,
  )
where

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
import Amazonka.Transcribe.Types

-- | /See:/ 'newListMedicalTranscriptionJobs' smart constructor.
data ListMedicalTranscriptionJobs = ListMedicalTranscriptionJobs'
  { -- | When specified, returns only medical transcription jobs with the
    -- specified status. Jobs are ordered by creation date, with the newest
    -- jobs returned first. If you don\'t specify a status, Amazon Transcribe
    -- Medical returns all transcription jobs ordered by creation date.
    ListMedicalTranscriptionJobs -> Maybe TranscriptionJobStatus
status :: Prelude.Maybe TranscriptionJobStatus,
    -- | If you a receive a truncated result in the previous request of
    -- @ListMedicalTranscriptionJobs@, include @NextToken@ to fetch the next
    -- set of jobs.
    ListMedicalTranscriptionJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | When specified, the jobs returned in the list are limited to jobs whose
    -- name contains the specified string.
    ListMedicalTranscriptionJobs -> Maybe Text
jobNameContains :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of medical transcription jobs to return in each page
    -- of results. If there are fewer results than the value you specify, only
    -- the actual results are returned. If you do not specify a value, the
    -- default of 5 is used.
    ListMedicalTranscriptionJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListMedicalTranscriptionJobs
-> ListMedicalTranscriptionJobs -> Bool
(ListMedicalTranscriptionJobs
 -> ListMedicalTranscriptionJobs -> Bool)
-> (ListMedicalTranscriptionJobs
    -> ListMedicalTranscriptionJobs -> Bool)
-> Eq ListMedicalTranscriptionJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMedicalTranscriptionJobs
-> ListMedicalTranscriptionJobs -> Bool
$c/= :: ListMedicalTranscriptionJobs
-> ListMedicalTranscriptionJobs -> Bool
== :: ListMedicalTranscriptionJobs
-> ListMedicalTranscriptionJobs -> Bool
$c== :: ListMedicalTranscriptionJobs
-> ListMedicalTranscriptionJobs -> Bool
Prelude.Eq, ReadPrec [ListMedicalTranscriptionJobs]
ReadPrec ListMedicalTranscriptionJobs
Int -> ReadS ListMedicalTranscriptionJobs
ReadS [ListMedicalTranscriptionJobs]
(Int -> ReadS ListMedicalTranscriptionJobs)
-> ReadS [ListMedicalTranscriptionJobs]
-> ReadPrec ListMedicalTranscriptionJobs
-> ReadPrec [ListMedicalTranscriptionJobs]
-> Read ListMedicalTranscriptionJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMedicalTranscriptionJobs]
$creadListPrec :: ReadPrec [ListMedicalTranscriptionJobs]
readPrec :: ReadPrec ListMedicalTranscriptionJobs
$creadPrec :: ReadPrec ListMedicalTranscriptionJobs
readList :: ReadS [ListMedicalTranscriptionJobs]
$creadList :: ReadS [ListMedicalTranscriptionJobs]
readsPrec :: Int -> ReadS ListMedicalTranscriptionJobs
$creadsPrec :: Int -> ReadS ListMedicalTranscriptionJobs
Prelude.Read, Int -> ListMedicalTranscriptionJobs -> ShowS
[ListMedicalTranscriptionJobs] -> ShowS
ListMedicalTranscriptionJobs -> String
(Int -> ListMedicalTranscriptionJobs -> ShowS)
-> (ListMedicalTranscriptionJobs -> String)
-> ([ListMedicalTranscriptionJobs] -> ShowS)
-> Show ListMedicalTranscriptionJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMedicalTranscriptionJobs] -> ShowS
$cshowList :: [ListMedicalTranscriptionJobs] -> ShowS
show :: ListMedicalTranscriptionJobs -> String
$cshow :: ListMedicalTranscriptionJobs -> String
showsPrec :: Int -> ListMedicalTranscriptionJobs -> ShowS
$cshowsPrec :: Int -> ListMedicalTranscriptionJobs -> ShowS
Prelude.Show, (forall x.
 ListMedicalTranscriptionJobs -> Rep ListMedicalTranscriptionJobs x)
-> (forall x.
    Rep ListMedicalTranscriptionJobs x -> ListMedicalTranscriptionJobs)
-> Generic ListMedicalTranscriptionJobs
forall x.
Rep ListMedicalTranscriptionJobs x -> ListMedicalTranscriptionJobs
forall x.
ListMedicalTranscriptionJobs -> Rep ListMedicalTranscriptionJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMedicalTranscriptionJobs x -> ListMedicalTranscriptionJobs
$cfrom :: forall x.
ListMedicalTranscriptionJobs -> Rep ListMedicalTranscriptionJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListMedicalTranscriptionJobs' 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:
--
-- 'status', 'listMedicalTranscriptionJobs_status' - When specified, returns only medical transcription jobs with the
-- specified status. Jobs are ordered by creation date, with the newest
-- jobs returned first. If you don\'t specify a status, Amazon Transcribe
-- Medical returns all transcription jobs ordered by creation date.
--
-- 'nextToken', 'listMedicalTranscriptionJobs_nextToken' - If you a receive a truncated result in the previous request of
-- @ListMedicalTranscriptionJobs@, include @NextToken@ to fetch the next
-- set of jobs.
--
-- 'jobNameContains', 'listMedicalTranscriptionJobs_jobNameContains' - When specified, the jobs returned in the list are limited to jobs whose
-- name contains the specified string.
--
-- 'maxResults', 'listMedicalTranscriptionJobs_maxResults' - The maximum number of medical transcription jobs to return in each page
-- of results. If there are fewer results than the value you specify, only
-- the actual results are returned. If you do not specify a value, the
-- default of 5 is used.
newListMedicalTranscriptionJobs ::
  ListMedicalTranscriptionJobs
newListMedicalTranscriptionJobs :: ListMedicalTranscriptionJobs
newListMedicalTranscriptionJobs =
  ListMedicalTranscriptionJobs' :: Maybe TranscriptionJobStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> ListMedicalTranscriptionJobs
ListMedicalTranscriptionJobs'
    { $sel:status:ListMedicalTranscriptionJobs' :: Maybe TranscriptionJobStatus
status =
        Maybe TranscriptionJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMedicalTranscriptionJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobNameContains:ListMedicalTranscriptionJobs' :: Maybe Text
jobNameContains = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMedicalTranscriptionJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | When specified, returns only medical transcription jobs with the
-- specified status. Jobs are ordered by creation date, with the newest
-- jobs returned first. If you don\'t specify a status, Amazon Transcribe
-- Medical returns all transcription jobs ordered by creation date.
listMedicalTranscriptionJobs_status :: Lens.Lens' ListMedicalTranscriptionJobs (Prelude.Maybe TranscriptionJobStatus)
listMedicalTranscriptionJobs_status :: (Maybe TranscriptionJobStatus -> f (Maybe TranscriptionJobStatus))
-> ListMedicalTranscriptionJobs -> f ListMedicalTranscriptionJobs
listMedicalTranscriptionJobs_status = (ListMedicalTranscriptionJobs -> Maybe TranscriptionJobStatus)
-> (ListMedicalTranscriptionJobs
    -> Maybe TranscriptionJobStatus -> ListMedicalTranscriptionJobs)
-> Lens
     ListMedicalTranscriptionJobs
     ListMedicalTranscriptionJobs
     (Maybe TranscriptionJobStatus)
     (Maybe TranscriptionJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalTranscriptionJobs' {Maybe TranscriptionJobStatus
status :: Maybe TranscriptionJobStatus
$sel:status:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe TranscriptionJobStatus
status} -> Maybe TranscriptionJobStatus
status) (\s :: ListMedicalTranscriptionJobs
s@ListMedicalTranscriptionJobs' {} Maybe TranscriptionJobStatus
a -> ListMedicalTranscriptionJobs
s {$sel:status:ListMedicalTranscriptionJobs' :: Maybe TranscriptionJobStatus
status = Maybe TranscriptionJobStatus
a} :: ListMedicalTranscriptionJobs)

-- | If you a receive a truncated result in the previous request of
-- @ListMedicalTranscriptionJobs@, include @NextToken@ to fetch the next
-- set of jobs.
listMedicalTranscriptionJobs_nextToken :: Lens.Lens' ListMedicalTranscriptionJobs (Prelude.Maybe Prelude.Text)
listMedicalTranscriptionJobs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMedicalTranscriptionJobs -> f ListMedicalTranscriptionJobs
listMedicalTranscriptionJobs_nextToken = (ListMedicalTranscriptionJobs -> Maybe Text)
-> (ListMedicalTranscriptionJobs
    -> Maybe Text -> ListMedicalTranscriptionJobs)
-> Lens
     ListMedicalTranscriptionJobs
     ListMedicalTranscriptionJobs
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalTranscriptionJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMedicalTranscriptionJobs
s@ListMedicalTranscriptionJobs' {} Maybe Text
a -> ListMedicalTranscriptionJobs
s {$sel:nextToken:ListMedicalTranscriptionJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListMedicalTranscriptionJobs)

-- | When specified, the jobs returned in the list are limited to jobs whose
-- name contains the specified string.
listMedicalTranscriptionJobs_jobNameContains :: Lens.Lens' ListMedicalTranscriptionJobs (Prelude.Maybe Prelude.Text)
listMedicalTranscriptionJobs_jobNameContains :: (Maybe Text -> f (Maybe Text))
-> ListMedicalTranscriptionJobs -> f ListMedicalTranscriptionJobs
listMedicalTranscriptionJobs_jobNameContains = (ListMedicalTranscriptionJobs -> Maybe Text)
-> (ListMedicalTranscriptionJobs
    -> Maybe Text -> ListMedicalTranscriptionJobs)
-> Lens
     ListMedicalTranscriptionJobs
     ListMedicalTranscriptionJobs
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalTranscriptionJobs' {Maybe Text
jobNameContains :: Maybe Text
$sel:jobNameContains:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Text
jobNameContains} -> Maybe Text
jobNameContains) (\s :: ListMedicalTranscriptionJobs
s@ListMedicalTranscriptionJobs' {} Maybe Text
a -> ListMedicalTranscriptionJobs
s {$sel:jobNameContains:ListMedicalTranscriptionJobs' :: Maybe Text
jobNameContains = Maybe Text
a} :: ListMedicalTranscriptionJobs)

-- | The maximum number of medical transcription jobs to return in each page
-- of results. If there are fewer results than the value you specify, only
-- the actual results are returned. If you do not specify a value, the
-- default of 5 is used.
listMedicalTranscriptionJobs_maxResults :: Lens.Lens' ListMedicalTranscriptionJobs (Prelude.Maybe Prelude.Natural)
listMedicalTranscriptionJobs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListMedicalTranscriptionJobs -> f ListMedicalTranscriptionJobs
listMedicalTranscriptionJobs_maxResults = (ListMedicalTranscriptionJobs -> Maybe Natural)
-> (ListMedicalTranscriptionJobs
    -> Maybe Natural -> ListMedicalTranscriptionJobs)
-> Lens
     ListMedicalTranscriptionJobs
     ListMedicalTranscriptionJobs
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalTranscriptionJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMedicalTranscriptionJobs
s@ListMedicalTranscriptionJobs' {} Maybe Natural
a -> ListMedicalTranscriptionJobs
s {$sel:maxResults:ListMedicalTranscriptionJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMedicalTranscriptionJobs)

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

instance Prelude.NFData ListMedicalTranscriptionJobs

instance Core.ToHeaders ListMedicalTranscriptionJobs where
  toHeaders :: ListMedicalTranscriptionJobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListMedicalTranscriptionJobs -> 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
"Transcribe.ListMedicalTranscriptionJobs" ::
                          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 ListMedicalTranscriptionJobs where
  toJSON :: ListMedicalTranscriptionJobs -> Value
toJSON ListMedicalTranscriptionJobs' {Maybe Natural
Maybe Text
Maybe TranscriptionJobStatus
maxResults :: Maybe Natural
jobNameContains :: Maybe Text
nextToken :: Maybe Text
status :: Maybe TranscriptionJobStatus
$sel:maxResults:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Natural
$sel:jobNameContains:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Text
$sel:nextToken:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Text
$sel:status:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe TranscriptionJobStatus
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Status" Text -> TranscriptionJobStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TranscriptionJobStatus -> Pair)
-> Maybe TranscriptionJobStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TranscriptionJobStatus
status,
            (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
"JobNameContains" 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
jobNameContains,
            (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 ListMedicalTranscriptionJobs where
  toPath :: ListMedicalTranscriptionJobs -> ByteString
toPath = ByteString -> ListMedicalTranscriptionJobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListMedicalTranscriptionJobsResponse' smart constructor.
data ListMedicalTranscriptionJobsResponse = ListMedicalTranscriptionJobsResponse'
  { -- | The requested status of the medical transcription jobs returned.
    ListMedicalTranscriptionJobsResponse
-> Maybe TranscriptionJobStatus
status :: Prelude.Maybe TranscriptionJobStatus,
    -- | The @ListMedicalTranscriptionJobs@ operation returns a page of jobs at a
    -- time. The maximum size of the page is set by the @MaxResults@ parameter.
    -- If the number of jobs exceeds what can fit on a page, Amazon Transcribe
    -- Medical returns the @NextPage@ token. Include the token in the next
    -- request to the @ListMedicalTranscriptionJobs@ operation to return in the
    -- next page of jobs.
    ListMedicalTranscriptionJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of objects containing summary information for a transcription
    -- job.
    ListMedicalTranscriptionJobsResponse
-> Maybe [MedicalTranscriptionJobSummary]
medicalTranscriptionJobSummaries :: Prelude.Maybe [MedicalTranscriptionJobSummary],
    -- | The response's http status code.
    ListMedicalTranscriptionJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMedicalTranscriptionJobsResponse
-> ListMedicalTranscriptionJobsResponse -> Bool
(ListMedicalTranscriptionJobsResponse
 -> ListMedicalTranscriptionJobsResponse -> Bool)
-> (ListMedicalTranscriptionJobsResponse
    -> ListMedicalTranscriptionJobsResponse -> Bool)
-> Eq ListMedicalTranscriptionJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMedicalTranscriptionJobsResponse
-> ListMedicalTranscriptionJobsResponse -> Bool
$c/= :: ListMedicalTranscriptionJobsResponse
-> ListMedicalTranscriptionJobsResponse -> Bool
== :: ListMedicalTranscriptionJobsResponse
-> ListMedicalTranscriptionJobsResponse -> Bool
$c== :: ListMedicalTranscriptionJobsResponse
-> ListMedicalTranscriptionJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListMedicalTranscriptionJobsResponse]
ReadPrec ListMedicalTranscriptionJobsResponse
Int -> ReadS ListMedicalTranscriptionJobsResponse
ReadS [ListMedicalTranscriptionJobsResponse]
(Int -> ReadS ListMedicalTranscriptionJobsResponse)
-> ReadS [ListMedicalTranscriptionJobsResponse]
-> ReadPrec ListMedicalTranscriptionJobsResponse
-> ReadPrec [ListMedicalTranscriptionJobsResponse]
-> Read ListMedicalTranscriptionJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMedicalTranscriptionJobsResponse]
$creadListPrec :: ReadPrec [ListMedicalTranscriptionJobsResponse]
readPrec :: ReadPrec ListMedicalTranscriptionJobsResponse
$creadPrec :: ReadPrec ListMedicalTranscriptionJobsResponse
readList :: ReadS [ListMedicalTranscriptionJobsResponse]
$creadList :: ReadS [ListMedicalTranscriptionJobsResponse]
readsPrec :: Int -> ReadS ListMedicalTranscriptionJobsResponse
$creadsPrec :: Int -> ReadS ListMedicalTranscriptionJobsResponse
Prelude.Read, Int -> ListMedicalTranscriptionJobsResponse -> ShowS
[ListMedicalTranscriptionJobsResponse] -> ShowS
ListMedicalTranscriptionJobsResponse -> String
(Int -> ListMedicalTranscriptionJobsResponse -> ShowS)
-> (ListMedicalTranscriptionJobsResponse -> String)
-> ([ListMedicalTranscriptionJobsResponse] -> ShowS)
-> Show ListMedicalTranscriptionJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMedicalTranscriptionJobsResponse] -> ShowS
$cshowList :: [ListMedicalTranscriptionJobsResponse] -> ShowS
show :: ListMedicalTranscriptionJobsResponse -> String
$cshow :: ListMedicalTranscriptionJobsResponse -> String
showsPrec :: Int -> ListMedicalTranscriptionJobsResponse -> ShowS
$cshowsPrec :: Int -> ListMedicalTranscriptionJobsResponse -> ShowS
Prelude.Show, (forall x.
 ListMedicalTranscriptionJobsResponse
 -> Rep ListMedicalTranscriptionJobsResponse x)
-> (forall x.
    Rep ListMedicalTranscriptionJobsResponse x
    -> ListMedicalTranscriptionJobsResponse)
-> Generic ListMedicalTranscriptionJobsResponse
forall x.
Rep ListMedicalTranscriptionJobsResponse x
-> ListMedicalTranscriptionJobsResponse
forall x.
ListMedicalTranscriptionJobsResponse
-> Rep ListMedicalTranscriptionJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMedicalTranscriptionJobsResponse x
-> ListMedicalTranscriptionJobsResponse
$cfrom :: forall x.
ListMedicalTranscriptionJobsResponse
-> Rep ListMedicalTranscriptionJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMedicalTranscriptionJobsResponse' 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:
--
-- 'status', 'listMedicalTranscriptionJobsResponse_status' - The requested status of the medical transcription jobs returned.
--
-- 'nextToken', 'listMedicalTranscriptionJobsResponse_nextToken' - The @ListMedicalTranscriptionJobs@ operation returns a page of jobs at a
-- time. The maximum size of the page is set by the @MaxResults@ parameter.
-- If the number of jobs exceeds what can fit on a page, Amazon Transcribe
-- Medical returns the @NextPage@ token. Include the token in the next
-- request to the @ListMedicalTranscriptionJobs@ operation to return in the
-- next page of jobs.
--
-- 'medicalTranscriptionJobSummaries', 'listMedicalTranscriptionJobsResponse_medicalTranscriptionJobSummaries' - A list of objects containing summary information for a transcription
-- job.
--
-- 'httpStatus', 'listMedicalTranscriptionJobsResponse_httpStatus' - The response's http status code.
newListMedicalTranscriptionJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMedicalTranscriptionJobsResponse
newListMedicalTranscriptionJobsResponse :: Int -> ListMedicalTranscriptionJobsResponse
newListMedicalTranscriptionJobsResponse Int
pHttpStatus_ =
  ListMedicalTranscriptionJobsResponse' :: Maybe TranscriptionJobStatus
-> Maybe Text
-> Maybe [MedicalTranscriptionJobSummary]
-> Int
-> ListMedicalTranscriptionJobsResponse
ListMedicalTranscriptionJobsResponse'
    { $sel:status:ListMedicalTranscriptionJobsResponse' :: Maybe TranscriptionJobStatus
status =
        Maybe TranscriptionJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMedicalTranscriptionJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:medicalTranscriptionJobSummaries:ListMedicalTranscriptionJobsResponse' :: Maybe [MedicalTranscriptionJobSummary]
medicalTranscriptionJobSummaries =
        Maybe [MedicalTranscriptionJobSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMedicalTranscriptionJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The requested status of the medical transcription jobs returned.
listMedicalTranscriptionJobsResponse_status :: Lens.Lens' ListMedicalTranscriptionJobsResponse (Prelude.Maybe TranscriptionJobStatus)
listMedicalTranscriptionJobsResponse_status :: (Maybe TranscriptionJobStatus -> f (Maybe TranscriptionJobStatus))
-> ListMedicalTranscriptionJobsResponse
-> f ListMedicalTranscriptionJobsResponse
listMedicalTranscriptionJobsResponse_status = (ListMedicalTranscriptionJobsResponse
 -> Maybe TranscriptionJobStatus)
-> (ListMedicalTranscriptionJobsResponse
    -> Maybe TranscriptionJobStatus
    -> ListMedicalTranscriptionJobsResponse)
-> Lens
     ListMedicalTranscriptionJobsResponse
     ListMedicalTranscriptionJobsResponse
     (Maybe TranscriptionJobStatus)
     (Maybe TranscriptionJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalTranscriptionJobsResponse' {Maybe TranscriptionJobStatus
status :: Maybe TranscriptionJobStatus
$sel:status:ListMedicalTranscriptionJobsResponse' :: ListMedicalTranscriptionJobsResponse
-> Maybe TranscriptionJobStatus
status} -> Maybe TranscriptionJobStatus
status) (\s :: ListMedicalTranscriptionJobsResponse
s@ListMedicalTranscriptionJobsResponse' {} Maybe TranscriptionJobStatus
a -> ListMedicalTranscriptionJobsResponse
s {$sel:status:ListMedicalTranscriptionJobsResponse' :: Maybe TranscriptionJobStatus
status = Maybe TranscriptionJobStatus
a} :: ListMedicalTranscriptionJobsResponse)

-- | The @ListMedicalTranscriptionJobs@ operation returns a page of jobs at a
-- time. The maximum size of the page is set by the @MaxResults@ parameter.
-- If the number of jobs exceeds what can fit on a page, Amazon Transcribe
-- Medical returns the @NextPage@ token. Include the token in the next
-- request to the @ListMedicalTranscriptionJobs@ operation to return in the
-- next page of jobs.
listMedicalTranscriptionJobsResponse_nextToken :: Lens.Lens' ListMedicalTranscriptionJobsResponse (Prelude.Maybe Prelude.Text)
listMedicalTranscriptionJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMedicalTranscriptionJobsResponse
-> f ListMedicalTranscriptionJobsResponse
listMedicalTranscriptionJobsResponse_nextToken = (ListMedicalTranscriptionJobsResponse -> Maybe Text)
-> (ListMedicalTranscriptionJobsResponse
    -> Maybe Text -> ListMedicalTranscriptionJobsResponse)
-> Lens
     ListMedicalTranscriptionJobsResponse
     ListMedicalTranscriptionJobsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalTranscriptionJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMedicalTranscriptionJobsResponse' :: ListMedicalTranscriptionJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMedicalTranscriptionJobsResponse
s@ListMedicalTranscriptionJobsResponse' {} Maybe Text
a -> ListMedicalTranscriptionJobsResponse
s {$sel:nextToken:ListMedicalTranscriptionJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMedicalTranscriptionJobsResponse)

-- | A list of objects containing summary information for a transcription
-- job.
listMedicalTranscriptionJobsResponse_medicalTranscriptionJobSummaries :: Lens.Lens' ListMedicalTranscriptionJobsResponse (Prelude.Maybe [MedicalTranscriptionJobSummary])
listMedicalTranscriptionJobsResponse_medicalTranscriptionJobSummaries :: (Maybe [MedicalTranscriptionJobSummary]
 -> f (Maybe [MedicalTranscriptionJobSummary]))
-> ListMedicalTranscriptionJobsResponse
-> f ListMedicalTranscriptionJobsResponse
listMedicalTranscriptionJobsResponse_medicalTranscriptionJobSummaries = (ListMedicalTranscriptionJobsResponse
 -> Maybe [MedicalTranscriptionJobSummary])
-> (ListMedicalTranscriptionJobsResponse
    -> Maybe [MedicalTranscriptionJobSummary]
    -> ListMedicalTranscriptionJobsResponse)
-> Lens
     ListMedicalTranscriptionJobsResponse
     ListMedicalTranscriptionJobsResponse
     (Maybe [MedicalTranscriptionJobSummary])
     (Maybe [MedicalTranscriptionJobSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalTranscriptionJobsResponse' {Maybe [MedicalTranscriptionJobSummary]
medicalTranscriptionJobSummaries :: Maybe [MedicalTranscriptionJobSummary]
$sel:medicalTranscriptionJobSummaries:ListMedicalTranscriptionJobsResponse' :: ListMedicalTranscriptionJobsResponse
-> Maybe [MedicalTranscriptionJobSummary]
medicalTranscriptionJobSummaries} -> Maybe [MedicalTranscriptionJobSummary]
medicalTranscriptionJobSummaries) (\s :: ListMedicalTranscriptionJobsResponse
s@ListMedicalTranscriptionJobsResponse' {} Maybe [MedicalTranscriptionJobSummary]
a -> ListMedicalTranscriptionJobsResponse
s {$sel:medicalTranscriptionJobSummaries:ListMedicalTranscriptionJobsResponse' :: Maybe [MedicalTranscriptionJobSummary]
medicalTranscriptionJobSummaries = Maybe [MedicalTranscriptionJobSummary]
a} :: ListMedicalTranscriptionJobsResponse) ((Maybe [MedicalTranscriptionJobSummary]
  -> f (Maybe [MedicalTranscriptionJobSummary]))
 -> ListMedicalTranscriptionJobsResponse
 -> f ListMedicalTranscriptionJobsResponse)
-> ((Maybe [MedicalTranscriptionJobSummary]
     -> f (Maybe [MedicalTranscriptionJobSummary]))
    -> Maybe [MedicalTranscriptionJobSummary]
    -> f (Maybe [MedicalTranscriptionJobSummary]))
-> (Maybe [MedicalTranscriptionJobSummary]
    -> f (Maybe [MedicalTranscriptionJobSummary]))
-> ListMedicalTranscriptionJobsResponse
-> f ListMedicalTranscriptionJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MedicalTranscriptionJobSummary]
  [MedicalTranscriptionJobSummary]
  [MedicalTranscriptionJobSummary]
  [MedicalTranscriptionJobSummary]
-> Iso
     (Maybe [MedicalTranscriptionJobSummary])
     (Maybe [MedicalTranscriptionJobSummary])
     (Maybe [MedicalTranscriptionJobSummary])
     (Maybe [MedicalTranscriptionJobSummary])
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
  [MedicalTranscriptionJobSummary]
  [MedicalTranscriptionJobSummary]
  [MedicalTranscriptionJobSummary]
  [MedicalTranscriptionJobSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListMedicalTranscriptionJobsResponse