{-# 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.ListCallAnalyticsJobs
-- 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)
--
-- List call analytics jobs with a specified status or substring that
-- matches their names.
module Amazonka.Transcribe.ListCallAnalyticsJobs
  ( -- * Creating a Request
    ListCallAnalyticsJobs (..),
    newListCallAnalyticsJobs,

    -- * Request Lenses
    listCallAnalyticsJobs_status,
    listCallAnalyticsJobs_nextToken,
    listCallAnalyticsJobs_jobNameContains,
    listCallAnalyticsJobs_maxResults,

    -- * Destructuring the Response
    ListCallAnalyticsJobsResponse (..),
    newListCallAnalyticsJobsResponse,

    -- * Response Lenses
    listCallAnalyticsJobsResponse_status,
    listCallAnalyticsJobsResponse_callAnalyticsJobSummaries,
    listCallAnalyticsJobsResponse_nextToken,
    listCallAnalyticsJobsResponse_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:/ 'newListCallAnalyticsJobs' smart constructor.
data ListCallAnalyticsJobs = ListCallAnalyticsJobs'
  { -- | When specified, returns only call analytics jobs with the specified
    -- status. Jobs are ordered by creation date, with the most recent jobs
    -- returned first. If you don\'t specify a status, Amazon Transcribe
    -- returns all analytics jobs ordered by creation date.
    ListCallAnalyticsJobs -> Maybe CallAnalyticsJobStatus
status :: Prelude.Maybe CallAnalyticsJobStatus,
    -- | If you receive a truncated result in the previous request of , include
    -- @NextToken@ to fetch the next set of jobs.
    ListCallAnalyticsJobs -> 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.
    ListCallAnalyticsJobs -> Maybe Text
jobNameContains :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of call analytics 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.
    ListCallAnalyticsJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListCallAnalyticsJobs -> ListCallAnalyticsJobs -> Bool
(ListCallAnalyticsJobs -> ListCallAnalyticsJobs -> Bool)
-> (ListCallAnalyticsJobs -> ListCallAnalyticsJobs -> Bool)
-> Eq ListCallAnalyticsJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCallAnalyticsJobs -> ListCallAnalyticsJobs -> Bool
$c/= :: ListCallAnalyticsJobs -> ListCallAnalyticsJobs -> Bool
== :: ListCallAnalyticsJobs -> ListCallAnalyticsJobs -> Bool
$c== :: ListCallAnalyticsJobs -> ListCallAnalyticsJobs -> Bool
Prelude.Eq, ReadPrec [ListCallAnalyticsJobs]
ReadPrec ListCallAnalyticsJobs
Int -> ReadS ListCallAnalyticsJobs
ReadS [ListCallAnalyticsJobs]
(Int -> ReadS ListCallAnalyticsJobs)
-> ReadS [ListCallAnalyticsJobs]
-> ReadPrec ListCallAnalyticsJobs
-> ReadPrec [ListCallAnalyticsJobs]
-> Read ListCallAnalyticsJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCallAnalyticsJobs]
$creadListPrec :: ReadPrec [ListCallAnalyticsJobs]
readPrec :: ReadPrec ListCallAnalyticsJobs
$creadPrec :: ReadPrec ListCallAnalyticsJobs
readList :: ReadS [ListCallAnalyticsJobs]
$creadList :: ReadS [ListCallAnalyticsJobs]
readsPrec :: Int -> ReadS ListCallAnalyticsJobs
$creadsPrec :: Int -> ReadS ListCallAnalyticsJobs
Prelude.Read, Int -> ListCallAnalyticsJobs -> ShowS
[ListCallAnalyticsJobs] -> ShowS
ListCallAnalyticsJobs -> String
(Int -> ListCallAnalyticsJobs -> ShowS)
-> (ListCallAnalyticsJobs -> String)
-> ([ListCallAnalyticsJobs] -> ShowS)
-> Show ListCallAnalyticsJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCallAnalyticsJobs] -> ShowS
$cshowList :: [ListCallAnalyticsJobs] -> ShowS
show :: ListCallAnalyticsJobs -> String
$cshow :: ListCallAnalyticsJobs -> String
showsPrec :: Int -> ListCallAnalyticsJobs -> ShowS
$cshowsPrec :: Int -> ListCallAnalyticsJobs -> ShowS
Prelude.Show, (forall x. ListCallAnalyticsJobs -> Rep ListCallAnalyticsJobs x)
-> (forall x. Rep ListCallAnalyticsJobs x -> ListCallAnalyticsJobs)
-> Generic ListCallAnalyticsJobs
forall x. Rep ListCallAnalyticsJobs x -> ListCallAnalyticsJobs
forall x. ListCallAnalyticsJobs -> Rep ListCallAnalyticsJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListCallAnalyticsJobs x -> ListCallAnalyticsJobs
$cfrom :: forall x. ListCallAnalyticsJobs -> Rep ListCallAnalyticsJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListCallAnalyticsJobs' 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', 'listCallAnalyticsJobs_status' - When specified, returns only call analytics jobs with the specified
-- status. Jobs are ordered by creation date, with the most recent jobs
-- returned first. If you don\'t specify a status, Amazon Transcribe
-- returns all analytics jobs ordered by creation date.
--
-- 'nextToken', 'listCallAnalyticsJobs_nextToken' - If you receive a truncated result in the previous request of , include
-- @NextToken@ to fetch the next set of jobs.
--
-- 'jobNameContains', 'listCallAnalyticsJobs_jobNameContains' - When specified, the jobs returned in the list are limited to jobs whose
-- name contains the specified string.
--
-- 'maxResults', 'listCallAnalyticsJobs_maxResults' - The maximum number of call analytics 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.
newListCallAnalyticsJobs ::
  ListCallAnalyticsJobs
newListCallAnalyticsJobs :: ListCallAnalyticsJobs
newListCallAnalyticsJobs =
  ListCallAnalyticsJobs' :: Maybe CallAnalyticsJobStatus
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> ListCallAnalyticsJobs
ListCallAnalyticsJobs'
    { $sel:status:ListCallAnalyticsJobs' :: Maybe CallAnalyticsJobStatus
status = Maybe CallAnalyticsJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCallAnalyticsJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobNameContains:ListCallAnalyticsJobs' :: Maybe Text
jobNameContains = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListCallAnalyticsJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | When specified, returns only call analytics jobs with the specified
-- status. Jobs are ordered by creation date, with the most recent jobs
-- returned first. If you don\'t specify a status, Amazon Transcribe
-- returns all analytics jobs ordered by creation date.
listCallAnalyticsJobs_status :: Lens.Lens' ListCallAnalyticsJobs (Prelude.Maybe CallAnalyticsJobStatus)
listCallAnalyticsJobs_status :: (Maybe CallAnalyticsJobStatus -> f (Maybe CallAnalyticsJobStatus))
-> ListCallAnalyticsJobs -> f ListCallAnalyticsJobs
listCallAnalyticsJobs_status = (ListCallAnalyticsJobs -> Maybe CallAnalyticsJobStatus)
-> (ListCallAnalyticsJobs
    -> Maybe CallAnalyticsJobStatus -> ListCallAnalyticsJobs)
-> Lens
     ListCallAnalyticsJobs
     ListCallAnalyticsJobs
     (Maybe CallAnalyticsJobStatus)
     (Maybe CallAnalyticsJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCallAnalyticsJobs' {Maybe CallAnalyticsJobStatus
status :: Maybe CallAnalyticsJobStatus
$sel:status:ListCallAnalyticsJobs' :: ListCallAnalyticsJobs -> Maybe CallAnalyticsJobStatus
status} -> Maybe CallAnalyticsJobStatus
status) (\s :: ListCallAnalyticsJobs
s@ListCallAnalyticsJobs' {} Maybe CallAnalyticsJobStatus
a -> ListCallAnalyticsJobs
s {$sel:status:ListCallAnalyticsJobs' :: Maybe CallAnalyticsJobStatus
status = Maybe CallAnalyticsJobStatus
a} :: ListCallAnalyticsJobs)

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

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

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

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

instance Prelude.NFData ListCallAnalyticsJobs

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

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

-- | /See:/ 'newListCallAnalyticsJobsResponse' smart constructor.
data ListCallAnalyticsJobsResponse = ListCallAnalyticsJobsResponse'
  { -- | When specified, returns only call analytics jobs with that status. Jobs
    -- are ordered by creation date, with the most recent jobs returned first.
    -- If you don\'t specify a status, Amazon Transcribe returns all
    -- transcription jobs ordered by creation date.
    ListCallAnalyticsJobsResponse -> Maybe CallAnalyticsJobStatus
status :: Prelude.Maybe CallAnalyticsJobStatus,
    -- | A list of objects containing summary information for a transcription
    -- job.
    ListCallAnalyticsJobsResponse -> Maybe [CallAnalyticsJobSummary]
callAnalyticsJobSummaries :: Prelude.Maybe [CallAnalyticsJobSummary],
    -- | The 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 your next request to the operation to return next
    -- page of jobs.
    ListCallAnalyticsJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListCallAnalyticsJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListCallAnalyticsJobsResponse
-> ListCallAnalyticsJobsResponse -> Bool
(ListCallAnalyticsJobsResponse
 -> ListCallAnalyticsJobsResponse -> Bool)
-> (ListCallAnalyticsJobsResponse
    -> ListCallAnalyticsJobsResponse -> Bool)
-> Eq ListCallAnalyticsJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCallAnalyticsJobsResponse
-> ListCallAnalyticsJobsResponse -> Bool
$c/= :: ListCallAnalyticsJobsResponse
-> ListCallAnalyticsJobsResponse -> Bool
== :: ListCallAnalyticsJobsResponse
-> ListCallAnalyticsJobsResponse -> Bool
$c== :: ListCallAnalyticsJobsResponse
-> ListCallAnalyticsJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListCallAnalyticsJobsResponse]
ReadPrec ListCallAnalyticsJobsResponse
Int -> ReadS ListCallAnalyticsJobsResponse
ReadS [ListCallAnalyticsJobsResponse]
(Int -> ReadS ListCallAnalyticsJobsResponse)
-> ReadS [ListCallAnalyticsJobsResponse]
-> ReadPrec ListCallAnalyticsJobsResponse
-> ReadPrec [ListCallAnalyticsJobsResponse]
-> Read ListCallAnalyticsJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCallAnalyticsJobsResponse]
$creadListPrec :: ReadPrec [ListCallAnalyticsJobsResponse]
readPrec :: ReadPrec ListCallAnalyticsJobsResponse
$creadPrec :: ReadPrec ListCallAnalyticsJobsResponse
readList :: ReadS [ListCallAnalyticsJobsResponse]
$creadList :: ReadS [ListCallAnalyticsJobsResponse]
readsPrec :: Int -> ReadS ListCallAnalyticsJobsResponse
$creadsPrec :: Int -> ReadS ListCallAnalyticsJobsResponse
Prelude.Read, Int -> ListCallAnalyticsJobsResponse -> ShowS
[ListCallAnalyticsJobsResponse] -> ShowS
ListCallAnalyticsJobsResponse -> String
(Int -> ListCallAnalyticsJobsResponse -> ShowS)
-> (ListCallAnalyticsJobsResponse -> String)
-> ([ListCallAnalyticsJobsResponse] -> ShowS)
-> Show ListCallAnalyticsJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCallAnalyticsJobsResponse] -> ShowS
$cshowList :: [ListCallAnalyticsJobsResponse] -> ShowS
show :: ListCallAnalyticsJobsResponse -> String
$cshow :: ListCallAnalyticsJobsResponse -> String
showsPrec :: Int -> ListCallAnalyticsJobsResponse -> ShowS
$cshowsPrec :: Int -> ListCallAnalyticsJobsResponse -> ShowS
Prelude.Show, (forall x.
 ListCallAnalyticsJobsResponse
 -> Rep ListCallAnalyticsJobsResponse x)
-> (forall x.
    Rep ListCallAnalyticsJobsResponse x
    -> ListCallAnalyticsJobsResponse)
-> Generic ListCallAnalyticsJobsResponse
forall x.
Rep ListCallAnalyticsJobsResponse x
-> ListCallAnalyticsJobsResponse
forall x.
ListCallAnalyticsJobsResponse
-> Rep ListCallAnalyticsJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCallAnalyticsJobsResponse x
-> ListCallAnalyticsJobsResponse
$cfrom :: forall x.
ListCallAnalyticsJobsResponse
-> Rep ListCallAnalyticsJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListCallAnalyticsJobsResponse' 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', 'listCallAnalyticsJobsResponse_status' - When specified, returns only call analytics jobs with that status. Jobs
-- are ordered by creation date, with the most recent jobs returned first.
-- If you don\'t specify a status, Amazon Transcribe returns all
-- transcription jobs ordered by creation date.
--
-- 'callAnalyticsJobSummaries', 'listCallAnalyticsJobsResponse_callAnalyticsJobSummaries' - A list of objects containing summary information for a transcription
-- job.
--
-- 'nextToken', 'listCallAnalyticsJobsResponse_nextToken' - The 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 your next request to the operation to return next
-- page of jobs.
--
-- 'httpStatus', 'listCallAnalyticsJobsResponse_httpStatus' - The response's http status code.
newListCallAnalyticsJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCallAnalyticsJobsResponse
newListCallAnalyticsJobsResponse :: Int -> ListCallAnalyticsJobsResponse
newListCallAnalyticsJobsResponse Int
pHttpStatus_ =
  ListCallAnalyticsJobsResponse' :: Maybe CallAnalyticsJobStatus
-> Maybe [CallAnalyticsJobSummary]
-> Maybe Text
-> Int
-> ListCallAnalyticsJobsResponse
ListCallAnalyticsJobsResponse'
    { $sel:status:ListCallAnalyticsJobsResponse' :: Maybe CallAnalyticsJobStatus
status =
        Maybe CallAnalyticsJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:callAnalyticsJobSummaries:ListCallAnalyticsJobsResponse' :: Maybe [CallAnalyticsJobSummary]
callAnalyticsJobSummaries = Maybe [CallAnalyticsJobSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCallAnalyticsJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListCallAnalyticsJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | When specified, returns only call analytics jobs with that status. Jobs
-- are ordered by creation date, with the most recent jobs returned first.
-- If you don\'t specify a status, Amazon Transcribe returns all
-- transcription jobs ordered by creation date.
listCallAnalyticsJobsResponse_status :: Lens.Lens' ListCallAnalyticsJobsResponse (Prelude.Maybe CallAnalyticsJobStatus)
listCallAnalyticsJobsResponse_status :: (Maybe CallAnalyticsJobStatus -> f (Maybe CallAnalyticsJobStatus))
-> ListCallAnalyticsJobsResponse -> f ListCallAnalyticsJobsResponse
listCallAnalyticsJobsResponse_status = (ListCallAnalyticsJobsResponse -> Maybe CallAnalyticsJobStatus)
-> (ListCallAnalyticsJobsResponse
    -> Maybe CallAnalyticsJobStatus -> ListCallAnalyticsJobsResponse)
-> Lens
     ListCallAnalyticsJobsResponse
     ListCallAnalyticsJobsResponse
     (Maybe CallAnalyticsJobStatus)
     (Maybe CallAnalyticsJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCallAnalyticsJobsResponse' {Maybe CallAnalyticsJobStatus
status :: Maybe CallAnalyticsJobStatus
$sel:status:ListCallAnalyticsJobsResponse' :: ListCallAnalyticsJobsResponse -> Maybe CallAnalyticsJobStatus
status} -> Maybe CallAnalyticsJobStatus
status) (\s :: ListCallAnalyticsJobsResponse
s@ListCallAnalyticsJobsResponse' {} Maybe CallAnalyticsJobStatus
a -> ListCallAnalyticsJobsResponse
s {$sel:status:ListCallAnalyticsJobsResponse' :: Maybe CallAnalyticsJobStatus
status = Maybe CallAnalyticsJobStatus
a} :: ListCallAnalyticsJobsResponse)

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

-- | The 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 your next request to the operation to return next
-- page of jobs.
listCallAnalyticsJobsResponse_nextToken :: Lens.Lens' ListCallAnalyticsJobsResponse (Prelude.Maybe Prelude.Text)
listCallAnalyticsJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListCallAnalyticsJobsResponse -> f ListCallAnalyticsJobsResponse
listCallAnalyticsJobsResponse_nextToken = (ListCallAnalyticsJobsResponse -> Maybe Text)
-> (ListCallAnalyticsJobsResponse
    -> Maybe Text -> ListCallAnalyticsJobsResponse)
-> Lens
     ListCallAnalyticsJobsResponse
     ListCallAnalyticsJobsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCallAnalyticsJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCallAnalyticsJobsResponse' :: ListCallAnalyticsJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCallAnalyticsJobsResponse
s@ListCallAnalyticsJobsResponse' {} Maybe Text
a -> ListCallAnalyticsJobsResponse
s {$sel:nextToken:ListCallAnalyticsJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCallAnalyticsJobsResponse)

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

instance Prelude.NFData ListCallAnalyticsJobsResponse