{-# 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.ListTranscriptionJobs
-- 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 transcription jobs with the specified status.
module Amazonka.Transcribe.ListTranscriptionJobs
  ( -- * Creating a Request
    ListTranscriptionJobs (..),
    newListTranscriptionJobs,

    -- * Request Lenses
    listTranscriptionJobs_status,
    listTranscriptionJobs_nextToken,
    listTranscriptionJobs_jobNameContains,
    listTranscriptionJobs_maxResults,

    -- * Destructuring the Response
    ListTranscriptionJobsResponse (..),
    newListTranscriptionJobsResponse,

    -- * Response Lenses
    listTranscriptionJobsResponse_status,
    listTranscriptionJobsResponse_nextToken,
    listTranscriptionJobsResponse_transcriptionJobSummaries,
    listTranscriptionJobsResponse_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:/ 'newListTranscriptionJobs' smart constructor.
data ListTranscriptionJobs = ListTranscriptionJobs'
  { -- | When specified, returns only 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 returns all
    -- transcription jobs ordered by creation date.
    ListTranscriptionJobs -> Maybe TranscriptionJobStatus
status :: Prelude.Maybe TranscriptionJobStatus,
    -- | If the result of the previous request to @ListTranscriptionJobs@ is
    -- truncated, include the @NextToken@ to fetch the next set of jobs.
    ListTranscriptionJobs -> 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.
    ListTranscriptionJobs -> Maybe Text
jobNameContains :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of 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.
    ListTranscriptionJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListTranscriptionJobs -> ListTranscriptionJobs -> Bool
(ListTranscriptionJobs -> ListTranscriptionJobs -> Bool)
-> (ListTranscriptionJobs -> ListTranscriptionJobs -> Bool)
-> Eq ListTranscriptionJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTranscriptionJobs -> ListTranscriptionJobs -> Bool
$c/= :: ListTranscriptionJobs -> ListTranscriptionJobs -> Bool
== :: ListTranscriptionJobs -> ListTranscriptionJobs -> Bool
$c== :: ListTranscriptionJobs -> ListTranscriptionJobs -> Bool
Prelude.Eq, ReadPrec [ListTranscriptionJobs]
ReadPrec ListTranscriptionJobs
Int -> ReadS ListTranscriptionJobs
ReadS [ListTranscriptionJobs]
(Int -> ReadS ListTranscriptionJobs)
-> ReadS [ListTranscriptionJobs]
-> ReadPrec ListTranscriptionJobs
-> ReadPrec [ListTranscriptionJobs]
-> Read ListTranscriptionJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTranscriptionJobs]
$creadListPrec :: ReadPrec [ListTranscriptionJobs]
readPrec :: ReadPrec ListTranscriptionJobs
$creadPrec :: ReadPrec ListTranscriptionJobs
readList :: ReadS [ListTranscriptionJobs]
$creadList :: ReadS [ListTranscriptionJobs]
readsPrec :: Int -> ReadS ListTranscriptionJobs
$creadsPrec :: Int -> ReadS ListTranscriptionJobs
Prelude.Read, Int -> ListTranscriptionJobs -> ShowS
[ListTranscriptionJobs] -> ShowS
ListTranscriptionJobs -> String
(Int -> ListTranscriptionJobs -> ShowS)
-> (ListTranscriptionJobs -> String)
-> ([ListTranscriptionJobs] -> ShowS)
-> Show ListTranscriptionJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTranscriptionJobs] -> ShowS
$cshowList :: [ListTranscriptionJobs] -> ShowS
show :: ListTranscriptionJobs -> String
$cshow :: ListTranscriptionJobs -> String
showsPrec :: Int -> ListTranscriptionJobs -> ShowS
$cshowsPrec :: Int -> ListTranscriptionJobs -> ShowS
Prelude.Show, (forall x. ListTranscriptionJobs -> Rep ListTranscriptionJobs x)
-> (forall x. Rep ListTranscriptionJobs x -> ListTranscriptionJobs)
-> Generic ListTranscriptionJobs
forall x. Rep ListTranscriptionJobs x -> ListTranscriptionJobs
forall x. ListTranscriptionJobs -> Rep ListTranscriptionJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTranscriptionJobs x -> ListTranscriptionJobs
$cfrom :: forall x. ListTranscriptionJobs -> Rep ListTranscriptionJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListTranscriptionJobs' 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', 'listTranscriptionJobs_status' - When specified, returns only 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 returns all
-- transcription jobs ordered by creation date.
--
-- 'nextToken', 'listTranscriptionJobs_nextToken' - If the result of the previous request to @ListTranscriptionJobs@ is
-- truncated, include the @NextToken@ to fetch the next set of jobs.
--
-- 'jobNameContains', 'listTranscriptionJobs_jobNameContains' - When specified, the jobs returned in the list are limited to jobs whose
-- name contains the specified string.
--
-- 'maxResults', 'listTranscriptionJobs_maxResults' - The maximum number of 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.
newListTranscriptionJobs ::
  ListTranscriptionJobs
newListTranscriptionJobs :: ListTranscriptionJobs
newListTranscriptionJobs =
  ListTranscriptionJobs' :: Maybe TranscriptionJobStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> ListTranscriptionJobs
ListTranscriptionJobs'
    { $sel:status:ListTranscriptionJobs' :: Maybe TranscriptionJobStatus
status = Maybe TranscriptionJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTranscriptionJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobNameContains:ListTranscriptionJobs' :: Maybe Text
jobNameContains = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListTranscriptionJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | When specified, returns only 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 returns all
-- transcription jobs ordered by creation date.
listTranscriptionJobs_status :: Lens.Lens' ListTranscriptionJobs (Prelude.Maybe TranscriptionJobStatus)
listTranscriptionJobs_status :: (Maybe TranscriptionJobStatus -> f (Maybe TranscriptionJobStatus))
-> ListTranscriptionJobs -> f ListTranscriptionJobs
listTranscriptionJobs_status = (ListTranscriptionJobs -> Maybe TranscriptionJobStatus)
-> (ListTranscriptionJobs
    -> Maybe TranscriptionJobStatus -> ListTranscriptionJobs)
-> Lens
     ListTranscriptionJobs
     ListTranscriptionJobs
     (Maybe TranscriptionJobStatus)
     (Maybe TranscriptionJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTranscriptionJobs' {Maybe TranscriptionJobStatus
status :: Maybe TranscriptionJobStatus
$sel:status:ListTranscriptionJobs' :: ListTranscriptionJobs -> Maybe TranscriptionJobStatus
status} -> Maybe TranscriptionJobStatus
status) (\s :: ListTranscriptionJobs
s@ListTranscriptionJobs' {} Maybe TranscriptionJobStatus
a -> ListTranscriptionJobs
s {$sel:status:ListTranscriptionJobs' :: Maybe TranscriptionJobStatus
status = Maybe TranscriptionJobStatus
a} :: ListTranscriptionJobs)

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

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

-- | The maximum number of 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.
listTranscriptionJobs_maxResults :: Lens.Lens' ListTranscriptionJobs (Prelude.Maybe Prelude.Natural)
listTranscriptionJobs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListTranscriptionJobs -> f ListTranscriptionJobs
listTranscriptionJobs_maxResults = (ListTranscriptionJobs -> Maybe Natural)
-> (ListTranscriptionJobs
    -> Maybe Natural -> ListTranscriptionJobs)
-> Lens
     ListTranscriptionJobs
     ListTranscriptionJobs
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTranscriptionJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTranscriptionJobs' :: ListTranscriptionJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTranscriptionJobs
s@ListTranscriptionJobs' {} Maybe Natural
a -> ListTranscriptionJobs
s {$sel:maxResults:ListTranscriptionJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTranscriptionJobs)

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

instance Prelude.NFData ListTranscriptionJobs

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

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

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

-- |
-- Create a value of 'ListTranscriptionJobsResponse' 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', 'listTranscriptionJobsResponse_status' - The requested status of the jobs returned.
--
-- 'nextToken', 'listTranscriptionJobsResponse_nextToken' - The @ListTranscriptionJobs@ operation returns a page of jobs at a time.
-- The maximum size of the page is set by the @MaxResults@ parameter. If
-- there are more jobs in the list than the page size, Amazon Transcribe
-- returns the @NextPage@ token. Include the token in the next request to
-- the @ListTranscriptionJobs@ operation to return in the next page of
-- jobs.
--
-- 'transcriptionJobSummaries', 'listTranscriptionJobsResponse_transcriptionJobSummaries' - A list of objects containing summary information for a transcription
-- job.
--
-- 'httpStatus', 'listTranscriptionJobsResponse_httpStatus' - The response's http status code.
newListTranscriptionJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTranscriptionJobsResponse
newListTranscriptionJobsResponse :: Int -> ListTranscriptionJobsResponse
newListTranscriptionJobsResponse Int
pHttpStatus_ =
  ListTranscriptionJobsResponse' :: Maybe TranscriptionJobStatus
-> Maybe Text
-> Maybe [TranscriptionJobSummary]
-> Int
-> ListTranscriptionJobsResponse
ListTranscriptionJobsResponse'
    { $sel:status:ListTranscriptionJobsResponse' :: Maybe TranscriptionJobStatus
status =
        Maybe TranscriptionJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTranscriptionJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:transcriptionJobSummaries:ListTranscriptionJobsResponse' :: Maybe [TranscriptionJobSummary]
transcriptionJobSummaries = Maybe [TranscriptionJobSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListTranscriptionJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The @ListTranscriptionJobs@ operation returns a page of jobs at a time.
-- The maximum size of the page is set by the @MaxResults@ parameter. If
-- there are more jobs in the list than the page size, Amazon Transcribe
-- returns the @NextPage@ token. Include the token in the next request to
-- the @ListTranscriptionJobs@ operation to return in the next page of
-- jobs.
listTranscriptionJobsResponse_nextToken :: Lens.Lens' ListTranscriptionJobsResponse (Prelude.Maybe Prelude.Text)
listTranscriptionJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTranscriptionJobsResponse -> f ListTranscriptionJobsResponse
listTranscriptionJobsResponse_nextToken = (ListTranscriptionJobsResponse -> Maybe Text)
-> (ListTranscriptionJobsResponse
    -> Maybe Text -> ListTranscriptionJobsResponse)
-> Lens
     ListTranscriptionJobsResponse
     ListTranscriptionJobsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTranscriptionJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTranscriptionJobsResponse' :: ListTranscriptionJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTranscriptionJobsResponse
s@ListTranscriptionJobsResponse' {} Maybe Text
a -> ListTranscriptionJobsResponse
s {$sel:nextToken:ListTranscriptionJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTranscriptionJobsResponse)

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

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

instance Prelude.NFData ListTranscriptionJobsResponse