{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Provides a list of medical transcription jobs that match the specified
-- criteria. If no criteria are specified, all medical transcription jobs
-- are returned.
--
-- To get detailed information about a specific medical transcription job,
-- use the operation.
module Amazonka.Transcribe.ListMedicalTranscriptionJobs
  ( -- * Creating a Request
    ListMedicalTranscriptionJobs (..),
    newListMedicalTranscriptionJobs,

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

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Transcribe.Types

-- | /See:/ 'newListMedicalTranscriptionJobs' smart constructor.
data ListMedicalTranscriptionJobs = ListMedicalTranscriptionJobs'
  { -- | Returns only the medical transcription jobs that contain the specified
    -- string. The search is not case sensitive.
    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 that you specify,
    -- only the actual results are returned. If you don\'t specify a value, a
    -- default of 5 is used.
    ListMedicalTranscriptionJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If your @ListMedicalTranscriptionJobs@ request returns more results than
    -- can be displayed, @NextToken@ is displayed in the response with an
    -- associated string. To get the next page of results, copy this string and
    -- repeat your request, including @NextToken@ with the value of the copied
    -- string. Repeat as needed to view all your results.
    ListMedicalTranscriptionJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Returns only medical transcription jobs with the specified status. Jobs
    -- are ordered by creation date, with the newest job first. If you don\'t
    -- include @Status@, all medical transcription jobs are returned.
    ListMedicalTranscriptionJobs -> Maybe TranscriptionJobStatus
status :: Prelude.Maybe TranscriptionJobStatus
  }
  deriving (ListMedicalTranscriptionJobs
-> ListMedicalTranscriptionJobs -> Bool
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]
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
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.
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:
--
-- 'jobNameContains', 'listMedicalTranscriptionJobs_jobNameContains' - Returns only the medical transcription jobs that contain the specified
-- string. The search is not case sensitive.
--
-- '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 that you specify,
-- only the actual results are returned. If you don\'t specify a value, a
-- default of 5 is used.
--
-- 'nextToken', 'listMedicalTranscriptionJobs_nextToken' - If your @ListMedicalTranscriptionJobs@ request returns more results than
-- can be displayed, @NextToken@ is displayed in the response with an
-- associated string. To get the next page of results, copy this string and
-- repeat your request, including @NextToken@ with the value of the copied
-- string. Repeat as needed to view all your results.
--
-- 'status', 'listMedicalTranscriptionJobs_status' - Returns only medical transcription jobs with the specified status. Jobs
-- are ordered by creation date, with the newest job first. If you don\'t
-- include @Status@, all medical transcription jobs are returned.
newListMedicalTranscriptionJobs ::
  ListMedicalTranscriptionJobs
newListMedicalTranscriptionJobs :: ListMedicalTranscriptionJobs
newListMedicalTranscriptionJobs =
  ListMedicalTranscriptionJobs'
    { $sel:jobNameContains:ListMedicalTranscriptionJobs' :: Maybe Text
jobNameContains =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMedicalTranscriptionJobs' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMedicalTranscriptionJobs' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListMedicalTranscriptionJobs' :: Maybe TranscriptionJobStatus
status = forall a. Maybe a
Prelude.Nothing
    }

-- | Returns only the medical transcription jobs that contain the specified
-- string. The search is not case sensitive.
listMedicalTranscriptionJobs_jobNameContains :: Lens.Lens' ListMedicalTranscriptionJobs (Prelude.Maybe Prelude.Text)
listMedicalTranscriptionJobs_jobNameContains :: Lens' ListMedicalTranscriptionJobs (Maybe Text)
listMedicalTranscriptionJobs_jobNameContains = 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 that you specify,
-- only the actual results are returned. If you don\'t specify a value, a
-- default of 5 is used.
listMedicalTranscriptionJobs_maxResults :: Lens.Lens' ListMedicalTranscriptionJobs (Prelude.Maybe Prelude.Natural)
listMedicalTranscriptionJobs_maxResults :: Lens' ListMedicalTranscriptionJobs (Maybe Natural)
listMedicalTranscriptionJobs_maxResults = 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)

-- | If your @ListMedicalTranscriptionJobs@ request returns more results than
-- can be displayed, @NextToken@ is displayed in the response with an
-- associated string. To get the next page of results, copy this string and
-- repeat your request, including @NextToken@ with the value of the copied
-- string. Repeat as needed to view all your results.
listMedicalTranscriptionJobs_nextToken :: Lens.Lens' ListMedicalTranscriptionJobs (Prelude.Maybe Prelude.Text)
listMedicalTranscriptionJobs_nextToken :: Lens' ListMedicalTranscriptionJobs (Maybe Text)
listMedicalTranscriptionJobs_nextToken = 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)

-- | Returns only medical transcription jobs with the specified status. Jobs
-- are ordered by creation date, with the newest job first. If you don\'t
-- include @Status@, all medical transcription jobs are returned.
listMedicalTranscriptionJobs_status :: Lens.Lens' ListMedicalTranscriptionJobs (Prelude.Maybe TranscriptionJobStatus)
listMedicalTranscriptionJobs_status :: Lens' ListMedicalTranscriptionJobs (Maybe TranscriptionJobStatus)
listMedicalTranscriptionJobs_status = 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)

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

instance
  Prelude.Hashable
    ListMedicalTranscriptionJobs
  where
  hashWithSalt :: Int -> ListMedicalTranscriptionJobs -> Int
hashWithSalt Int
_salt ListMedicalTranscriptionJobs' {Maybe Natural
Maybe Text
Maybe TranscriptionJobStatus
status :: Maybe TranscriptionJobStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
jobNameContains :: Maybe Text
$sel:status:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe TranscriptionJobStatus
$sel:nextToken:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Text
$sel:maxResults:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Natural
$sel:jobNameContains:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobNameContains
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TranscriptionJobStatus
status

instance Prelude.NFData ListMedicalTranscriptionJobs where
  rnf :: ListMedicalTranscriptionJobs -> ()
rnf ListMedicalTranscriptionJobs' {Maybe Natural
Maybe Text
Maybe TranscriptionJobStatus
status :: Maybe TranscriptionJobStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
jobNameContains :: Maybe Text
$sel:status:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe TranscriptionJobStatus
$sel:nextToken:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Text
$sel:maxResults:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Natural
$sel:jobNameContains:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobNameContains
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TranscriptionJobStatus
status

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

instance Data.ToJSON ListMedicalTranscriptionJobs where
  toJSON :: ListMedicalTranscriptionJobs -> Value
toJSON ListMedicalTranscriptionJobs' {Maybe Natural
Maybe Text
Maybe TranscriptionJobStatus
status :: Maybe TranscriptionJobStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
jobNameContains :: Maybe Text
$sel:status:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe TranscriptionJobStatus
$sel:nextToken:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Text
$sel:maxResults:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Natural
$sel:jobNameContains:ListMedicalTranscriptionJobs' :: ListMedicalTranscriptionJobs -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"JobNameContains" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
jobNameContains,
            (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"Status" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TranscriptionJobStatus
status
          ]
      )

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

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

-- | /See:/ 'newListMedicalTranscriptionJobsResponse' smart constructor.
data ListMedicalTranscriptionJobsResponse = ListMedicalTranscriptionJobsResponse'
  { -- | Provides a summary of information about each result.
    ListMedicalTranscriptionJobsResponse
-> Maybe [MedicalTranscriptionJobSummary]
medicalTranscriptionJobSummaries :: Prelude.Maybe [MedicalTranscriptionJobSummary],
    -- | If @NextToken@ is present in your response, it indicates that not all
    -- results are displayed. To view the next set of results, copy the string
    -- associated with the @NextToken@ parameter in your results output, then
    -- run your request again including @NextToken@ with the value of the
    -- copied string. Repeat as needed to view all your results.
    ListMedicalTranscriptionJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Lists all medical transcription jobs that have the status specified in
    -- your request. Jobs are ordered by creation date, with the newest job
    -- first.
    ListMedicalTranscriptionJobsResponse
-> Maybe TranscriptionJobStatus
status :: Prelude.Maybe TranscriptionJobStatus,
    -- | The response's http status code.
    ListMedicalTranscriptionJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMedicalTranscriptionJobsResponse
-> ListMedicalTranscriptionJobsResponse -> Bool
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]
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
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.
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:
--
-- 'medicalTranscriptionJobSummaries', 'listMedicalTranscriptionJobsResponse_medicalTranscriptionJobSummaries' - Provides a summary of information about each result.
--
-- 'nextToken', 'listMedicalTranscriptionJobsResponse_nextToken' - If @NextToken@ is present in your response, it indicates that not all
-- results are displayed. To view the next set of results, copy the string
-- associated with the @NextToken@ parameter in your results output, then
-- run your request again including @NextToken@ with the value of the
-- copied string. Repeat as needed to view all your results.
--
-- 'status', 'listMedicalTranscriptionJobsResponse_status' - Lists all medical transcription jobs that have the status specified in
-- your request. Jobs are ordered by creation date, with the newest job
-- first.
--
-- 'httpStatus', 'listMedicalTranscriptionJobsResponse_httpStatus' - The response's http status code.
newListMedicalTranscriptionJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMedicalTranscriptionJobsResponse
newListMedicalTranscriptionJobsResponse :: Int -> ListMedicalTranscriptionJobsResponse
newListMedicalTranscriptionJobsResponse Int
pHttpStatus_ =
  ListMedicalTranscriptionJobsResponse'
    { $sel:medicalTranscriptionJobSummaries:ListMedicalTranscriptionJobsResponse' :: Maybe [MedicalTranscriptionJobSummary]
medicalTranscriptionJobSummaries =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMedicalTranscriptionJobsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListMedicalTranscriptionJobsResponse' :: Maybe TranscriptionJobStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMedicalTranscriptionJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Provides a summary of information about each result.
listMedicalTranscriptionJobsResponse_medicalTranscriptionJobSummaries :: Lens.Lens' ListMedicalTranscriptionJobsResponse (Prelude.Maybe [MedicalTranscriptionJobSummary])
listMedicalTranscriptionJobsResponse_medicalTranscriptionJobSummaries :: Lens'
  ListMedicalTranscriptionJobsResponse
  (Maybe [MedicalTranscriptionJobSummary])
listMedicalTranscriptionJobsResponse_medicalTranscriptionJobSummaries = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If @NextToken@ is present in your response, it indicates that not all
-- results are displayed. To view the next set of results, copy the string
-- associated with the @NextToken@ parameter in your results output, then
-- run your request again including @NextToken@ with the value of the
-- copied string. Repeat as needed to view all your results.
listMedicalTranscriptionJobsResponse_nextToken :: Lens.Lens' ListMedicalTranscriptionJobsResponse (Prelude.Maybe Prelude.Text)
listMedicalTranscriptionJobsResponse_nextToken :: Lens' ListMedicalTranscriptionJobsResponse (Maybe Text)
listMedicalTranscriptionJobsResponse_nextToken = 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)

-- | Lists all medical transcription jobs that have the status specified in
-- your request. Jobs are ordered by creation date, with the newest job
-- first.
listMedicalTranscriptionJobsResponse_status :: Lens.Lens' ListMedicalTranscriptionJobsResponse (Prelude.Maybe TranscriptionJobStatus)
listMedicalTranscriptionJobsResponse_status :: Lens'
  ListMedicalTranscriptionJobsResponse (Maybe TranscriptionJobStatus)
listMedicalTranscriptionJobsResponse_status = 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 response's http status code.
listMedicalTranscriptionJobsResponse_httpStatus :: Lens.Lens' ListMedicalTranscriptionJobsResponse Prelude.Int
listMedicalTranscriptionJobsResponse_httpStatus :: Lens' ListMedicalTranscriptionJobsResponse Int
listMedicalTranscriptionJobsResponse_httpStatus = 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
  where
  rnf :: ListMedicalTranscriptionJobsResponse -> ()
rnf ListMedicalTranscriptionJobsResponse' {Int
Maybe [MedicalTranscriptionJobSummary]
Maybe Text
Maybe TranscriptionJobStatus
httpStatus :: Int
status :: Maybe TranscriptionJobStatus
nextToken :: Maybe Text
medicalTranscriptionJobSummaries :: Maybe [MedicalTranscriptionJobSummary]
$sel:httpStatus:ListMedicalTranscriptionJobsResponse' :: ListMedicalTranscriptionJobsResponse -> Int
$sel:status:ListMedicalTranscriptionJobsResponse' :: ListMedicalTranscriptionJobsResponse
-> Maybe TranscriptionJobStatus
$sel:nextToken:ListMedicalTranscriptionJobsResponse' :: ListMedicalTranscriptionJobsResponse -> Maybe Text
$sel:medicalTranscriptionJobSummaries:ListMedicalTranscriptionJobsResponse' :: ListMedicalTranscriptionJobsResponse
-> Maybe [MedicalTranscriptionJobSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [MedicalTranscriptionJobSummary]
medicalTranscriptionJobSummaries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TranscriptionJobStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus