{-# 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.Comprehend.StartKeyPhrasesDetectionJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Starts an asynchronous key phrase detection job for a collection of
-- documents. Use the operation to track the status of a job.
module Amazonka.Comprehend.StartKeyPhrasesDetectionJob
  ( -- * Creating a Request
    StartKeyPhrasesDetectionJob (..),
    newStartKeyPhrasesDetectionJob,

    -- * Request Lenses
    startKeyPhrasesDetectionJob_clientRequestToken,
    startKeyPhrasesDetectionJob_jobName,
    startKeyPhrasesDetectionJob_tags,
    startKeyPhrasesDetectionJob_volumeKmsKeyId,
    startKeyPhrasesDetectionJob_vpcConfig,
    startKeyPhrasesDetectionJob_inputDataConfig,
    startKeyPhrasesDetectionJob_outputDataConfig,
    startKeyPhrasesDetectionJob_dataAccessRoleArn,
    startKeyPhrasesDetectionJob_languageCode,

    -- * Destructuring the Response
    StartKeyPhrasesDetectionJobResponse (..),
    newStartKeyPhrasesDetectionJobResponse,

    -- * Response Lenses
    startKeyPhrasesDetectionJobResponse_jobArn,
    startKeyPhrasesDetectionJobResponse_jobId,
    startKeyPhrasesDetectionJobResponse_jobStatus,
    startKeyPhrasesDetectionJobResponse_httpStatus,
  )
where

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

-- | /See:/ 'newStartKeyPhrasesDetectionJob' smart constructor.
data StartKeyPhrasesDetectionJob = StartKeyPhrasesDetectionJob'
  { -- | A unique identifier for the request. If you don\'t set the client
    -- request token, Amazon Comprehend generates one.
    StartKeyPhrasesDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the job.
    StartKeyPhrasesDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | Tags to be associated with the key phrases detection job. A tag is a
    -- key-value pair that adds metadata to a resource used by Amazon
    -- Comprehend. For example, a tag with \"Sales\" as the key might be added
    -- to a resource to indicate its use by the sales department.
    StartKeyPhrasesDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
    -- uses to encrypt data on the storage volume attached to the ML compute
    -- instance(s) that process the analysis job. The VolumeKmsKeyId can be
    -- either of the following formats:
    --
    -- -   KMS Key ID: @\"1234abcd-12ab-34cd-56ef-1234567890ab\"@
    --
    -- -   Amazon Resource Name (ARN) of a KMS Key:
    --     @\"arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"@
    StartKeyPhrasesDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Configuration parameters for an optional private Virtual Private Cloud
    -- (VPC) containing the resources you are using for your key phrases
    -- detection job. For more information, see
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
    StartKeyPhrasesDetectionJob -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
    -- | Specifies the format and location of the input data for the job.
    StartKeyPhrasesDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
    -- | Specifies where to send the output files.
    StartKeyPhrasesDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
    -- | The Amazon Resource Name (ARN) of the AWS Identity and Access Management
    -- (IAM) role that grants Amazon Comprehend read access to your input data.
    -- For more information, see
    -- <https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions>.
    StartKeyPhrasesDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
    -- | The language of the input documents. You can specify any of the primary
    -- languages supported by Amazon Comprehend. All documents must be in the
    -- same language.
    StartKeyPhrasesDetectionJob -> LanguageCode
languageCode :: LanguageCode
  }
  deriving (StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
$c/= :: StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
== :: StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
$c== :: StartKeyPhrasesDetectionJob -> StartKeyPhrasesDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartKeyPhrasesDetectionJob]
ReadPrec StartKeyPhrasesDetectionJob
Int -> ReadS StartKeyPhrasesDetectionJob
ReadS [StartKeyPhrasesDetectionJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartKeyPhrasesDetectionJob]
$creadListPrec :: ReadPrec [StartKeyPhrasesDetectionJob]
readPrec :: ReadPrec StartKeyPhrasesDetectionJob
$creadPrec :: ReadPrec StartKeyPhrasesDetectionJob
readList :: ReadS [StartKeyPhrasesDetectionJob]
$creadList :: ReadS [StartKeyPhrasesDetectionJob]
readsPrec :: Int -> ReadS StartKeyPhrasesDetectionJob
$creadsPrec :: Int -> ReadS StartKeyPhrasesDetectionJob
Prelude.Read, Int -> StartKeyPhrasesDetectionJob -> ShowS
[StartKeyPhrasesDetectionJob] -> ShowS
StartKeyPhrasesDetectionJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartKeyPhrasesDetectionJob] -> ShowS
$cshowList :: [StartKeyPhrasesDetectionJob] -> ShowS
show :: StartKeyPhrasesDetectionJob -> String
$cshow :: StartKeyPhrasesDetectionJob -> String
showsPrec :: Int -> StartKeyPhrasesDetectionJob -> ShowS
$cshowsPrec :: Int -> StartKeyPhrasesDetectionJob -> ShowS
Prelude.Show, forall x.
Rep StartKeyPhrasesDetectionJob x -> StartKeyPhrasesDetectionJob
forall x.
StartKeyPhrasesDetectionJob -> Rep StartKeyPhrasesDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartKeyPhrasesDetectionJob x -> StartKeyPhrasesDetectionJob
$cfrom :: forall x.
StartKeyPhrasesDetectionJob -> Rep StartKeyPhrasesDetectionJob x
Prelude.Generic)

-- |
-- Create a value of 'StartKeyPhrasesDetectionJob' 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:
--
-- 'clientRequestToken', 'startKeyPhrasesDetectionJob_clientRequestToken' - A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
--
-- 'jobName', 'startKeyPhrasesDetectionJob_jobName' - The identifier of the job.
--
-- 'tags', 'startKeyPhrasesDetectionJob_tags' - Tags to be associated with the key phrases detection job. A tag is a
-- key-value pair that adds metadata to a resource used by Amazon
-- Comprehend. For example, a tag with \"Sales\" as the key might be added
-- to a resource to indicate its use by the sales department.
--
-- 'volumeKmsKeyId', 'startKeyPhrasesDetectionJob_volumeKmsKeyId' - ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
-- uses to encrypt data on the storage volume attached to the ML compute
-- instance(s) that process the analysis job. The VolumeKmsKeyId can be
-- either of the following formats:
--
-- -   KMS Key ID: @\"1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- -   Amazon Resource Name (ARN) of a KMS Key:
--     @\"arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- 'vpcConfig', 'startKeyPhrasesDetectionJob_vpcConfig' - Configuration parameters for an optional private Virtual Private Cloud
-- (VPC) containing the resources you are using for your key phrases
-- detection job. For more information, see
-- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
--
-- 'inputDataConfig', 'startKeyPhrasesDetectionJob_inputDataConfig' - Specifies the format and location of the input data for the job.
--
-- 'outputDataConfig', 'startKeyPhrasesDetectionJob_outputDataConfig' - Specifies where to send the output files.
--
-- 'dataAccessRoleArn', 'startKeyPhrasesDetectionJob_dataAccessRoleArn' - The Amazon Resource Name (ARN) of the AWS Identity and Access Management
-- (IAM) role that grants Amazon Comprehend read access to your input data.
-- For more information, see
-- <https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions>.
--
-- 'languageCode', 'startKeyPhrasesDetectionJob_languageCode' - The language of the input documents. You can specify any of the primary
-- languages supported by Amazon Comprehend. All documents must be in the
-- same language.
newStartKeyPhrasesDetectionJob ::
  -- | 'inputDataConfig'
  InputDataConfig ->
  -- | 'outputDataConfig'
  OutputDataConfig ->
  -- | 'dataAccessRoleArn'
  Prelude.Text ->
  -- | 'languageCode'
  LanguageCode ->
  StartKeyPhrasesDetectionJob
newStartKeyPhrasesDetectionJob :: InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartKeyPhrasesDetectionJob
newStartKeyPhrasesDetectionJob
  InputDataConfig
pInputDataConfig_
  OutputDataConfig
pOutputDataConfig_
  Text
pDataAccessRoleArn_
  LanguageCode
pLanguageCode_ =
    StartKeyPhrasesDetectionJob'
      { $sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: Maybe Text
clientRequestToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:jobName:StartKeyPhrasesDetectionJob' :: Maybe Text
jobName = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:StartKeyPhrasesDetectionJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: Maybe Text
volumeKmsKeyId = forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:StartKeyPhrasesDetectionJob' :: Maybe VpcConfig
vpcConfig = forall a. Maybe a
Prelude.Nothing,
        $sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
        $sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
        $sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
        $sel:languageCode:StartKeyPhrasesDetectionJob' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
      }

-- | A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
startKeyPhrasesDetectionJob_clientRequestToken :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJob_clientRequestToken :: Lens' StartKeyPhrasesDetectionJob (Maybe Text)
startKeyPhrasesDetectionJob_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Maybe Text
a -> StartKeyPhrasesDetectionJob
s {$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartKeyPhrasesDetectionJob)

-- | The identifier of the job.
startKeyPhrasesDetectionJob_jobName :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJob_jobName :: Lens' StartKeyPhrasesDetectionJob (Maybe Text)
startKeyPhrasesDetectionJob_jobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Maybe Text
a -> StartKeyPhrasesDetectionJob
s {$sel:jobName:StartKeyPhrasesDetectionJob' :: Maybe Text
jobName = Maybe Text
a} :: StartKeyPhrasesDetectionJob)

-- | Tags to be associated with the key phrases detection job. A tag is a
-- key-value pair that adds metadata to a resource used by Amazon
-- Comprehend. For example, a tag with \"Sales\" as the key might be added
-- to a resource to indicate its use by the sales department.
startKeyPhrasesDetectionJob_tags :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe [Tag])
startKeyPhrasesDetectionJob_tags :: Lens' StartKeyPhrasesDetectionJob (Maybe [Tag])
startKeyPhrasesDetectionJob_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Maybe [Tag]
a -> StartKeyPhrasesDetectionJob
s {$sel:tags:StartKeyPhrasesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartKeyPhrasesDetectionJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
-- uses to encrypt data on the storage volume attached to the ML compute
-- instance(s) that process the analysis job. The VolumeKmsKeyId can be
-- either of the following formats:
--
-- -   KMS Key ID: @\"1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- -   Amazon Resource Name (ARN) of a KMS Key:
--     @\"arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"@
startKeyPhrasesDetectionJob_volumeKmsKeyId :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJob_volumeKmsKeyId :: Lens' StartKeyPhrasesDetectionJob (Maybe Text)
startKeyPhrasesDetectionJob_volumeKmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Maybe Text
volumeKmsKeyId :: Maybe Text
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
volumeKmsKeyId} -> Maybe Text
volumeKmsKeyId) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Maybe Text
a -> StartKeyPhrasesDetectionJob
s {$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
a} :: StartKeyPhrasesDetectionJob)

-- | Configuration parameters for an optional private Virtual Private Cloud
-- (VPC) containing the resources you are using for your key phrases
-- detection job. For more information, see
-- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
startKeyPhrasesDetectionJob_vpcConfig :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe VpcConfig)
startKeyPhrasesDetectionJob_vpcConfig :: Lens' StartKeyPhrasesDetectionJob (Maybe VpcConfig)
startKeyPhrasesDetectionJob_vpcConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Maybe VpcConfig
a -> StartKeyPhrasesDetectionJob
s {$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: StartKeyPhrasesDetectionJob)

-- | Specifies the format and location of the input data for the job.
startKeyPhrasesDetectionJob_inputDataConfig :: Lens.Lens' StartKeyPhrasesDetectionJob InputDataConfig
startKeyPhrasesDetectionJob_inputDataConfig :: Lens' StartKeyPhrasesDetectionJob InputDataConfig
startKeyPhrasesDetectionJob_inputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} InputDataConfig
a -> StartKeyPhrasesDetectionJob
s {$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartKeyPhrasesDetectionJob)

-- | Specifies where to send the output files.
startKeyPhrasesDetectionJob_outputDataConfig :: Lens.Lens' StartKeyPhrasesDetectionJob OutputDataConfig
startKeyPhrasesDetectionJob_outputDataConfig :: Lens' StartKeyPhrasesDetectionJob OutputDataConfig
startKeyPhrasesDetectionJob_outputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} OutputDataConfig
a -> StartKeyPhrasesDetectionJob
s {$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartKeyPhrasesDetectionJob)

-- | The Amazon Resource Name (ARN) of the AWS Identity and Access Management
-- (IAM) role that grants Amazon Comprehend read access to your input data.
-- For more information, see
-- <https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions>.
startKeyPhrasesDetectionJob_dataAccessRoleArn :: Lens.Lens' StartKeyPhrasesDetectionJob Prelude.Text
startKeyPhrasesDetectionJob_dataAccessRoleArn :: Lens' StartKeyPhrasesDetectionJob Text
startKeyPhrasesDetectionJob_dataAccessRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} Text
a -> StartKeyPhrasesDetectionJob
s {$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: Text
dataAccessRoleArn = Text
a} :: StartKeyPhrasesDetectionJob)

-- | The language of the input documents. You can specify any of the primary
-- languages supported by Amazon Comprehend. All documents must be in the
-- same language.
startKeyPhrasesDetectionJob_languageCode :: Lens.Lens' StartKeyPhrasesDetectionJob LanguageCode
startKeyPhrasesDetectionJob_languageCode :: Lens' StartKeyPhrasesDetectionJob LanguageCode
startKeyPhrasesDetectionJob_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJob' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: StartKeyPhrasesDetectionJob
s@StartKeyPhrasesDetectionJob' {} LanguageCode
a -> StartKeyPhrasesDetectionJob
s {$sel:languageCode:StartKeyPhrasesDetectionJob' :: LanguageCode
languageCode = LanguageCode
a} :: StartKeyPhrasesDetectionJob)

instance Core.AWSRequest StartKeyPhrasesDetectionJob where
  type
    AWSResponse StartKeyPhrasesDetectionJob =
      StartKeyPhrasesDetectionJobResponse
  request :: (Service -> Service)
-> StartKeyPhrasesDetectionJob
-> Request StartKeyPhrasesDetectionJob
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy StartKeyPhrasesDetectionJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartKeyPhrasesDetectionJob)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartKeyPhrasesDetectionJobResponse
StartKeyPhrasesDetectionJobResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable StartKeyPhrasesDetectionJob where
  hashWithSalt :: Int -> StartKeyPhrasesDetectionJob -> Int
hashWithSalt Int
_salt StartKeyPhrasesDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
LanguageCode
OutputDataConfig
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Text
$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> InputDataConfig
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:tags:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe [Tag]
$sel:jobName:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeKmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcConfig
vpcConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` InputDataConfig
inputDataConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OutputDataConfig
outputDataConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataAccessRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LanguageCode
languageCode

instance Prelude.NFData StartKeyPhrasesDetectionJob where
  rnf :: StartKeyPhrasesDetectionJob -> ()
rnf StartKeyPhrasesDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
LanguageCode
OutputDataConfig
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Text
$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> InputDataConfig
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:tags:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe [Tag]
$sel:jobName:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeKmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcConfig
vpcConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf InputDataConfig
inputDataConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf OutputDataConfig
outputDataConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dataAccessRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LanguageCode
languageCode

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

instance Data.ToJSON StartKeyPhrasesDetectionJob where
  toJSON :: StartKeyPhrasesDetectionJob -> Value
toJSON StartKeyPhrasesDetectionJob' {Maybe [Tag]
Maybe Text
Maybe VpcConfig
Text
InputDataConfig
LanguageCode
OutputDataConfig
languageCode :: LanguageCode
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
vpcConfig :: Maybe VpcConfig
volumeKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
jobName :: Maybe Text
clientRequestToken :: Maybe Text
$sel:languageCode:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Text
$sel:outputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> InputDataConfig
$sel:vpcConfig:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe VpcConfig
$sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:tags:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe [Tag]
$sel:jobName:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
$sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: StartKeyPhrasesDetectionJob -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ClientRequestToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
            (Key
"JobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
jobName,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            (Key
"VolumeKmsKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
volumeKmsKeyId,
            (Key
"VpcConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfig
vpcConfig,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"InputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= InputDataConfig
inputDataConfig),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"OutputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= OutputDataConfig
outputDataConfig),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"DataAccessRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
dataAccessRoleArn),
            forall a. a -> Maybe a
Prelude.Just (Key
"LanguageCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= LanguageCode
languageCode)
          ]
      )

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

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

-- | /See:/ 'newStartKeyPhrasesDetectionJobResponse' smart constructor.
data StartKeyPhrasesDetectionJobResponse = StartKeyPhrasesDetectionJobResponse'
  { -- | The Amazon Resource Name (ARN) of the key phrase detection job. It is a
    -- unique, fully qualified identifier for the job. It includes the AWS
    -- account, Region, and the job ID. The format of the ARN is as follows:
    --
    -- @arn:\<partition>:comprehend:\<region>:\<account-id>:key-phrases-detection-job\/\<job-id>@
    --
    -- The following is an example job ARN:
    --
    -- @arn:aws:comprehend:us-west-2:111122223333:key-phrases-detection-job\/1234abcd12ab34cd56ef1234567890ab@
    StartKeyPhrasesDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
    -- | The identifier generated for the job. To get the status of a job, use
    -- this identifier with the operation.
    StartKeyPhrasesDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The status of the job.
    --
    -- -   SUBMITTED - The job has been received and is queued for processing.
    --
    -- -   IN_PROGRESS - Amazon Comprehend is processing the job.
    --
    -- -   COMPLETED - The job was successfully completed and the output is
    --     available.
    --
    -- -   FAILED - The job did not complete. To get details, use the
    --     operation.
    StartKeyPhrasesDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
    -- | The response's http status code.
    StartKeyPhrasesDetectionJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
$c/= :: StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
== :: StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
$c== :: StartKeyPhrasesDetectionJobResponse
-> StartKeyPhrasesDetectionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartKeyPhrasesDetectionJobResponse]
ReadPrec StartKeyPhrasesDetectionJobResponse
Int -> ReadS StartKeyPhrasesDetectionJobResponse
ReadS [StartKeyPhrasesDetectionJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartKeyPhrasesDetectionJobResponse]
$creadListPrec :: ReadPrec [StartKeyPhrasesDetectionJobResponse]
readPrec :: ReadPrec StartKeyPhrasesDetectionJobResponse
$creadPrec :: ReadPrec StartKeyPhrasesDetectionJobResponse
readList :: ReadS [StartKeyPhrasesDetectionJobResponse]
$creadList :: ReadS [StartKeyPhrasesDetectionJobResponse]
readsPrec :: Int -> ReadS StartKeyPhrasesDetectionJobResponse
$creadsPrec :: Int -> ReadS StartKeyPhrasesDetectionJobResponse
Prelude.Read, Int -> StartKeyPhrasesDetectionJobResponse -> ShowS
[StartKeyPhrasesDetectionJobResponse] -> ShowS
StartKeyPhrasesDetectionJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartKeyPhrasesDetectionJobResponse] -> ShowS
$cshowList :: [StartKeyPhrasesDetectionJobResponse] -> ShowS
show :: StartKeyPhrasesDetectionJobResponse -> String
$cshow :: StartKeyPhrasesDetectionJobResponse -> String
showsPrec :: Int -> StartKeyPhrasesDetectionJobResponse -> ShowS
$cshowsPrec :: Int -> StartKeyPhrasesDetectionJobResponse -> ShowS
Prelude.Show, forall x.
Rep StartKeyPhrasesDetectionJobResponse x
-> StartKeyPhrasesDetectionJobResponse
forall x.
StartKeyPhrasesDetectionJobResponse
-> Rep StartKeyPhrasesDetectionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartKeyPhrasesDetectionJobResponse x
-> StartKeyPhrasesDetectionJobResponse
$cfrom :: forall x.
StartKeyPhrasesDetectionJobResponse
-> Rep StartKeyPhrasesDetectionJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartKeyPhrasesDetectionJobResponse' 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:
--
-- 'jobArn', 'startKeyPhrasesDetectionJobResponse_jobArn' - The Amazon Resource Name (ARN) of the key phrase detection job. It is a
-- unique, fully qualified identifier for the job. It includes the AWS
-- account, Region, and the job ID. The format of the ARN is as follows:
--
-- @arn:\<partition>:comprehend:\<region>:\<account-id>:key-phrases-detection-job\/\<job-id>@
--
-- The following is an example job ARN:
--
-- @arn:aws:comprehend:us-west-2:111122223333:key-phrases-detection-job\/1234abcd12ab34cd56ef1234567890ab@
--
-- 'jobId', 'startKeyPhrasesDetectionJobResponse_jobId' - The identifier generated for the job. To get the status of a job, use
-- this identifier with the operation.
--
-- 'jobStatus', 'startKeyPhrasesDetectionJobResponse_jobStatus' - The status of the job.
--
-- -   SUBMITTED - The job has been received and is queued for processing.
--
-- -   IN_PROGRESS - Amazon Comprehend is processing the job.
--
-- -   COMPLETED - The job was successfully completed and the output is
--     available.
--
-- -   FAILED - The job did not complete. To get details, use the
--     operation.
--
-- 'httpStatus', 'startKeyPhrasesDetectionJobResponse_httpStatus' - The response's http status code.
newStartKeyPhrasesDetectionJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartKeyPhrasesDetectionJobResponse
newStartKeyPhrasesDetectionJobResponse :: Int -> StartKeyPhrasesDetectionJobResponse
newStartKeyPhrasesDetectionJobResponse Int
pHttpStatus_ =
  StartKeyPhrasesDetectionJobResponse'
    { $sel:jobArn:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:StartKeyPhrasesDetectionJobResponse' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartKeyPhrasesDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the key phrase detection job. It is a
-- unique, fully qualified identifier for the job. It includes the AWS
-- account, Region, and the job ID. The format of the ARN is as follows:
--
-- @arn:\<partition>:comprehend:\<region>:\<account-id>:key-phrases-detection-job\/\<job-id>@
--
-- The following is an example job ARN:
--
-- @arn:aws:comprehend:us-west-2:111122223333:key-phrases-detection-job\/1234abcd12ab34cd56ef1234567890ab@
startKeyPhrasesDetectionJobResponse_jobArn :: Lens.Lens' StartKeyPhrasesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJobResponse_jobArn :: Lens' StartKeyPhrasesDetectionJobResponse (Maybe Text)
startKeyPhrasesDetectionJobResponse_jobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: StartKeyPhrasesDetectionJobResponse
s@StartKeyPhrasesDetectionJobResponse' {} Maybe Text
a -> StartKeyPhrasesDetectionJobResponse
s {$sel:jobArn:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: StartKeyPhrasesDetectionJobResponse)

-- | The identifier generated for the job. To get the status of a job, use
-- this identifier with the operation.
startKeyPhrasesDetectionJobResponse_jobId :: Lens.Lens' StartKeyPhrasesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJobResponse_jobId :: Lens' StartKeyPhrasesDetectionJobResponse (Maybe Text)
startKeyPhrasesDetectionJobResponse_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartKeyPhrasesDetectionJobResponse
s@StartKeyPhrasesDetectionJobResponse' {} Maybe Text
a -> StartKeyPhrasesDetectionJobResponse
s {$sel:jobId:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartKeyPhrasesDetectionJobResponse)

-- | The status of the job.
--
-- -   SUBMITTED - The job has been received and is queued for processing.
--
-- -   IN_PROGRESS - Amazon Comprehend is processing the job.
--
-- -   COMPLETED - The job was successfully completed and the output is
--     available.
--
-- -   FAILED - The job did not complete. To get details, use the
--     operation.
startKeyPhrasesDetectionJobResponse_jobStatus :: Lens.Lens' StartKeyPhrasesDetectionJobResponse (Prelude.Maybe JobStatus)
startKeyPhrasesDetectionJobResponse_jobStatus :: Lens' StartKeyPhrasesDetectionJobResponse (Maybe JobStatus)
startKeyPhrasesDetectionJobResponse_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartKeyPhrasesDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartKeyPhrasesDetectionJobResponse
s@StartKeyPhrasesDetectionJobResponse' {} Maybe JobStatus
a -> StartKeyPhrasesDetectionJobResponse
s {$sel:jobStatus:StartKeyPhrasesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartKeyPhrasesDetectionJobResponse)

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

instance
  Prelude.NFData
    StartKeyPhrasesDetectionJobResponse
  where
  rnf :: StartKeyPhrasesDetectionJobResponse -> ()
rnf StartKeyPhrasesDetectionJobResponse' {Int
Maybe Text
Maybe JobStatus
httpStatus :: Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
jobArn :: Maybe Text
$sel:httpStatus:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Int
$sel:jobStatus:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe JobStatus
$sel:jobId:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe Text
$sel:jobArn:StartKeyPhrasesDetectionJobResponse' :: StartKeyPhrasesDetectionJobResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobStatus
jobStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus