{-# 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.StartEntitiesDetectionJob
-- 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 entity detection job for a collection of
-- documents. Use the operation to track the status of a job.
--
-- This API can be used for either standard entity detection or custom
-- entity recognition. In order to be used for custom entity recognition,
-- the optional @EntityRecognizerArn@ must be used in order to provide
-- access to the recognizer being used to detect the custom entity.
module Amazonka.Comprehend.StartEntitiesDetectionJob
  ( -- * Creating a Request
    StartEntitiesDetectionJob (..),
    newStartEntitiesDetectionJob,

    -- * Request Lenses
    startEntitiesDetectionJob_entityRecognizerArn,
    startEntitiesDetectionJob_jobName,
    startEntitiesDetectionJob_vpcConfig,
    startEntitiesDetectionJob_volumeKmsKeyId,
    startEntitiesDetectionJob_clientRequestToken,
    startEntitiesDetectionJob_tags,
    startEntitiesDetectionJob_inputDataConfig,
    startEntitiesDetectionJob_outputDataConfig,
    startEntitiesDetectionJob_dataAccessRoleArn,
    startEntitiesDetectionJob_languageCode,

    -- * Destructuring the Response
    StartEntitiesDetectionJobResponse (..),
    newStartEntitiesDetectionJobResponse,

    -- * Response Lenses
    startEntitiesDetectionJobResponse_jobId,
    startEntitiesDetectionJobResponse_jobArn,
    startEntitiesDetectionJobResponse_jobStatus,
    startEntitiesDetectionJobResponse_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:/ 'newStartEntitiesDetectionJob' smart constructor.
data StartEntitiesDetectionJob = StartEntitiesDetectionJob'
  { -- | The Amazon Resource Name (ARN) that identifies the specific entity
    -- recognizer to be used by the @StartEntitiesDetectionJob@. This ARN is
    -- optional and is only used for a custom entity recognition job.
    StartEntitiesDetectionJob -> Maybe Text
entityRecognizerArn :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the job.
    StartEntitiesDetectionJob -> 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 entity detection
    -- job. For more information, see
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
    StartEntitiesDetectionJob -> 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\"@
    StartEntitiesDetectionJob -> 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.
    StartEntitiesDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Tags to be associated with the entities 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.
    StartEntitiesDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | Specifies the format and location of the input data for the job.
    StartEntitiesDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
    -- | Specifies where to send the output files.
    StartEntitiesDetectionJob -> 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>.
    StartEntitiesDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
    -- | The language of the input documents. All documents must be in the same
    -- language. You can specify any of the languages supported by Amazon
    -- Comprehend. If custom entities recognition is used, this parameter is
    -- ignored and the language used for training the model is used instead.
    StartEntitiesDetectionJob -> LanguageCode
languageCode :: LanguageCode
  }
  deriving (StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool
(StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool)
-> (StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool)
-> Eq StartEntitiesDetectionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool
$c/= :: StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool
== :: StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool
$c== :: StartEntitiesDetectionJob -> StartEntitiesDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartEntitiesDetectionJob]
ReadPrec StartEntitiesDetectionJob
Int -> ReadS StartEntitiesDetectionJob
ReadS [StartEntitiesDetectionJob]
(Int -> ReadS StartEntitiesDetectionJob)
-> ReadS [StartEntitiesDetectionJob]
-> ReadPrec StartEntitiesDetectionJob
-> ReadPrec [StartEntitiesDetectionJob]
-> Read StartEntitiesDetectionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartEntitiesDetectionJob]
$creadListPrec :: ReadPrec [StartEntitiesDetectionJob]
readPrec :: ReadPrec StartEntitiesDetectionJob
$creadPrec :: ReadPrec StartEntitiesDetectionJob
readList :: ReadS [StartEntitiesDetectionJob]
$creadList :: ReadS [StartEntitiesDetectionJob]
readsPrec :: Int -> ReadS StartEntitiesDetectionJob
$creadsPrec :: Int -> ReadS StartEntitiesDetectionJob
Prelude.Read, Int -> StartEntitiesDetectionJob -> ShowS
[StartEntitiesDetectionJob] -> ShowS
StartEntitiesDetectionJob -> String
(Int -> StartEntitiesDetectionJob -> ShowS)
-> (StartEntitiesDetectionJob -> String)
-> ([StartEntitiesDetectionJob] -> ShowS)
-> Show StartEntitiesDetectionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartEntitiesDetectionJob] -> ShowS
$cshowList :: [StartEntitiesDetectionJob] -> ShowS
show :: StartEntitiesDetectionJob -> String
$cshow :: StartEntitiesDetectionJob -> String
showsPrec :: Int -> StartEntitiesDetectionJob -> ShowS
$cshowsPrec :: Int -> StartEntitiesDetectionJob -> ShowS
Prelude.Show, (forall x.
 StartEntitiesDetectionJob -> Rep StartEntitiesDetectionJob x)
-> (forall x.
    Rep StartEntitiesDetectionJob x -> StartEntitiesDetectionJob)
-> Generic StartEntitiesDetectionJob
forall x.
Rep StartEntitiesDetectionJob x -> StartEntitiesDetectionJob
forall x.
StartEntitiesDetectionJob -> Rep StartEntitiesDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartEntitiesDetectionJob x -> StartEntitiesDetectionJob
$cfrom :: forall x.
StartEntitiesDetectionJob -> Rep StartEntitiesDetectionJob x
Prelude.Generic)

-- |
-- Create a value of 'StartEntitiesDetectionJob' 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:
--
-- 'entityRecognizerArn', 'startEntitiesDetectionJob_entityRecognizerArn' - The Amazon Resource Name (ARN) that identifies the specific entity
-- recognizer to be used by the @StartEntitiesDetectionJob@. This ARN is
-- optional and is only used for a custom entity recognition job.
--
-- 'jobName', 'startEntitiesDetectionJob_jobName' - The identifier of the job.
--
-- 'vpcConfig', 'startEntitiesDetectionJob_vpcConfig' - Configuration parameters for an optional private Virtual Private Cloud
-- (VPC) containing the resources you are using for your entity detection
-- job. For more information, see
-- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
--
-- 'volumeKmsKeyId', 'startEntitiesDetectionJob_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', 'startEntitiesDetectionJob_clientRequestToken' - A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
--
-- 'tags', 'startEntitiesDetectionJob_tags' - Tags to be associated with the entities 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', 'startEntitiesDetectionJob_inputDataConfig' - Specifies the format and location of the input data for the job.
--
-- 'outputDataConfig', 'startEntitiesDetectionJob_outputDataConfig' - Specifies where to send the output files.
--
-- 'dataAccessRoleArn', 'startEntitiesDetectionJob_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', 'startEntitiesDetectionJob_languageCode' - The language of the input documents. All documents must be in the same
-- language. You can specify any of the languages supported by Amazon
-- Comprehend. If custom entities recognition is used, this parameter is
-- ignored and the language used for training the model is used instead.
newStartEntitiesDetectionJob ::
  -- | 'inputDataConfig'
  InputDataConfig ->
  -- | 'outputDataConfig'
  OutputDataConfig ->
  -- | 'dataAccessRoleArn'
  Prelude.Text ->
  -- | 'languageCode'
  LanguageCode ->
  StartEntitiesDetectionJob
newStartEntitiesDetectionJob :: InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartEntitiesDetectionJob
newStartEntitiesDetectionJob
  InputDataConfig
pInputDataConfig_
  OutputDataConfig
pOutputDataConfig_
  Text
pDataAccessRoleArn_
  LanguageCode
pLanguageCode_ =
    StartEntitiesDetectionJob' :: Maybe Text
-> Maybe Text
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartEntitiesDetectionJob
StartEntitiesDetectionJob'
      { $sel:entityRecognizerArn:StartEntitiesDetectionJob' :: Maybe Text
entityRecognizerArn =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:jobName:StartEntitiesDetectionJob' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:StartEntitiesDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:volumeKmsKeyId:StartEntitiesDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:StartEntitiesDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:StartEntitiesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:inputDataConfig:StartEntitiesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
        $sel:outputDataConfig:StartEntitiesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
        $sel:dataAccessRoleArn:StartEntitiesDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
        $sel:languageCode:StartEntitiesDetectionJob' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
      }

-- | The Amazon Resource Name (ARN) that identifies the specific entity
-- recognizer to be used by the @StartEntitiesDetectionJob@. This ARN is
-- optional and is only used for a custom entity recognition job.
startEntitiesDetectionJob_entityRecognizerArn :: Lens.Lens' StartEntitiesDetectionJob (Prelude.Maybe Prelude.Text)
startEntitiesDetectionJob_entityRecognizerArn :: (Maybe Text -> f (Maybe Text))
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_entityRecognizerArn = (StartEntitiesDetectionJob -> Maybe Text)
-> (StartEntitiesDetectionJob
    -> Maybe Text -> StartEntitiesDetectionJob)
-> Lens
     StartEntitiesDetectionJob
     StartEntitiesDetectionJob
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Maybe Text
entityRecognizerArn :: Maybe Text
$sel:entityRecognizerArn:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
entityRecognizerArn} -> Maybe Text
entityRecognizerArn) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Maybe Text
a -> StartEntitiesDetectionJob
s {$sel:entityRecognizerArn:StartEntitiesDetectionJob' :: Maybe Text
entityRecognizerArn = Maybe Text
a} :: StartEntitiesDetectionJob)

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

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

-- | 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\"@
startEntitiesDetectionJob_volumeKmsKeyId :: Lens.Lens' StartEntitiesDetectionJob (Prelude.Maybe Prelude.Text)
startEntitiesDetectionJob_volumeKmsKeyId :: (Maybe Text -> f (Maybe Text))
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_volumeKmsKeyId = (StartEntitiesDetectionJob -> Maybe Text)
-> (StartEntitiesDetectionJob
    -> Maybe Text -> StartEntitiesDetectionJob)
-> Lens
     StartEntitiesDetectionJob
     StartEntitiesDetectionJob
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Maybe Text
volumeKmsKeyId :: Maybe Text
$sel:volumeKmsKeyId:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
volumeKmsKeyId} -> Maybe Text
volumeKmsKeyId) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Maybe Text
a -> StartEntitiesDetectionJob
s {$sel:volumeKmsKeyId:StartEntitiesDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
a} :: StartEntitiesDetectionJob)

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

-- | Tags to be associated with the entities 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.
startEntitiesDetectionJob_tags :: Lens.Lens' StartEntitiesDetectionJob (Prelude.Maybe [Tag])
startEntitiesDetectionJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_tags = (StartEntitiesDetectionJob -> Maybe [Tag])
-> (StartEntitiesDetectionJob
    -> Maybe [Tag] -> StartEntitiesDetectionJob)
-> Lens
     StartEntitiesDetectionJob
     StartEntitiesDetectionJob
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Maybe [Tag]
a -> StartEntitiesDetectionJob
s {$sel:tags:StartEntitiesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartEntitiesDetectionJob) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartEntitiesDetectionJob
-> f StartEntitiesDetectionJob
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.
startEntitiesDetectionJob_inputDataConfig :: Lens.Lens' StartEntitiesDetectionJob InputDataConfig
startEntitiesDetectionJob_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_inputDataConfig = (StartEntitiesDetectionJob -> InputDataConfig)
-> (StartEntitiesDetectionJob
    -> InputDataConfig -> StartEntitiesDetectionJob)
-> Lens
     StartEntitiesDetectionJob
     StartEntitiesDetectionJob
     InputDataConfig
     InputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} InputDataConfig
a -> StartEntitiesDetectionJob
s {$sel:inputDataConfig:StartEntitiesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartEntitiesDetectionJob)

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

-- | 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>.
startEntitiesDetectionJob_dataAccessRoleArn :: Lens.Lens' StartEntitiesDetectionJob Prelude.Text
startEntitiesDetectionJob_dataAccessRoleArn :: (Text -> f Text)
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_dataAccessRoleArn = (StartEntitiesDetectionJob -> Text)
-> (StartEntitiesDetectionJob -> Text -> StartEntitiesDetectionJob)
-> Lens
     StartEntitiesDetectionJob StartEntitiesDetectionJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} Text
a -> StartEntitiesDetectionJob
s {$sel:dataAccessRoleArn:StartEntitiesDetectionJob' :: Text
dataAccessRoleArn = Text
a} :: StartEntitiesDetectionJob)

-- | The language of the input documents. All documents must be in the same
-- language. You can specify any of the languages supported by Amazon
-- Comprehend. If custom entities recognition is used, this parameter is
-- ignored and the language used for training the model is used instead.
startEntitiesDetectionJob_languageCode :: Lens.Lens' StartEntitiesDetectionJob LanguageCode
startEntitiesDetectionJob_languageCode :: (LanguageCode -> f LanguageCode)
-> StartEntitiesDetectionJob -> f StartEntitiesDetectionJob
startEntitiesDetectionJob_languageCode = (StartEntitiesDetectionJob -> LanguageCode)
-> (StartEntitiesDetectionJob
    -> LanguageCode -> StartEntitiesDetectionJob)
-> Lens
     StartEntitiesDetectionJob
     StartEntitiesDetectionJob
     LanguageCode
     LanguageCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJob' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: StartEntitiesDetectionJob
s@StartEntitiesDetectionJob' {} LanguageCode
a -> StartEntitiesDetectionJob
s {$sel:languageCode:StartEntitiesDetectionJob' :: LanguageCode
languageCode = LanguageCode
a} :: StartEntitiesDetectionJob)

instance Core.AWSRequest StartEntitiesDetectionJob where
  type
    AWSResponse StartEntitiesDetectionJob =
      StartEntitiesDetectionJobResponse
  request :: StartEntitiesDetectionJob -> Request StartEntitiesDetectionJob
request = Service
-> StartEntitiesDetectionJob -> Request StartEntitiesDetectionJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartEntitiesDetectionJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartEntitiesDetectionJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartEntitiesDetectionJob))
-> Logger
-> Service
-> Proxy StartEntitiesDetectionJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartEntitiesDetectionJob)))
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
-> StartEntitiesDetectionJobResponse
StartEntitiesDetectionJobResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe JobStatus
 -> Int
 -> StartEntitiesDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe JobStatus -> Int -> StartEntitiesDetectionJobResponse)
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 -> StartEntitiesDetectionJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe JobStatus -> Int -> StartEntitiesDetectionJobResponse)
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 -> StartEntitiesDetectionJobResponse)
-> Either String (Maybe JobStatus)
-> Either String (Int -> StartEntitiesDetectionJobResponse)
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 -> StartEntitiesDetectionJobResponse)
-> Either String Int
-> Either String StartEntitiesDetectionJobResponse
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 StartEntitiesDetectionJob

instance Prelude.NFData StartEntitiesDetectionJob

instance Core.ToHeaders StartEntitiesDetectionJob where
  toHeaders :: StartEntitiesDetectionJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartEntitiesDetectionJob -> 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.StartEntitiesDetectionJob" ::
                          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 StartEntitiesDetectionJob where
  toJSON :: StartEntitiesDetectionJob -> Value
toJSON StartEntitiesDetectionJob' {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
entityRecognizerArn :: Maybe Text
$sel:languageCode:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Text
$sel:outputDataConfig:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> InputDataConfig
$sel:tags:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe [Tag]
$sel:clientRequestToken:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
$sel:volumeKmsKeyId:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
$sel:vpcConfig:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe VpcConfig
$sel:jobName:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
$sel:entityRecognizerArn:StartEntitiesDetectionJob' :: StartEntitiesDetectionJob -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EntityRecognizerArn" 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
entityRecognizerArn,
            (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 StartEntitiesDetectionJob where
  toPath :: StartEntitiesDetectionJob -> ByteString
toPath = ByteString -> StartEntitiesDetectionJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newStartEntitiesDetectionJobResponse' smart constructor.
data StartEntitiesDetectionJobResponse = StartEntitiesDetectionJobResponse'
  { -- | The identifier generated for the job. To get the status of job, use this
    -- identifier with the operation.
    StartEntitiesDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the entities 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>:entities-detection-job\/\<job-id>@
    --
    -- The following is an example job ARN:
    --
    -- @arn:aws:comprehend:us-west-2:111122223333:entities-detection-job\/1234abcd12ab34cd56ef1234567890ab@
    StartEntitiesDetectionJobResponse -> 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.
    --
    -- -   STOP_REQUESTED - Amazon Comprehend has received a stop request for
    --     the job and is processing the request.
    --
    -- -   STOPPED - The job was successfully stopped without completing.
    StartEntitiesDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
    -- | The response's http status code.
    StartEntitiesDetectionJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool
(StartEntitiesDetectionJobResponse
 -> StartEntitiesDetectionJobResponse -> Bool)
-> (StartEntitiesDetectionJobResponse
    -> StartEntitiesDetectionJobResponse -> Bool)
-> Eq StartEntitiesDetectionJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool
$c/= :: StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool
== :: StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool
$c== :: StartEntitiesDetectionJobResponse
-> StartEntitiesDetectionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartEntitiesDetectionJobResponse]
ReadPrec StartEntitiesDetectionJobResponse
Int -> ReadS StartEntitiesDetectionJobResponse
ReadS [StartEntitiesDetectionJobResponse]
(Int -> ReadS StartEntitiesDetectionJobResponse)
-> ReadS [StartEntitiesDetectionJobResponse]
-> ReadPrec StartEntitiesDetectionJobResponse
-> ReadPrec [StartEntitiesDetectionJobResponse]
-> Read StartEntitiesDetectionJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartEntitiesDetectionJobResponse]
$creadListPrec :: ReadPrec [StartEntitiesDetectionJobResponse]
readPrec :: ReadPrec StartEntitiesDetectionJobResponse
$creadPrec :: ReadPrec StartEntitiesDetectionJobResponse
readList :: ReadS [StartEntitiesDetectionJobResponse]
$creadList :: ReadS [StartEntitiesDetectionJobResponse]
readsPrec :: Int -> ReadS StartEntitiesDetectionJobResponse
$creadsPrec :: Int -> ReadS StartEntitiesDetectionJobResponse
Prelude.Read, Int -> StartEntitiesDetectionJobResponse -> ShowS
[StartEntitiesDetectionJobResponse] -> ShowS
StartEntitiesDetectionJobResponse -> String
(Int -> StartEntitiesDetectionJobResponse -> ShowS)
-> (StartEntitiesDetectionJobResponse -> String)
-> ([StartEntitiesDetectionJobResponse] -> ShowS)
-> Show StartEntitiesDetectionJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartEntitiesDetectionJobResponse] -> ShowS
$cshowList :: [StartEntitiesDetectionJobResponse] -> ShowS
show :: StartEntitiesDetectionJobResponse -> String
$cshow :: StartEntitiesDetectionJobResponse -> String
showsPrec :: Int -> StartEntitiesDetectionJobResponse -> ShowS
$cshowsPrec :: Int -> StartEntitiesDetectionJobResponse -> ShowS
Prelude.Show, (forall x.
 StartEntitiesDetectionJobResponse
 -> Rep StartEntitiesDetectionJobResponse x)
-> (forall x.
    Rep StartEntitiesDetectionJobResponse x
    -> StartEntitiesDetectionJobResponse)
-> Generic StartEntitiesDetectionJobResponse
forall x.
Rep StartEntitiesDetectionJobResponse x
-> StartEntitiesDetectionJobResponse
forall x.
StartEntitiesDetectionJobResponse
-> Rep StartEntitiesDetectionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartEntitiesDetectionJobResponse x
-> StartEntitiesDetectionJobResponse
$cfrom :: forall x.
StartEntitiesDetectionJobResponse
-> Rep StartEntitiesDetectionJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartEntitiesDetectionJobResponse' 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', 'startEntitiesDetectionJobResponse_jobId' - The identifier generated for the job. To get the status of job, use this
-- identifier with the operation.
--
-- 'jobArn', 'startEntitiesDetectionJobResponse_jobArn' - The Amazon Resource Name (ARN) of the entities 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>:entities-detection-job\/\<job-id>@
--
-- The following is an example job ARN:
--
-- @arn:aws:comprehend:us-west-2:111122223333:entities-detection-job\/1234abcd12ab34cd56ef1234567890ab@
--
-- 'jobStatus', 'startEntitiesDetectionJobResponse_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.
--
-- -   STOP_REQUESTED - Amazon Comprehend has received a stop request for
--     the job and is processing the request.
--
-- -   STOPPED - The job was successfully stopped without completing.
--
-- 'httpStatus', 'startEntitiesDetectionJobResponse_httpStatus' - The response's http status code.
newStartEntitiesDetectionJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartEntitiesDetectionJobResponse
newStartEntitiesDetectionJobResponse :: Int -> StartEntitiesDetectionJobResponse
newStartEntitiesDetectionJobResponse Int
pHttpStatus_ =
  StartEntitiesDetectionJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartEntitiesDetectionJobResponse
StartEntitiesDetectionJobResponse'
    { $sel:jobId:StartEntitiesDetectionJobResponse' :: Maybe Text
jobId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobArn:StartEntitiesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:StartEntitiesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartEntitiesDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The Amazon Resource Name (ARN) of the entities 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>:entities-detection-job\/\<job-id>@
--
-- The following is an example job ARN:
--
-- @arn:aws:comprehend:us-west-2:111122223333:entities-detection-job\/1234abcd12ab34cd56ef1234567890ab@
startEntitiesDetectionJobResponse_jobArn :: Lens.Lens' StartEntitiesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startEntitiesDetectionJobResponse_jobArn :: (Maybe Text -> f (Maybe Text))
-> StartEntitiesDetectionJobResponse
-> f StartEntitiesDetectionJobResponse
startEntitiesDetectionJobResponse_jobArn = (StartEntitiesDetectionJobResponse -> Maybe Text)
-> (StartEntitiesDetectionJobResponse
    -> Maybe Text -> StartEntitiesDetectionJobResponse)
-> Lens
     StartEntitiesDetectionJobResponse
     StartEntitiesDetectionJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJobResponse' {Maybe Text
jobArn :: Maybe Text
$sel:jobArn:StartEntitiesDetectionJobResponse' :: StartEntitiesDetectionJobResponse -> Maybe Text
jobArn} -> Maybe Text
jobArn) (\s :: StartEntitiesDetectionJobResponse
s@StartEntitiesDetectionJobResponse' {} Maybe Text
a -> StartEntitiesDetectionJobResponse
s {$sel:jobArn:StartEntitiesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
a} :: StartEntitiesDetectionJobResponse)

-- | 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.
--
-- -   STOP_REQUESTED - Amazon Comprehend has received a stop request for
--     the job and is processing the request.
--
-- -   STOPPED - The job was successfully stopped without completing.
startEntitiesDetectionJobResponse_jobStatus :: Lens.Lens' StartEntitiesDetectionJobResponse (Prelude.Maybe JobStatus)
startEntitiesDetectionJobResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartEntitiesDetectionJobResponse
-> f StartEntitiesDetectionJobResponse
startEntitiesDetectionJobResponse_jobStatus = (StartEntitiesDetectionJobResponse -> Maybe JobStatus)
-> (StartEntitiesDetectionJobResponse
    -> Maybe JobStatus -> StartEntitiesDetectionJobResponse)
-> Lens
     StartEntitiesDetectionJobResponse
     StartEntitiesDetectionJobResponse
     (Maybe JobStatus)
     (Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartEntitiesDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartEntitiesDetectionJobResponse' :: StartEntitiesDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartEntitiesDetectionJobResponse
s@StartEntitiesDetectionJobResponse' {} Maybe JobStatus
a -> StartEntitiesDetectionJobResponse
s {$sel:jobStatus:StartEntitiesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartEntitiesDetectionJobResponse)

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

instance
  Prelude.NFData
    StartEntitiesDetectionJobResponse