{-# 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.StartPiiEntitiesDetectionJob
-- 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 PII entity detection job for a collection of
-- documents.
module Amazonka.Comprehend.StartPiiEntitiesDetectionJob
  ( -- * Creating a Request
    StartPiiEntitiesDetectionJob (..),
    newStartPiiEntitiesDetectionJob,

    -- * Request Lenses
    startPiiEntitiesDetectionJob_jobName,
    startPiiEntitiesDetectionJob_redactionConfig,
    startPiiEntitiesDetectionJob_clientRequestToken,
    startPiiEntitiesDetectionJob_tags,
    startPiiEntitiesDetectionJob_inputDataConfig,
    startPiiEntitiesDetectionJob_outputDataConfig,
    startPiiEntitiesDetectionJob_mode,
    startPiiEntitiesDetectionJob_dataAccessRoleArn,
    startPiiEntitiesDetectionJob_languageCode,

    -- * Destructuring the Response
    StartPiiEntitiesDetectionJobResponse (..),
    newStartPiiEntitiesDetectionJobResponse,

    -- * Response Lenses
    startPiiEntitiesDetectionJobResponse_jobId,
    startPiiEntitiesDetectionJobResponse_jobArn,
    startPiiEntitiesDetectionJobResponse_jobStatus,
    startPiiEntitiesDetectionJobResponse_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:/ 'newStartPiiEntitiesDetectionJob' smart constructor.
data StartPiiEntitiesDetectionJob = StartPiiEntitiesDetectionJob'
  { -- | The identifier of the job.
    StartPiiEntitiesDetectionJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | Provides configuration parameters for PII entity redaction.
    --
    -- This parameter is required if you set the @Mode@ parameter to
    -- @ONLY_REDACTION@. In that case, you must provide a @RedactionConfig@
    -- definition that includes the @PiiEntityTypes@ parameter.
    StartPiiEntitiesDetectionJob -> Maybe RedactionConfig
redactionConfig :: Prelude.Maybe RedactionConfig,
    -- | A unique identifier for the request. If you don\'t set the client
    -- request token, Amazon Comprehend generates one.
    StartPiiEntitiesDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Tags to be associated with the PII 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.
    StartPiiEntitiesDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The input properties for a PII entities detection job.
    StartPiiEntitiesDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
    -- | Provides configuration parameters for the output of PII entity detection
    -- jobs.
    StartPiiEntitiesDetectionJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
    -- | Specifies whether the output provides the locations (offsets) of PII
    -- entities or a file in which PII entities are redacted.
    StartPiiEntitiesDetectionJob -> PiiEntitiesDetectionMode
mode :: PiiEntitiesDetectionMode,
    -- | The Amazon Resource Name (ARN) of the AWS Identity and Access Management
    -- (IAM) role that grants Amazon Comprehend read access to your input data.
    StartPiiEntitiesDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
    -- | The language of the input documents.
    StartPiiEntitiesDetectionJob -> LanguageCode
languageCode :: LanguageCode
  }
  deriving (StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool
(StartPiiEntitiesDetectionJob
 -> StartPiiEntitiesDetectionJob -> Bool)
-> (StartPiiEntitiesDetectionJob
    -> StartPiiEntitiesDetectionJob -> Bool)
-> Eq StartPiiEntitiesDetectionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool
$c/= :: StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool
== :: StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool
$c== :: StartPiiEntitiesDetectionJob
-> StartPiiEntitiesDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartPiiEntitiesDetectionJob]
ReadPrec StartPiiEntitiesDetectionJob
Int -> ReadS StartPiiEntitiesDetectionJob
ReadS [StartPiiEntitiesDetectionJob]
(Int -> ReadS StartPiiEntitiesDetectionJob)
-> ReadS [StartPiiEntitiesDetectionJob]
-> ReadPrec StartPiiEntitiesDetectionJob
-> ReadPrec [StartPiiEntitiesDetectionJob]
-> Read StartPiiEntitiesDetectionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartPiiEntitiesDetectionJob]
$creadListPrec :: ReadPrec [StartPiiEntitiesDetectionJob]
readPrec :: ReadPrec StartPiiEntitiesDetectionJob
$creadPrec :: ReadPrec StartPiiEntitiesDetectionJob
readList :: ReadS [StartPiiEntitiesDetectionJob]
$creadList :: ReadS [StartPiiEntitiesDetectionJob]
readsPrec :: Int -> ReadS StartPiiEntitiesDetectionJob
$creadsPrec :: Int -> ReadS StartPiiEntitiesDetectionJob
Prelude.Read, Int -> StartPiiEntitiesDetectionJob -> ShowS
[StartPiiEntitiesDetectionJob] -> ShowS
StartPiiEntitiesDetectionJob -> String
(Int -> StartPiiEntitiesDetectionJob -> ShowS)
-> (StartPiiEntitiesDetectionJob -> String)
-> ([StartPiiEntitiesDetectionJob] -> ShowS)
-> Show StartPiiEntitiesDetectionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartPiiEntitiesDetectionJob] -> ShowS
$cshowList :: [StartPiiEntitiesDetectionJob] -> ShowS
show :: StartPiiEntitiesDetectionJob -> String
$cshow :: StartPiiEntitiesDetectionJob -> String
showsPrec :: Int -> StartPiiEntitiesDetectionJob -> ShowS
$cshowsPrec :: Int -> StartPiiEntitiesDetectionJob -> ShowS
Prelude.Show, (forall x.
 StartPiiEntitiesDetectionJob -> Rep StartPiiEntitiesDetectionJob x)
-> (forall x.
    Rep StartPiiEntitiesDetectionJob x -> StartPiiEntitiesDetectionJob)
-> Generic StartPiiEntitiesDetectionJob
forall x.
Rep StartPiiEntitiesDetectionJob x -> StartPiiEntitiesDetectionJob
forall x.
StartPiiEntitiesDetectionJob -> Rep StartPiiEntitiesDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartPiiEntitiesDetectionJob x -> StartPiiEntitiesDetectionJob
$cfrom :: forall x.
StartPiiEntitiesDetectionJob -> Rep StartPiiEntitiesDetectionJob x
Prelude.Generic)

-- |
-- Create a value of 'StartPiiEntitiesDetectionJob' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'jobName', 'startPiiEntitiesDetectionJob_jobName' - The identifier of the job.
--
-- 'redactionConfig', 'startPiiEntitiesDetectionJob_redactionConfig' - Provides configuration parameters for PII entity redaction.
--
-- This parameter is required if you set the @Mode@ parameter to
-- @ONLY_REDACTION@. In that case, you must provide a @RedactionConfig@
-- definition that includes the @PiiEntityTypes@ parameter.
--
-- 'clientRequestToken', 'startPiiEntitiesDetectionJob_clientRequestToken' - A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
--
-- 'tags', 'startPiiEntitiesDetectionJob_tags' - Tags to be associated with the PII 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', 'startPiiEntitiesDetectionJob_inputDataConfig' - The input properties for a PII entities detection job.
--
-- 'outputDataConfig', 'startPiiEntitiesDetectionJob_outputDataConfig' - Provides configuration parameters for the output of PII entity detection
-- jobs.
--
-- 'mode', 'startPiiEntitiesDetectionJob_mode' - Specifies whether the output provides the locations (offsets) of PII
-- entities or a file in which PII entities are redacted.
--
-- 'dataAccessRoleArn', 'startPiiEntitiesDetectionJob_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.
--
-- 'languageCode', 'startPiiEntitiesDetectionJob_languageCode' - The language of the input documents.
newStartPiiEntitiesDetectionJob ::
  -- | 'inputDataConfig'
  InputDataConfig ->
  -- | 'outputDataConfig'
  OutputDataConfig ->
  -- | 'mode'
  PiiEntitiesDetectionMode ->
  -- | 'dataAccessRoleArn'
  Prelude.Text ->
  -- | 'languageCode'
  LanguageCode ->
  StartPiiEntitiesDetectionJob
newStartPiiEntitiesDetectionJob :: InputDataConfig
-> OutputDataConfig
-> PiiEntitiesDetectionMode
-> Text
-> LanguageCode
-> StartPiiEntitiesDetectionJob
newStartPiiEntitiesDetectionJob
  InputDataConfig
pInputDataConfig_
  OutputDataConfig
pOutputDataConfig_
  PiiEntitiesDetectionMode
pMode_
  Text
pDataAccessRoleArn_
  LanguageCode
pLanguageCode_ =
    StartPiiEntitiesDetectionJob' :: Maybe Text
-> Maybe RedactionConfig
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> PiiEntitiesDetectionMode
-> Text
-> LanguageCode
-> StartPiiEntitiesDetectionJob
StartPiiEntitiesDetectionJob'
      { $sel:jobName:StartPiiEntitiesDetectionJob' :: Maybe Text
jobName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:redactionConfig:StartPiiEntitiesDetectionJob' :: Maybe RedactionConfig
redactionConfig = Maybe RedactionConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:StartPiiEntitiesDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:StartPiiEntitiesDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:inputDataConfig:StartPiiEntitiesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
        $sel:outputDataConfig:StartPiiEntitiesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
        $sel:mode:StartPiiEntitiesDetectionJob' :: PiiEntitiesDetectionMode
mode = PiiEntitiesDetectionMode
pMode_,
        $sel:dataAccessRoleArn:StartPiiEntitiesDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
        $sel:languageCode:StartPiiEntitiesDetectionJob' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
      }

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

-- | Provides configuration parameters for PII entity redaction.
--
-- This parameter is required if you set the @Mode@ parameter to
-- @ONLY_REDACTION@. In that case, you must provide a @RedactionConfig@
-- definition that includes the @PiiEntityTypes@ parameter.
startPiiEntitiesDetectionJob_redactionConfig :: Lens.Lens' StartPiiEntitiesDetectionJob (Prelude.Maybe RedactionConfig)
startPiiEntitiesDetectionJob_redactionConfig :: (Maybe RedactionConfig -> f (Maybe RedactionConfig))
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_redactionConfig = (StartPiiEntitiesDetectionJob -> Maybe RedactionConfig)
-> (StartPiiEntitiesDetectionJob
    -> Maybe RedactionConfig -> StartPiiEntitiesDetectionJob)
-> Lens
     StartPiiEntitiesDetectionJob
     StartPiiEntitiesDetectionJob
     (Maybe RedactionConfig)
     (Maybe RedactionConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {Maybe RedactionConfig
redactionConfig :: Maybe RedactionConfig
$sel:redactionConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe RedactionConfig
redactionConfig} -> Maybe RedactionConfig
redactionConfig) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} Maybe RedactionConfig
a -> StartPiiEntitiesDetectionJob
s {$sel:redactionConfig:StartPiiEntitiesDetectionJob' :: Maybe RedactionConfig
redactionConfig = Maybe RedactionConfig
a} :: StartPiiEntitiesDetectionJob)

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

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

-- | The input properties for a PII entities detection job.
startPiiEntitiesDetectionJob_inputDataConfig :: Lens.Lens' StartPiiEntitiesDetectionJob InputDataConfig
startPiiEntitiesDetectionJob_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_inputDataConfig = (StartPiiEntitiesDetectionJob -> InputDataConfig)
-> (StartPiiEntitiesDetectionJob
    -> InputDataConfig -> StartPiiEntitiesDetectionJob)
-> Lens
     StartPiiEntitiesDetectionJob
     StartPiiEntitiesDetectionJob
     InputDataConfig
     InputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} InputDataConfig
a -> StartPiiEntitiesDetectionJob
s {$sel:inputDataConfig:StartPiiEntitiesDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartPiiEntitiesDetectionJob)

-- | Provides configuration parameters for the output of PII entity detection
-- jobs.
startPiiEntitiesDetectionJob_outputDataConfig :: Lens.Lens' StartPiiEntitiesDetectionJob OutputDataConfig
startPiiEntitiesDetectionJob_outputDataConfig :: (OutputDataConfig -> f OutputDataConfig)
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_outputDataConfig = (StartPiiEntitiesDetectionJob -> OutputDataConfig)
-> (StartPiiEntitiesDetectionJob
    -> OutputDataConfig -> StartPiiEntitiesDetectionJob)
-> Lens
     StartPiiEntitiesDetectionJob
     StartPiiEntitiesDetectionJob
     OutputDataConfig
     OutputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} OutputDataConfig
a -> StartPiiEntitiesDetectionJob
s {$sel:outputDataConfig:StartPiiEntitiesDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartPiiEntitiesDetectionJob)

-- | Specifies whether the output provides the locations (offsets) of PII
-- entities or a file in which PII entities are redacted.
startPiiEntitiesDetectionJob_mode :: Lens.Lens' StartPiiEntitiesDetectionJob PiiEntitiesDetectionMode
startPiiEntitiesDetectionJob_mode :: (PiiEntitiesDetectionMode -> f PiiEntitiesDetectionMode)
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_mode = (StartPiiEntitiesDetectionJob -> PiiEntitiesDetectionMode)
-> (StartPiiEntitiesDetectionJob
    -> PiiEntitiesDetectionMode -> StartPiiEntitiesDetectionJob)
-> Lens
     StartPiiEntitiesDetectionJob
     StartPiiEntitiesDetectionJob
     PiiEntitiesDetectionMode
     PiiEntitiesDetectionMode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {PiiEntitiesDetectionMode
mode :: PiiEntitiesDetectionMode
$sel:mode:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> PiiEntitiesDetectionMode
mode} -> PiiEntitiesDetectionMode
mode) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} PiiEntitiesDetectionMode
a -> StartPiiEntitiesDetectionJob
s {$sel:mode:StartPiiEntitiesDetectionJob' :: PiiEntitiesDetectionMode
mode = PiiEntitiesDetectionMode
a} :: StartPiiEntitiesDetectionJob)

-- | The Amazon Resource Name (ARN) of the AWS Identity and Access Management
-- (IAM) role that grants Amazon Comprehend read access to your input data.
startPiiEntitiesDetectionJob_dataAccessRoleArn :: Lens.Lens' StartPiiEntitiesDetectionJob Prelude.Text
startPiiEntitiesDetectionJob_dataAccessRoleArn :: (Text -> f Text)
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_dataAccessRoleArn = (StartPiiEntitiesDetectionJob -> Text)
-> (StartPiiEntitiesDetectionJob
    -> Text -> StartPiiEntitiesDetectionJob)
-> Lens
     StartPiiEntitiesDetectionJob StartPiiEntitiesDetectionJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} Text
a -> StartPiiEntitiesDetectionJob
s {$sel:dataAccessRoleArn:StartPiiEntitiesDetectionJob' :: Text
dataAccessRoleArn = Text
a} :: StartPiiEntitiesDetectionJob)

-- | The language of the input documents.
startPiiEntitiesDetectionJob_languageCode :: Lens.Lens' StartPiiEntitiesDetectionJob LanguageCode
startPiiEntitiesDetectionJob_languageCode :: (LanguageCode -> f LanguageCode)
-> StartPiiEntitiesDetectionJob -> f StartPiiEntitiesDetectionJob
startPiiEntitiesDetectionJob_languageCode = (StartPiiEntitiesDetectionJob -> LanguageCode)
-> (StartPiiEntitiesDetectionJob
    -> LanguageCode -> StartPiiEntitiesDetectionJob)
-> Lens
     StartPiiEntitiesDetectionJob
     StartPiiEntitiesDetectionJob
     LanguageCode
     LanguageCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJob' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: StartPiiEntitiesDetectionJob
s@StartPiiEntitiesDetectionJob' {} LanguageCode
a -> StartPiiEntitiesDetectionJob
s {$sel:languageCode:StartPiiEntitiesDetectionJob' :: LanguageCode
languageCode = LanguageCode
a} :: StartPiiEntitiesDetectionJob)

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

instance Prelude.NFData StartPiiEntitiesDetectionJob

instance Core.ToHeaders StartPiiEntitiesDetectionJob where
  toHeaders :: StartPiiEntitiesDetectionJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartPiiEntitiesDetectionJob -> 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.StartPiiEntitiesDetectionJob" ::
                          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 StartPiiEntitiesDetectionJob where
  toJSON :: StartPiiEntitiesDetectionJob -> Value
toJSON StartPiiEntitiesDetectionJob' {Maybe [Tag]
Maybe Text
Maybe RedactionConfig
Text
InputDataConfig
LanguageCode
OutputDataConfig
PiiEntitiesDetectionMode
languageCode :: LanguageCode
dataAccessRoleArn :: Text
mode :: PiiEntitiesDetectionMode
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
tags :: Maybe [Tag]
clientRequestToken :: Maybe Text
redactionConfig :: Maybe RedactionConfig
jobName :: Maybe Text
$sel:languageCode:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> LanguageCode
$sel:dataAccessRoleArn:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Text
$sel:mode:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> PiiEntitiesDetectionMode
$sel:outputDataConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> OutputDataConfig
$sel:inputDataConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> InputDataConfig
$sel:tags:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe [Tag]
$sel:clientRequestToken:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe Text
$sel:redactionConfig:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe RedactionConfig
$sel:jobName:StartPiiEntitiesDetectionJob' :: StartPiiEntitiesDetectionJob -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"JobName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
jobName,
            (Text
"RedactionConfig" Text -> RedactionConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RedactionConfig -> Pair) -> Maybe RedactionConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedactionConfig
redactionConfig,
            (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
"Mode" Text -> PiiEntitiesDetectionMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PiiEntitiesDetectionMode
mode),
            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 StartPiiEntitiesDetectionJob where
  toPath :: StartPiiEntitiesDetectionJob -> ByteString
toPath = ByteString -> StartPiiEntitiesDetectionJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newStartPiiEntitiesDetectionJobResponse' smart constructor.
data StartPiiEntitiesDetectionJobResponse = StartPiiEntitiesDetectionJobResponse'
  { -- | The identifier generated for the job.
    StartPiiEntitiesDetectionJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the PII entity 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>:pii-entities-detection-job\/\<job-id>@
    --
    -- The following is an example job ARN:
    --
    -- @arn:aws:comprehend:us-west-2:111122223333:pii-entities-detection-job\/1234abcd12ab34cd56ef1234567890ab@
    StartPiiEntitiesDetectionJobResponse -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
    -- | The status of the job.
    StartPiiEntitiesDetectionJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
    -- | The response's http status code.
    StartPiiEntitiesDetectionJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool
(StartPiiEntitiesDetectionJobResponse
 -> StartPiiEntitiesDetectionJobResponse -> Bool)
-> (StartPiiEntitiesDetectionJobResponse
    -> StartPiiEntitiesDetectionJobResponse -> Bool)
-> Eq StartPiiEntitiesDetectionJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool
$c/= :: StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool
== :: StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool
$c== :: StartPiiEntitiesDetectionJobResponse
-> StartPiiEntitiesDetectionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartPiiEntitiesDetectionJobResponse]
ReadPrec StartPiiEntitiesDetectionJobResponse
Int -> ReadS StartPiiEntitiesDetectionJobResponse
ReadS [StartPiiEntitiesDetectionJobResponse]
(Int -> ReadS StartPiiEntitiesDetectionJobResponse)
-> ReadS [StartPiiEntitiesDetectionJobResponse]
-> ReadPrec StartPiiEntitiesDetectionJobResponse
-> ReadPrec [StartPiiEntitiesDetectionJobResponse]
-> Read StartPiiEntitiesDetectionJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartPiiEntitiesDetectionJobResponse]
$creadListPrec :: ReadPrec [StartPiiEntitiesDetectionJobResponse]
readPrec :: ReadPrec StartPiiEntitiesDetectionJobResponse
$creadPrec :: ReadPrec StartPiiEntitiesDetectionJobResponse
readList :: ReadS [StartPiiEntitiesDetectionJobResponse]
$creadList :: ReadS [StartPiiEntitiesDetectionJobResponse]
readsPrec :: Int -> ReadS StartPiiEntitiesDetectionJobResponse
$creadsPrec :: Int -> ReadS StartPiiEntitiesDetectionJobResponse
Prelude.Read, Int -> StartPiiEntitiesDetectionJobResponse -> ShowS
[StartPiiEntitiesDetectionJobResponse] -> ShowS
StartPiiEntitiesDetectionJobResponse -> String
(Int -> StartPiiEntitiesDetectionJobResponse -> ShowS)
-> (StartPiiEntitiesDetectionJobResponse -> String)
-> ([StartPiiEntitiesDetectionJobResponse] -> ShowS)
-> Show StartPiiEntitiesDetectionJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartPiiEntitiesDetectionJobResponse] -> ShowS
$cshowList :: [StartPiiEntitiesDetectionJobResponse] -> ShowS
show :: StartPiiEntitiesDetectionJobResponse -> String
$cshow :: StartPiiEntitiesDetectionJobResponse -> String
showsPrec :: Int -> StartPiiEntitiesDetectionJobResponse -> ShowS
$cshowsPrec :: Int -> StartPiiEntitiesDetectionJobResponse -> ShowS
Prelude.Show, (forall x.
 StartPiiEntitiesDetectionJobResponse
 -> Rep StartPiiEntitiesDetectionJobResponse x)
-> (forall x.
    Rep StartPiiEntitiesDetectionJobResponse x
    -> StartPiiEntitiesDetectionJobResponse)
-> Generic StartPiiEntitiesDetectionJobResponse
forall x.
Rep StartPiiEntitiesDetectionJobResponse x
-> StartPiiEntitiesDetectionJobResponse
forall x.
StartPiiEntitiesDetectionJobResponse
-> Rep StartPiiEntitiesDetectionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartPiiEntitiesDetectionJobResponse x
-> StartPiiEntitiesDetectionJobResponse
$cfrom :: forall x.
StartPiiEntitiesDetectionJobResponse
-> Rep StartPiiEntitiesDetectionJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartPiiEntitiesDetectionJobResponse' 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', 'startPiiEntitiesDetectionJobResponse_jobId' - The identifier generated for the job.
--
-- 'jobArn', 'startPiiEntitiesDetectionJobResponse_jobArn' - The Amazon Resource Name (ARN) of the PII entity 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>:pii-entities-detection-job\/\<job-id>@
--
-- The following is an example job ARN:
--
-- @arn:aws:comprehend:us-west-2:111122223333:pii-entities-detection-job\/1234abcd12ab34cd56ef1234567890ab@
--
-- 'jobStatus', 'startPiiEntitiesDetectionJobResponse_jobStatus' - The status of the job.
--
-- 'httpStatus', 'startPiiEntitiesDetectionJobResponse_httpStatus' - The response's http status code.
newStartPiiEntitiesDetectionJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartPiiEntitiesDetectionJobResponse
newStartPiiEntitiesDetectionJobResponse :: Int -> StartPiiEntitiesDetectionJobResponse
newStartPiiEntitiesDetectionJobResponse Int
pHttpStatus_ =
  StartPiiEntitiesDetectionJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartPiiEntitiesDetectionJobResponse
StartPiiEntitiesDetectionJobResponse'
    { $sel:jobId:StartPiiEntitiesDetectionJobResponse' :: Maybe Text
jobId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobArn:StartPiiEntitiesDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:StartPiiEntitiesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartPiiEntitiesDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier generated for the job.
startPiiEntitiesDetectionJobResponse_jobId :: Lens.Lens' StartPiiEntitiesDetectionJobResponse (Prelude.Maybe Prelude.Text)
startPiiEntitiesDetectionJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> StartPiiEntitiesDetectionJobResponse
-> f StartPiiEntitiesDetectionJobResponse
startPiiEntitiesDetectionJobResponse_jobId = (StartPiiEntitiesDetectionJobResponse -> Maybe Text)
-> (StartPiiEntitiesDetectionJobResponse
    -> Maybe Text -> StartPiiEntitiesDetectionJobResponse)
-> Lens
     StartPiiEntitiesDetectionJobResponse
     StartPiiEntitiesDetectionJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartPiiEntitiesDetectionJobResponse' :: StartPiiEntitiesDetectionJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartPiiEntitiesDetectionJobResponse
s@StartPiiEntitiesDetectionJobResponse' {} Maybe Text
a -> StartPiiEntitiesDetectionJobResponse
s {$sel:jobId:StartPiiEntitiesDetectionJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartPiiEntitiesDetectionJobResponse)

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

-- | The status of the job.
startPiiEntitiesDetectionJobResponse_jobStatus :: Lens.Lens' StartPiiEntitiesDetectionJobResponse (Prelude.Maybe JobStatus)
startPiiEntitiesDetectionJobResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartPiiEntitiesDetectionJobResponse
-> f StartPiiEntitiesDetectionJobResponse
startPiiEntitiesDetectionJobResponse_jobStatus = (StartPiiEntitiesDetectionJobResponse -> Maybe JobStatus)
-> (StartPiiEntitiesDetectionJobResponse
    -> Maybe JobStatus -> StartPiiEntitiesDetectionJobResponse)
-> Lens
     StartPiiEntitiesDetectionJobResponse
     StartPiiEntitiesDetectionJobResponse
     (Maybe JobStatus)
     (Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPiiEntitiesDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartPiiEntitiesDetectionJobResponse' :: StartPiiEntitiesDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartPiiEntitiesDetectionJobResponse
s@StartPiiEntitiesDetectionJobResponse' {} Maybe JobStatus
a -> StartPiiEntitiesDetectionJobResponse
s {$sel:jobStatus:StartPiiEntitiesDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartPiiEntitiesDetectionJobResponse)

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

instance
  Prelude.NFData
    StartPiiEntitiesDetectionJobResponse