{-# 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-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)
--
-- 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_jobName,
    startKeyPhrasesDetectionJob_vpcConfig,
    startKeyPhrasesDetectionJob_volumeKmsKeyId,
    startKeyPhrasesDetectionJob_clientRequestToken,
    startKeyPhrasesDetectionJob_tags,
    startKeyPhrasesDetectionJob_inputDataConfig,
    startKeyPhrasesDetectionJob_outputDataConfig,
    startKeyPhrasesDetectionJob_dataAccessRoleArn,
    startKeyPhrasesDetectionJob_languageCode,

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

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

import Amazonka.Comprehend.Types
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

-- | /See:/ 'newStartKeyPhrasesDetectionJob' smart constructor.
data StartKeyPhrasesDetectionJob = StartKeyPhrasesDetectionJob'
  { -- | The identifier of the job.
    StartKeyPhrasesDetectionJob -> Maybe Text
jobName :: 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,
    -- | 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,
    -- | 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,
    -- | 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],
    -- | 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
(StartKeyPhrasesDetectionJob
 -> StartKeyPhrasesDetectionJob -> Bool)
-> (StartKeyPhrasesDetectionJob
    -> StartKeyPhrasesDetectionJob -> Bool)
-> Eq StartKeyPhrasesDetectionJob
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]
(Int -> ReadS StartKeyPhrasesDetectionJob)
-> ReadS [StartKeyPhrasesDetectionJob]
-> ReadPrec StartKeyPhrasesDetectionJob
-> ReadPrec [StartKeyPhrasesDetectionJob]
-> Read 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
(Int -> StartKeyPhrasesDetectionJob -> ShowS)
-> (StartKeyPhrasesDetectionJob -> String)
-> ([StartKeyPhrasesDetectionJob] -> ShowS)
-> Show StartKeyPhrasesDetectionJob
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.
 StartKeyPhrasesDetectionJob -> Rep StartKeyPhrasesDetectionJob x)
-> (forall x.
    Rep StartKeyPhrasesDetectionJob x -> StartKeyPhrasesDetectionJob)
-> Generic StartKeyPhrasesDetectionJob
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:
--
-- 'jobName', 'startKeyPhrasesDetectionJob_jobName' - The identifier of the job.
--
-- '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>.
--
-- '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\"@
--
-- 'clientRequestToken', 'startKeyPhrasesDetectionJob_clientRequestToken' - A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
--
-- '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.
--
-- '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' :: Maybe Text
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartKeyPhrasesDetectionJob
StartKeyPhrasesDetectionJob'
      { $sel:jobName:StartKeyPhrasesDetectionJob' :: Maybe Text
jobName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:StartKeyPhrasesDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:volumeKmsKeyId:StartKeyPhrasesDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:StartKeyPhrasesDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:StartKeyPhrasesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
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_
      }

-- | The identifier of the job.
startKeyPhrasesDetectionJob_jobName :: Lens.Lens' StartKeyPhrasesDetectionJob (Prelude.Maybe Prelude.Text)
startKeyPhrasesDetectionJob_jobName :: (Maybe Text -> f (Maybe Text))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_jobName = (StartKeyPhrasesDetectionJob -> Maybe Text)
-> (StartKeyPhrasesDetectionJob
    -> Maybe Text -> StartKeyPhrasesDetectionJob)
-> Lens
     StartKeyPhrasesDetectionJob
     StartKeyPhrasesDetectionJob
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_vpcConfig = (StartKeyPhrasesDetectionJob -> Maybe VpcConfig)
-> (StartKeyPhrasesDetectionJob
    -> Maybe VpcConfig -> StartKeyPhrasesDetectionJob)
-> Lens
     StartKeyPhrasesDetectionJob
     StartKeyPhrasesDetectionJob
     (Maybe VpcConfig)
     (Maybe 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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_volumeKmsKeyId = (StartKeyPhrasesDetectionJob -> Maybe Text)
-> (StartKeyPhrasesDetectionJob
    -> Maybe Text -> StartKeyPhrasesDetectionJob)
-> Lens
     StartKeyPhrasesDetectionJob
     StartKeyPhrasesDetectionJob
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_clientRequestToken = (StartKeyPhrasesDetectionJob -> Maybe Text)
-> (StartKeyPhrasesDetectionJob
    -> Maybe Text -> StartKeyPhrasesDetectionJob)
-> Lens
     StartKeyPhrasesDetectionJob
     StartKeyPhrasesDetectionJob
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_tags = (StartKeyPhrasesDetectionJob -> Maybe [Tag])
-> (StartKeyPhrasesDetectionJob
    -> Maybe [Tag] -> StartKeyPhrasesDetectionJob)
-> Lens
     StartKeyPhrasesDetectionJob
     StartKeyPhrasesDetectionJob
     (Maybe [Tag])
     (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartKeyPhrasesDetectionJob
-> f StartKeyPhrasesDetectionJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies the format and location of the input data for the job.
startKeyPhrasesDetectionJob_inputDataConfig :: Lens.Lens' StartKeyPhrasesDetectionJob InputDataConfig
startKeyPhrasesDetectionJob_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_inputDataConfig = (StartKeyPhrasesDetectionJob -> InputDataConfig)
-> (StartKeyPhrasesDetectionJob
    -> InputDataConfig -> StartKeyPhrasesDetectionJob)
-> Lens
     StartKeyPhrasesDetectionJob
     StartKeyPhrasesDetectionJob
     InputDataConfig
     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 :: (OutputDataConfig -> f OutputDataConfig)
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_outputDataConfig = (StartKeyPhrasesDetectionJob -> OutputDataConfig)
-> (StartKeyPhrasesDetectionJob
    -> OutputDataConfig -> StartKeyPhrasesDetectionJob)
-> Lens
     StartKeyPhrasesDetectionJob
     StartKeyPhrasesDetectionJob
     OutputDataConfig
     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 :: (Text -> f Text)
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_dataAccessRoleArn = (StartKeyPhrasesDetectionJob -> Text)
-> (StartKeyPhrasesDetectionJob
    -> Text -> StartKeyPhrasesDetectionJob)
-> Lens
     StartKeyPhrasesDetectionJob StartKeyPhrasesDetectionJob Text Text
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 :: (LanguageCode -> f LanguageCode)
-> StartKeyPhrasesDetectionJob -> f StartKeyPhrasesDetectionJob
startKeyPhrasesDetectionJob_languageCode = (StartKeyPhrasesDetectionJob -> LanguageCode)
-> (StartKeyPhrasesDetectionJob
    -> LanguageCode -> StartKeyPhrasesDetectionJob)
-> Lens
     StartKeyPhrasesDetectionJob
     StartKeyPhrasesDetectionJob
     LanguageCode
     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 :: StartKeyPhrasesDetectionJob -> Request StartKeyPhrasesDetectionJob
request = Service
-> StartKeyPhrasesDetectionJob
-> Request StartKeyPhrasesDetectionJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartKeyPhrasesDetectionJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartKeyPhrasesDetectionJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartKeyPhrasesDetectionJob))
-> Logger
-> Service
-> Proxy StartKeyPhrasesDetectionJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartKeyPhrasesDetectionJob)))
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 Text
-> Maybe JobStatus
-> Int
-> StartKeyPhrasesDetectionJobResponse
StartKeyPhrasesDetectionJobResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe JobStatus
 -> Int
 -> StartKeyPhrasesDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe JobStatus -> Int -> StartKeyPhrasesDetectionJobResponse)
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
"JobId")
            Either
  String
  (Maybe Text
   -> Maybe JobStatus -> Int -> StartKeyPhrasesDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe JobStatus -> Int -> StartKeyPhrasesDetectionJobResponse)
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
"JobArn")
            Either
  String
  (Maybe JobStatus -> Int -> StartKeyPhrasesDetectionJobResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> StartKeyPhrasesDetectionJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe JobStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"JobStatus")
            Either String (Int -> StartKeyPhrasesDetectionJobResponse)
-> Either String Int
-> Either String StartKeyPhrasesDetectionJobResponse
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 StartKeyPhrasesDetectionJob

instance Prelude.NFData StartKeyPhrasesDetectionJob

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

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

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

-- | /See:/ 'newStartKeyPhrasesDetectionJobResponse' smart constructor.
data StartKeyPhrasesDetectionJobResponse = StartKeyPhrasesDetectionJobResponse'
  { -- | 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 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 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
(StartKeyPhrasesDetectionJobResponse
 -> StartKeyPhrasesDetectionJobResponse -> Bool)
-> (StartKeyPhrasesDetectionJobResponse
    -> StartKeyPhrasesDetectionJobResponse -> Bool)
-> Eq StartKeyPhrasesDetectionJobResponse
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]
(Int -> ReadS StartKeyPhrasesDetectionJobResponse)
-> ReadS [StartKeyPhrasesDetectionJobResponse]
-> ReadPrec StartKeyPhrasesDetectionJobResponse
-> ReadPrec [StartKeyPhrasesDetectionJobResponse]
-> Read 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
(Int -> StartKeyPhrasesDetectionJobResponse -> ShowS)
-> (StartKeyPhrasesDetectionJobResponse -> String)
-> ([StartKeyPhrasesDetectionJobResponse] -> ShowS)
-> Show StartKeyPhrasesDetectionJobResponse
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.
 StartKeyPhrasesDetectionJobResponse
 -> Rep StartKeyPhrasesDetectionJobResponse x)
-> (forall x.
    Rep StartKeyPhrasesDetectionJobResponse x
    -> StartKeyPhrasesDetectionJobResponse)
-> Generic StartKeyPhrasesDetectionJobResponse
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:
--
-- 'jobId', 'startKeyPhrasesDetectionJobResponse_jobId' - The identifier generated for the job. To get the status of a job, use
-- this identifier with the operation.
--
-- '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@
--
-- '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' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartKeyPhrasesDetectionJobResponse
StartKeyPhrasesDetectionJobResponse'
    { $sel:jobId:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobArn:StartKeyPhrasesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:StartKeyPhrasesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartKeyPhrasesDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> StartKeyPhrasesDetectionJobResponse
-> f StartKeyPhrasesDetectionJobResponse
startKeyPhrasesDetectionJobResponse_jobId = (StartKeyPhrasesDetectionJobResponse -> Maybe Text)
-> (StartKeyPhrasesDetectionJobResponse
    -> Maybe Text -> StartKeyPhrasesDetectionJobResponse)
-> Lens
     StartKeyPhrasesDetectionJobResponse
     StartKeyPhrasesDetectionJobResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> StartKeyPhrasesDetectionJobResponse
-> f StartKeyPhrasesDetectionJobResponse
startKeyPhrasesDetectionJobResponse_jobArn = (StartKeyPhrasesDetectionJobResponse -> Maybe Text)
-> (StartKeyPhrasesDetectionJobResponse
    -> Maybe Text -> StartKeyPhrasesDetectionJobResponse)
-> Lens
     StartKeyPhrasesDetectionJobResponse
     StartKeyPhrasesDetectionJobResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartKeyPhrasesDetectionJobResponse
-> f StartKeyPhrasesDetectionJobResponse
startKeyPhrasesDetectionJobResponse_jobStatus = (StartKeyPhrasesDetectionJobResponse -> Maybe JobStatus)
-> (StartKeyPhrasesDetectionJobResponse
    -> Maybe JobStatus -> StartKeyPhrasesDetectionJobResponse)
-> Lens
     StartKeyPhrasesDetectionJobResponse
     StartKeyPhrasesDetectionJobResponse
     (Maybe JobStatus)
     (Maybe 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 :: (Int -> f Int)
-> StartKeyPhrasesDetectionJobResponse
-> f StartKeyPhrasesDetectionJobResponse
startKeyPhrasesDetectionJobResponse_httpStatus = (StartKeyPhrasesDetectionJobResponse -> Int)
-> (StartKeyPhrasesDetectionJobResponse
    -> Int -> StartKeyPhrasesDetectionJobResponse)
-> Lens
     StartKeyPhrasesDetectionJobResponse
     StartKeyPhrasesDetectionJobResponse
     Int
     Int
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