{-# 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.VoiceId.ListSpeakerEnrollmentJobs
-- 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 all the speaker enrollment jobs in the domain with the specified
-- @JobStatus@. If @JobStatus@ is not provided, this lists all jobs with
-- all possible speaker enrollment job statuses.
module Amazonka.VoiceId.ListSpeakerEnrollmentJobs
  ( -- * Creating a Request
    ListSpeakerEnrollmentJobs (..),
    newListSpeakerEnrollmentJobs,

    -- * Request Lenses
    listSpeakerEnrollmentJobs_nextToken,
    listSpeakerEnrollmentJobs_jobStatus,
    listSpeakerEnrollmentJobs_maxResults,
    listSpeakerEnrollmentJobs_domainId,

    -- * Destructuring the Response
    ListSpeakerEnrollmentJobsResponse (..),
    newListSpeakerEnrollmentJobsResponse,

    -- * Response Lenses
    listSpeakerEnrollmentJobsResponse_nextToken,
    listSpeakerEnrollmentJobsResponse_jobSummaries,
    listSpeakerEnrollmentJobsResponse_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.VoiceId.Types

-- | /See:/ 'newListSpeakerEnrollmentJobs' smart constructor.
data ListSpeakerEnrollmentJobs = ListSpeakerEnrollmentJobs'
  { -- | If @NextToken@ is returned, there are more results available. The value
    -- of @NextToken@ is a unique pagination token for each page. Make the call
    -- again using the returned token to retrieve the next page. Keep all other
    -- arguments unchanged. Each pagination token expires after 24 hours.
    ListSpeakerEnrollmentJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Provides the status of your speaker enrollment Job.
    ListSpeakerEnrollmentJobs -> Maybe SpeakerEnrollmentJobStatus
jobStatus :: Prelude.Maybe SpeakerEnrollmentJobStatus,
    -- | The maximum number of results that are returned per call. You can use
    -- @NextToken@ to obtain further pages of results. The default is 100; the
    -- maximum allowed page size is also 100.
    ListSpeakerEnrollmentJobs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the domain containing the speaker enrollment jobs.
    ListSpeakerEnrollmentJobs -> Text
domainId :: Prelude.Text
  }
  deriving (ListSpeakerEnrollmentJobs -> ListSpeakerEnrollmentJobs -> Bool
(ListSpeakerEnrollmentJobs -> ListSpeakerEnrollmentJobs -> Bool)
-> (ListSpeakerEnrollmentJobs -> ListSpeakerEnrollmentJobs -> Bool)
-> Eq ListSpeakerEnrollmentJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSpeakerEnrollmentJobs -> ListSpeakerEnrollmentJobs -> Bool
$c/= :: ListSpeakerEnrollmentJobs -> ListSpeakerEnrollmentJobs -> Bool
== :: ListSpeakerEnrollmentJobs -> ListSpeakerEnrollmentJobs -> Bool
$c== :: ListSpeakerEnrollmentJobs -> ListSpeakerEnrollmentJobs -> Bool
Prelude.Eq, ReadPrec [ListSpeakerEnrollmentJobs]
ReadPrec ListSpeakerEnrollmentJobs
Int -> ReadS ListSpeakerEnrollmentJobs
ReadS [ListSpeakerEnrollmentJobs]
(Int -> ReadS ListSpeakerEnrollmentJobs)
-> ReadS [ListSpeakerEnrollmentJobs]
-> ReadPrec ListSpeakerEnrollmentJobs
-> ReadPrec [ListSpeakerEnrollmentJobs]
-> Read ListSpeakerEnrollmentJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSpeakerEnrollmentJobs]
$creadListPrec :: ReadPrec [ListSpeakerEnrollmentJobs]
readPrec :: ReadPrec ListSpeakerEnrollmentJobs
$creadPrec :: ReadPrec ListSpeakerEnrollmentJobs
readList :: ReadS [ListSpeakerEnrollmentJobs]
$creadList :: ReadS [ListSpeakerEnrollmentJobs]
readsPrec :: Int -> ReadS ListSpeakerEnrollmentJobs
$creadsPrec :: Int -> ReadS ListSpeakerEnrollmentJobs
Prelude.Read, Int -> ListSpeakerEnrollmentJobs -> ShowS
[ListSpeakerEnrollmentJobs] -> ShowS
ListSpeakerEnrollmentJobs -> String
(Int -> ListSpeakerEnrollmentJobs -> ShowS)
-> (ListSpeakerEnrollmentJobs -> String)
-> ([ListSpeakerEnrollmentJobs] -> ShowS)
-> Show ListSpeakerEnrollmentJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSpeakerEnrollmentJobs] -> ShowS
$cshowList :: [ListSpeakerEnrollmentJobs] -> ShowS
show :: ListSpeakerEnrollmentJobs -> String
$cshow :: ListSpeakerEnrollmentJobs -> String
showsPrec :: Int -> ListSpeakerEnrollmentJobs -> ShowS
$cshowsPrec :: Int -> ListSpeakerEnrollmentJobs -> ShowS
Prelude.Show, (forall x.
 ListSpeakerEnrollmentJobs -> Rep ListSpeakerEnrollmentJobs x)
-> (forall x.
    Rep ListSpeakerEnrollmentJobs x -> ListSpeakerEnrollmentJobs)
-> Generic ListSpeakerEnrollmentJobs
forall x.
Rep ListSpeakerEnrollmentJobs x -> ListSpeakerEnrollmentJobs
forall x.
ListSpeakerEnrollmentJobs -> Rep ListSpeakerEnrollmentJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSpeakerEnrollmentJobs x -> ListSpeakerEnrollmentJobs
$cfrom :: forall x.
ListSpeakerEnrollmentJobs -> Rep ListSpeakerEnrollmentJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListSpeakerEnrollmentJobs' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listSpeakerEnrollmentJobs_nextToken' - If @NextToken@ is returned, there are more results available. The value
-- of @NextToken@ is a unique pagination token for each page. Make the call
-- again using the returned token to retrieve the next page. Keep all other
-- arguments unchanged. Each pagination token expires after 24 hours.
--
-- 'jobStatus', 'listSpeakerEnrollmentJobs_jobStatus' - Provides the status of your speaker enrollment Job.
--
-- 'maxResults', 'listSpeakerEnrollmentJobs_maxResults' - The maximum number of results that are returned per call. You can use
-- @NextToken@ to obtain further pages of results. The default is 100; the
-- maximum allowed page size is also 100.
--
-- 'domainId', 'listSpeakerEnrollmentJobs_domainId' - The identifier of the domain containing the speaker enrollment jobs.
newListSpeakerEnrollmentJobs ::
  -- | 'domainId'
  Prelude.Text ->
  ListSpeakerEnrollmentJobs
newListSpeakerEnrollmentJobs :: Text -> ListSpeakerEnrollmentJobs
newListSpeakerEnrollmentJobs Text
pDomainId_ =
  ListSpeakerEnrollmentJobs' :: Maybe Text
-> Maybe SpeakerEnrollmentJobStatus
-> Maybe Natural
-> Text
-> ListSpeakerEnrollmentJobs
ListSpeakerEnrollmentJobs'
    { $sel:nextToken:ListSpeakerEnrollmentJobs' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:ListSpeakerEnrollmentJobs' :: Maybe SpeakerEnrollmentJobStatus
jobStatus = Maybe SpeakerEnrollmentJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListSpeakerEnrollmentJobs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:domainId:ListSpeakerEnrollmentJobs' :: Text
domainId = Text
pDomainId_
    }

-- | If @NextToken@ is returned, there are more results available. The value
-- of @NextToken@ is a unique pagination token for each page. Make the call
-- again using the returned token to retrieve the next page. Keep all other
-- arguments unchanged. Each pagination token expires after 24 hours.
listSpeakerEnrollmentJobs_nextToken :: Lens.Lens' ListSpeakerEnrollmentJobs (Prelude.Maybe Prelude.Text)
listSpeakerEnrollmentJobs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSpeakerEnrollmentJobs -> f ListSpeakerEnrollmentJobs
listSpeakerEnrollmentJobs_nextToken = (ListSpeakerEnrollmentJobs -> Maybe Text)
-> (ListSpeakerEnrollmentJobs
    -> Maybe Text -> ListSpeakerEnrollmentJobs)
-> Lens
     ListSpeakerEnrollmentJobs
     ListSpeakerEnrollmentJobs
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSpeakerEnrollmentJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSpeakerEnrollmentJobs' :: ListSpeakerEnrollmentJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSpeakerEnrollmentJobs
s@ListSpeakerEnrollmentJobs' {} Maybe Text
a -> ListSpeakerEnrollmentJobs
s {$sel:nextToken:ListSpeakerEnrollmentJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListSpeakerEnrollmentJobs)

-- | Provides the status of your speaker enrollment Job.
listSpeakerEnrollmentJobs_jobStatus :: Lens.Lens' ListSpeakerEnrollmentJobs (Prelude.Maybe SpeakerEnrollmentJobStatus)
listSpeakerEnrollmentJobs_jobStatus :: (Maybe SpeakerEnrollmentJobStatus
 -> f (Maybe SpeakerEnrollmentJobStatus))
-> ListSpeakerEnrollmentJobs -> f ListSpeakerEnrollmentJobs
listSpeakerEnrollmentJobs_jobStatus = (ListSpeakerEnrollmentJobs -> Maybe SpeakerEnrollmentJobStatus)
-> (ListSpeakerEnrollmentJobs
    -> Maybe SpeakerEnrollmentJobStatus -> ListSpeakerEnrollmentJobs)
-> Lens
     ListSpeakerEnrollmentJobs
     ListSpeakerEnrollmentJobs
     (Maybe SpeakerEnrollmentJobStatus)
     (Maybe SpeakerEnrollmentJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSpeakerEnrollmentJobs' {Maybe SpeakerEnrollmentJobStatus
jobStatus :: Maybe SpeakerEnrollmentJobStatus
$sel:jobStatus:ListSpeakerEnrollmentJobs' :: ListSpeakerEnrollmentJobs -> Maybe SpeakerEnrollmentJobStatus
jobStatus} -> Maybe SpeakerEnrollmentJobStatus
jobStatus) (\s :: ListSpeakerEnrollmentJobs
s@ListSpeakerEnrollmentJobs' {} Maybe SpeakerEnrollmentJobStatus
a -> ListSpeakerEnrollmentJobs
s {$sel:jobStatus:ListSpeakerEnrollmentJobs' :: Maybe SpeakerEnrollmentJobStatus
jobStatus = Maybe SpeakerEnrollmentJobStatus
a} :: ListSpeakerEnrollmentJobs)

-- | The maximum number of results that are returned per call. You can use
-- @NextToken@ to obtain further pages of results. The default is 100; the
-- maximum allowed page size is also 100.
listSpeakerEnrollmentJobs_maxResults :: Lens.Lens' ListSpeakerEnrollmentJobs (Prelude.Maybe Prelude.Natural)
listSpeakerEnrollmentJobs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListSpeakerEnrollmentJobs -> f ListSpeakerEnrollmentJobs
listSpeakerEnrollmentJobs_maxResults = (ListSpeakerEnrollmentJobs -> Maybe Natural)
-> (ListSpeakerEnrollmentJobs
    -> Maybe Natural -> ListSpeakerEnrollmentJobs)
-> Lens
     ListSpeakerEnrollmentJobs
     ListSpeakerEnrollmentJobs
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSpeakerEnrollmentJobs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListSpeakerEnrollmentJobs' :: ListSpeakerEnrollmentJobs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListSpeakerEnrollmentJobs
s@ListSpeakerEnrollmentJobs' {} Maybe Natural
a -> ListSpeakerEnrollmentJobs
s {$sel:maxResults:ListSpeakerEnrollmentJobs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListSpeakerEnrollmentJobs)

-- | The identifier of the domain containing the speaker enrollment jobs.
listSpeakerEnrollmentJobs_domainId :: Lens.Lens' ListSpeakerEnrollmentJobs Prelude.Text
listSpeakerEnrollmentJobs_domainId :: (Text -> f Text)
-> ListSpeakerEnrollmentJobs -> f ListSpeakerEnrollmentJobs
listSpeakerEnrollmentJobs_domainId = (ListSpeakerEnrollmentJobs -> Text)
-> (ListSpeakerEnrollmentJobs -> Text -> ListSpeakerEnrollmentJobs)
-> Lens
     ListSpeakerEnrollmentJobs ListSpeakerEnrollmentJobs Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSpeakerEnrollmentJobs' {Text
domainId :: Text
$sel:domainId:ListSpeakerEnrollmentJobs' :: ListSpeakerEnrollmentJobs -> Text
domainId} -> Text
domainId) (\s :: ListSpeakerEnrollmentJobs
s@ListSpeakerEnrollmentJobs' {} Text
a -> ListSpeakerEnrollmentJobs
s {$sel:domainId:ListSpeakerEnrollmentJobs' :: Text
domainId = Text
a} :: ListSpeakerEnrollmentJobs)

instance Core.AWSRequest ListSpeakerEnrollmentJobs where
  type
    AWSResponse ListSpeakerEnrollmentJobs =
      ListSpeakerEnrollmentJobsResponse
  request :: ListSpeakerEnrollmentJobs -> Request ListSpeakerEnrollmentJobs
request = Service
-> ListSpeakerEnrollmentJobs -> Request ListSpeakerEnrollmentJobs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListSpeakerEnrollmentJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSpeakerEnrollmentJobs)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListSpeakerEnrollmentJobs))
-> Logger
-> Service
-> Proxy ListSpeakerEnrollmentJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSpeakerEnrollmentJobs)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [SpeakerEnrollmentJobSummary]
-> Int
-> ListSpeakerEnrollmentJobsResponse
ListSpeakerEnrollmentJobsResponse'
            (Maybe Text
 -> Maybe [SpeakerEnrollmentJobSummary]
 -> Int
 -> ListSpeakerEnrollmentJobsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [SpeakerEnrollmentJobSummary]
      -> Int -> ListSpeakerEnrollmentJobsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String
  (Maybe [SpeakerEnrollmentJobSummary]
   -> Int -> ListSpeakerEnrollmentJobsResponse)
-> Either String (Maybe [SpeakerEnrollmentJobSummary])
-> Either String (Int -> ListSpeakerEnrollmentJobsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [SpeakerEnrollmentJobSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"JobSummaries" Either String (Maybe (Maybe [SpeakerEnrollmentJobSummary]))
-> Maybe [SpeakerEnrollmentJobSummary]
-> Either String (Maybe [SpeakerEnrollmentJobSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SpeakerEnrollmentJobSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListSpeakerEnrollmentJobsResponse)
-> Either String Int
-> Either String ListSpeakerEnrollmentJobsResponse
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 ListSpeakerEnrollmentJobs

instance Prelude.NFData ListSpeakerEnrollmentJobs

instance Core.ToHeaders ListSpeakerEnrollmentJobs where
  toHeaders :: ListSpeakerEnrollmentJobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListSpeakerEnrollmentJobs -> 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
"VoiceID.ListSpeakerEnrollmentJobs" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON ListSpeakerEnrollmentJobs where
  toJSON :: ListSpeakerEnrollmentJobs -> Value
toJSON ListSpeakerEnrollmentJobs' {Maybe Natural
Maybe Text
Maybe SpeakerEnrollmentJobStatus
Text
domainId :: Text
maxResults :: Maybe Natural
jobStatus :: Maybe SpeakerEnrollmentJobStatus
nextToken :: Maybe Text
$sel:domainId:ListSpeakerEnrollmentJobs' :: ListSpeakerEnrollmentJobs -> Text
$sel:maxResults:ListSpeakerEnrollmentJobs' :: ListSpeakerEnrollmentJobs -> Maybe Natural
$sel:jobStatus:ListSpeakerEnrollmentJobs' :: ListSpeakerEnrollmentJobs -> Maybe SpeakerEnrollmentJobStatus
$sel:nextToken:ListSpeakerEnrollmentJobs' :: ListSpeakerEnrollmentJobs -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"JobStatus" Text -> SpeakerEnrollmentJobStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SpeakerEnrollmentJobStatus -> Pair)
-> Maybe SpeakerEnrollmentJobStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SpeakerEnrollmentJobStatus
jobStatus,
            (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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainId)
          ]
      )

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

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

-- | /See:/ 'newListSpeakerEnrollmentJobsResponse' smart constructor.
data ListSpeakerEnrollmentJobsResponse = ListSpeakerEnrollmentJobsResponse'
  { -- | If @NextToken@ is returned, there are more results available. The value
    -- of @NextToken@ is a unique pagination token for each page. Make the call
    -- again using the returned token to retrieve the next page. Keep all other
    -- arguments unchanged. Each pagination token expires after 24 hours.
    ListSpeakerEnrollmentJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list containing details about each specified speaker enrollment job.
    ListSpeakerEnrollmentJobsResponse
-> Maybe [SpeakerEnrollmentJobSummary]
jobSummaries :: Prelude.Maybe [SpeakerEnrollmentJobSummary],
    -- | The response's http status code.
    ListSpeakerEnrollmentJobsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSpeakerEnrollmentJobsResponse
-> ListSpeakerEnrollmentJobsResponse -> Bool
(ListSpeakerEnrollmentJobsResponse
 -> ListSpeakerEnrollmentJobsResponse -> Bool)
-> (ListSpeakerEnrollmentJobsResponse
    -> ListSpeakerEnrollmentJobsResponse -> Bool)
-> Eq ListSpeakerEnrollmentJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSpeakerEnrollmentJobsResponse
-> ListSpeakerEnrollmentJobsResponse -> Bool
$c/= :: ListSpeakerEnrollmentJobsResponse
-> ListSpeakerEnrollmentJobsResponse -> Bool
== :: ListSpeakerEnrollmentJobsResponse
-> ListSpeakerEnrollmentJobsResponse -> Bool
$c== :: ListSpeakerEnrollmentJobsResponse
-> ListSpeakerEnrollmentJobsResponse -> Bool
Prelude.Eq, Int -> ListSpeakerEnrollmentJobsResponse -> ShowS
[ListSpeakerEnrollmentJobsResponse] -> ShowS
ListSpeakerEnrollmentJobsResponse -> String
(Int -> ListSpeakerEnrollmentJobsResponse -> ShowS)
-> (ListSpeakerEnrollmentJobsResponse -> String)
-> ([ListSpeakerEnrollmentJobsResponse] -> ShowS)
-> Show ListSpeakerEnrollmentJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSpeakerEnrollmentJobsResponse] -> ShowS
$cshowList :: [ListSpeakerEnrollmentJobsResponse] -> ShowS
show :: ListSpeakerEnrollmentJobsResponse -> String
$cshow :: ListSpeakerEnrollmentJobsResponse -> String
showsPrec :: Int -> ListSpeakerEnrollmentJobsResponse -> ShowS
$cshowsPrec :: Int -> ListSpeakerEnrollmentJobsResponse -> ShowS
Prelude.Show, (forall x.
 ListSpeakerEnrollmentJobsResponse
 -> Rep ListSpeakerEnrollmentJobsResponse x)
-> (forall x.
    Rep ListSpeakerEnrollmentJobsResponse x
    -> ListSpeakerEnrollmentJobsResponse)
-> Generic ListSpeakerEnrollmentJobsResponse
forall x.
Rep ListSpeakerEnrollmentJobsResponse x
-> ListSpeakerEnrollmentJobsResponse
forall x.
ListSpeakerEnrollmentJobsResponse
-> Rep ListSpeakerEnrollmentJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSpeakerEnrollmentJobsResponse x
-> ListSpeakerEnrollmentJobsResponse
$cfrom :: forall x.
ListSpeakerEnrollmentJobsResponse
-> Rep ListSpeakerEnrollmentJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSpeakerEnrollmentJobsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listSpeakerEnrollmentJobsResponse_nextToken' - If @NextToken@ is returned, there are more results available. The value
-- of @NextToken@ is a unique pagination token for each page. Make the call
-- again using the returned token to retrieve the next page. Keep all other
-- arguments unchanged. Each pagination token expires after 24 hours.
--
-- 'jobSummaries', 'listSpeakerEnrollmentJobsResponse_jobSummaries' - A list containing details about each specified speaker enrollment job.
--
-- 'httpStatus', 'listSpeakerEnrollmentJobsResponse_httpStatus' - The response's http status code.
newListSpeakerEnrollmentJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSpeakerEnrollmentJobsResponse
newListSpeakerEnrollmentJobsResponse :: Int -> ListSpeakerEnrollmentJobsResponse
newListSpeakerEnrollmentJobsResponse Int
pHttpStatus_ =
  ListSpeakerEnrollmentJobsResponse' :: Maybe Text
-> Maybe [SpeakerEnrollmentJobSummary]
-> Int
-> ListSpeakerEnrollmentJobsResponse
ListSpeakerEnrollmentJobsResponse'
    { $sel:nextToken:ListSpeakerEnrollmentJobsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobSummaries:ListSpeakerEnrollmentJobsResponse' :: Maybe [SpeakerEnrollmentJobSummary]
jobSummaries = Maybe [SpeakerEnrollmentJobSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSpeakerEnrollmentJobsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If @NextToken@ is returned, there are more results available. The value
-- of @NextToken@ is a unique pagination token for each page. Make the call
-- again using the returned token to retrieve the next page. Keep all other
-- arguments unchanged. Each pagination token expires after 24 hours.
listSpeakerEnrollmentJobsResponse_nextToken :: Lens.Lens' ListSpeakerEnrollmentJobsResponse (Prelude.Maybe Prelude.Text)
listSpeakerEnrollmentJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSpeakerEnrollmentJobsResponse
-> f ListSpeakerEnrollmentJobsResponse
listSpeakerEnrollmentJobsResponse_nextToken = (ListSpeakerEnrollmentJobsResponse -> Maybe Text)
-> (ListSpeakerEnrollmentJobsResponse
    -> Maybe Text -> ListSpeakerEnrollmentJobsResponse)
-> Lens
     ListSpeakerEnrollmentJobsResponse
     ListSpeakerEnrollmentJobsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSpeakerEnrollmentJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSpeakerEnrollmentJobsResponse' :: ListSpeakerEnrollmentJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSpeakerEnrollmentJobsResponse
s@ListSpeakerEnrollmentJobsResponse' {} Maybe Text
a -> ListSpeakerEnrollmentJobsResponse
s {$sel:nextToken:ListSpeakerEnrollmentJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSpeakerEnrollmentJobsResponse)

-- | A list containing details about each specified speaker enrollment job.
listSpeakerEnrollmentJobsResponse_jobSummaries :: Lens.Lens' ListSpeakerEnrollmentJobsResponse (Prelude.Maybe [SpeakerEnrollmentJobSummary])
listSpeakerEnrollmentJobsResponse_jobSummaries :: (Maybe [SpeakerEnrollmentJobSummary]
 -> f (Maybe [SpeakerEnrollmentJobSummary]))
-> ListSpeakerEnrollmentJobsResponse
-> f ListSpeakerEnrollmentJobsResponse
listSpeakerEnrollmentJobsResponse_jobSummaries = (ListSpeakerEnrollmentJobsResponse
 -> Maybe [SpeakerEnrollmentJobSummary])
-> (ListSpeakerEnrollmentJobsResponse
    -> Maybe [SpeakerEnrollmentJobSummary]
    -> ListSpeakerEnrollmentJobsResponse)
-> Lens
     ListSpeakerEnrollmentJobsResponse
     ListSpeakerEnrollmentJobsResponse
     (Maybe [SpeakerEnrollmentJobSummary])
     (Maybe [SpeakerEnrollmentJobSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSpeakerEnrollmentJobsResponse' {Maybe [SpeakerEnrollmentJobSummary]
jobSummaries :: Maybe [SpeakerEnrollmentJobSummary]
$sel:jobSummaries:ListSpeakerEnrollmentJobsResponse' :: ListSpeakerEnrollmentJobsResponse
-> Maybe [SpeakerEnrollmentJobSummary]
jobSummaries} -> Maybe [SpeakerEnrollmentJobSummary]
jobSummaries) (\s :: ListSpeakerEnrollmentJobsResponse
s@ListSpeakerEnrollmentJobsResponse' {} Maybe [SpeakerEnrollmentJobSummary]
a -> ListSpeakerEnrollmentJobsResponse
s {$sel:jobSummaries:ListSpeakerEnrollmentJobsResponse' :: Maybe [SpeakerEnrollmentJobSummary]
jobSummaries = Maybe [SpeakerEnrollmentJobSummary]
a} :: ListSpeakerEnrollmentJobsResponse) ((Maybe [SpeakerEnrollmentJobSummary]
  -> f (Maybe [SpeakerEnrollmentJobSummary]))
 -> ListSpeakerEnrollmentJobsResponse
 -> f ListSpeakerEnrollmentJobsResponse)
-> ((Maybe [SpeakerEnrollmentJobSummary]
     -> f (Maybe [SpeakerEnrollmentJobSummary]))
    -> Maybe [SpeakerEnrollmentJobSummary]
    -> f (Maybe [SpeakerEnrollmentJobSummary]))
-> (Maybe [SpeakerEnrollmentJobSummary]
    -> f (Maybe [SpeakerEnrollmentJobSummary]))
-> ListSpeakerEnrollmentJobsResponse
-> f ListSpeakerEnrollmentJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SpeakerEnrollmentJobSummary]
  [SpeakerEnrollmentJobSummary]
  [SpeakerEnrollmentJobSummary]
  [SpeakerEnrollmentJobSummary]
-> Iso
     (Maybe [SpeakerEnrollmentJobSummary])
     (Maybe [SpeakerEnrollmentJobSummary])
     (Maybe [SpeakerEnrollmentJobSummary])
     (Maybe [SpeakerEnrollmentJobSummary])
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
  [SpeakerEnrollmentJobSummary]
  [SpeakerEnrollmentJobSummary]
  [SpeakerEnrollmentJobSummary]
  [SpeakerEnrollmentJobSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListSpeakerEnrollmentJobsResponse