{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_clientRequestToken,
    startEntitiesDetectionJob_entityRecognizerArn,
    startEntitiesDetectionJob_jobName,
    startEntitiesDetectionJob_tags,
    startEntitiesDetectionJob_volumeKmsKeyId,
    startEntitiesDetectionJob_vpcConfig,
    startEntitiesDetectionJob_inputDataConfig,
    startEntitiesDetectionJob_outputDataConfig,
    startEntitiesDetectionJob_dataAccessRoleArn,
    startEntitiesDetectionJob_languageCode,

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

    -- * Response Lenses
    startEntitiesDetectionJobResponse_jobArn,
    startEntitiesDetectionJobResponse_jobId,
    startEntitiesDetectionJobResponse_jobStatus,
    startEntitiesDetectionJobResponse_httpStatus,
  )
where

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

-- | /See:/ 'newStartEntitiesDetectionJob' smart constructor.
data StartEntitiesDetectionJob = StartEntitiesDetectionJob'
  { -- | 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,
    -- | 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,
    -- | 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],
    -- | 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,
    -- | 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,
    -- | 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
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]
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
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.
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:
--
-- 'clientRequestToken', 'startEntitiesDetectionJob_clientRequestToken' - A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
--
-- '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.
--
-- '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.
--
-- '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\"@
--
-- '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>.
--
-- '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'
      { $sel:clientRequestToken:StartEntitiesDetectionJob' :: Maybe Text
clientRequestToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:entityRecognizerArn:StartEntitiesDetectionJob' :: Maybe Text
entityRecognizerArn = forall a. Maybe a
Prelude.Nothing,
        $sel:jobName:StartEntitiesDetectionJob' :: Maybe Text
jobName = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:StartEntitiesDetectionJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:volumeKmsKeyId:StartEntitiesDetectionJob' :: Maybe Text
volumeKmsKeyId = forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:StartEntitiesDetectionJob' :: Maybe VpcConfig
vpcConfig = 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_
      }

-- | 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 :: Lens' StartEntitiesDetectionJob (Maybe Text)
startEntitiesDetectionJob_clientRequestToken = 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)

-- | 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 :: Lens' StartEntitiesDetectionJob (Maybe Text)
startEntitiesDetectionJob_entityRecognizerArn = 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 :: Lens' StartEntitiesDetectionJob (Maybe Text)
startEntitiesDetectionJob_jobName = 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)

-- | 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 :: Lens' StartEntitiesDetectionJob (Maybe [Tag])
startEntitiesDetectionJob_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | 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 :: Lens' StartEntitiesDetectionJob (Maybe VpcConfig)
startEntitiesDetectionJob_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)

-- | Specifies the format and location of the input data for the job.
startEntitiesDetectionJob_inputDataConfig :: Lens.Lens' StartEntitiesDetectionJob InputDataConfig
startEntitiesDetectionJob_inputDataConfig :: Lens' StartEntitiesDetectionJob InputDataConfig
startEntitiesDetectionJob_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 :: Lens' StartEntitiesDetectionJob OutputDataConfig
startEntitiesDetectionJob_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 :: Lens' StartEntitiesDetectionJob Text
startEntitiesDetectionJob_dataAccessRoleArn = 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 :: Lens' StartEntitiesDetectionJob LanguageCode
startEntitiesDetectionJob_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 :: (Service -> Service)
-> StartEntitiesDetectionJob -> Request StartEntitiesDetectionJob
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy StartEntitiesDetectionJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartEntitiesDetectionJob)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartEntitiesDetectionJobResponse
StartEntitiesDetectionJobResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

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

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

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

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

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

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

-- | /See:/ 'newStartEntitiesDetectionJobResponse' smart constructor.
data StartEntitiesDetectionJobResponse = 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 -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
    -- | 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 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
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]
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
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.
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:
--
-- '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@
--
-- 'jobId', 'startEntitiesDetectionJobResponse_jobId' - The identifier generated for the job. To get the status of job, use this
-- identifier with the operation.
--
-- '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'
    { $sel:jobArn:StartEntitiesDetectionJobResponse' :: Maybe Text
jobArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:StartEntitiesDetectionJobResponse' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:StartEntitiesDetectionJobResponse' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartEntitiesDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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 :: Lens' StartEntitiesDetectionJobResponse (Maybe Text)
startEntitiesDetectionJobResponse_jobArn = 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 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 :: Lens' StartEntitiesDetectionJobResponse (Maybe Text)
startEntitiesDetectionJobResponse_jobId = 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 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 :: Lens' StartEntitiesDetectionJobResponse (Maybe JobStatus)
startEntitiesDetectionJobResponse_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 :: Lens' StartEntitiesDetectionJobResponse Int
startEntitiesDetectionJobResponse_httpStatus = 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
  where
  rnf :: StartEntitiesDetectionJobResponse -> ()
rnf StartEntitiesDetectionJobResponse' {Int
Maybe Text
Maybe JobStatus
httpStatus :: Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
jobArn :: Maybe Text
$sel:httpStatus:StartEntitiesDetectionJobResponse' :: StartEntitiesDetectionJobResponse -> Int
$sel:jobStatus:StartEntitiesDetectionJobResponse' :: StartEntitiesDetectionJobResponse -> Maybe JobStatus
$sel:jobId:StartEntitiesDetectionJobResponse' :: StartEntitiesDetectionJobResponse -> Maybe Text
$sel:jobArn:StartEntitiesDetectionJobResponse' :: StartEntitiesDetectionJobResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobStatus
jobStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus