{-# 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.StartTopicsDetectionJob
-- 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 topic detection job. Use the
-- @DescribeTopicDetectionJob@ operation to track the status of a job.
module Amazonka.Comprehend.StartTopicsDetectionJob
  ( -- * Creating a Request
    StartTopicsDetectionJob (..),
    newStartTopicsDetectionJob,

    -- * Request Lenses
    startTopicsDetectionJob_jobName,
    startTopicsDetectionJob_vpcConfig,
    startTopicsDetectionJob_volumeKmsKeyId,
    startTopicsDetectionJob_numberOfTopics,
    startTopicsDetectionJob_clientRequestToken,
    startTopicsDetectionJob_tags,
    startTopicsDetectionJob_inputDataConfig,
    startTopicsDetectionJob_outputDataConfig,
    startTopicsDetectionJob_dataAccessRoleArn,

    -- * Destructuring the Response
    StartTopicsDetectionJobResponse (..),
    newStartTopicsDetectionJobResponse,

    -- * Response Lenses
    startTopicsDetectionJobResponse_jobId,
    startTopicsDetectionJobResponse_jobArn,
    startTopicsDetectionJobResponse_jobStatus,
    startTopicsDetectionJobResponse_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:/ 'newStartTopicsDetectionJob' smart constructor.
data StartTopicsDetectionJob = StartTopicsDetectionJob'
  { -- | The identifier of the job.
    StartTopicsDetectionJob -> 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 topic detection
    -- job. For more information, see
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
    StartTopicsDetectionJob -> 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\"@
    StartTopicsDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The number of topics to detect.
    StartTopicsDetectionJob -> Maybe Natural
numberOfTopics :: Prelude.Maybe Prelude.Natural,
    -- | A unique identifier for the request. If you do not set the client
    -- request token, Amazon Comprehend generates one.
    StartTopicsDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Tags to be associated with the topics 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.
    StartTopicsDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | Specifies the format and location of the input data for the job.
    StartTopicsDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
    -- | Specifies where to send the output files. The output is a compressed
    -- archive with two files, @topic-terms.csv@ that lists the terms
    -- associated with each topic, and @doc-topics.csv@ that lists the
    -- documents associated with each topic
    StartTopicsDetectionJob -> 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>.
    StartTopicsDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text
  }
  deriving (StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
(StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool)
-> (StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool)
-> Eq StartTopicsDetectionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
$c/= :: StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
== :: StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
$c== :: StartTopicsDetectionJob -> StartTopicsDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartTopicsDetectionJob]
ReadPrec StartTopicsDetectionJob
Int -> ReadS StartTopicsDetectionJob
ReadS [StartTopicsDetectionJob]
(Int -> ReadS StartTopicsDetectionJob)
-> ReadS [StartTopicsDetectionJob]
-> ReadPrec StartTopicsDetectionJob
-> ReadPrec [StartTopicsDetectionJob]
-> Read StartTopicsDetectionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartTopicsDetectionJob]
$creadListPrec :: ReadPrec [StartTopicsDetectionJob]
readPrec :: ReadPrec StartTopicsDetectionJob
$creadPrec :: ReadPrec StartTopicsDetectionJob
readList :: ReadS [StartTopicsDetectionJob]
$creadList :: ReadS [StartTopicsDetectionJob]
readsPrec :: Int -> ReadS StartTopicsDetectionJob
$creadsPrec :: Int -> ReadS StartTopicsDetectionJob
Prelude.Read, Int -> StartTopicsDetectionJob -> ShowS
[StartTopicsDetectionJob] -> ShowS
StartTopicsDetectionJob -> String
(Int -> StartTopicsDetectionJob -> ShowS)
-> (StartTopicsDetectionJob -> String)
-> ([StartTopicsDetectionJob] -> ShowS)
-> Show StartTopicsDetectionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartTopicsDetectionJob] -> ShowS
$cshowList :: [StartTopicsDetectionJob] -> ShowS
show :: StartTopicsDetectionJob -> String
$cshow :: StartTopicsDetectionJob -> String
showsPrec :: Int -> StartTopicsDetectionJob -> ShowS
$cshowsPrec :: Int -> StartTopicsDetectionJob -> ShowS
Prelude.Show, (forall x.
 StartTopicsDetectionJob -> Rep StartTopicsDetectionJob x)
-> (forall x.
    Rep StartTopicsDetectionJob x -> StartTopicsDetectionJob)
-> Generic StartTopicsDetectionJob
forall x. Rep StartTopicsDetectionJob x -> StartTopicsDetectionJob
forall x. StartTopicsDetectionJob -> Rep StartTopicsDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartTopicsDetectionJob x -> StartTopicsDetectionJob
$cfrom :: forall x. StartTopicsDetectionJob -> Rep StartTopicsDetectionJob x
Prelude.Generic)

-- |
-- Create a value of 'StartTopicsDetectionJob' 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', 'startTopicsDetectionJob_jobName' - The identifier of the job.
--
-- 'vpcConfig', 'startTopicsDetectionJob_vpcConfig' - Configuration parameters for an optional private Virtual Private Cloud
-- (VPC) containing the resources you are using for your topic detection
-- job. For more information, see
-- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
--
-- 'volumeKmsKeyId', 'startTopicsDetectionJob_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\"@
--
-- 'numberOfTopics', 'startTopicsDetectionJob_numberOfTopics' - The number of topics to detect.
--
-- 'clientRequestToken', 'startTopicsDetectionJob_clientRequestToken' - A unique identifier for the request. If you do not set the client
-- request token, Amazon Comprehend generates one.
--
-- 'tags', 'startTopicsDetectionJob_tags' - Tags to be associated with the topics 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', 'startTopicsDetectionJob_inputDataConfig' - Specifies the format and location of the input data for the job.
--
-- 'outputDataConfig', 'startTopicsDetectionJob_outputDataConfig' - Specifies where to send the output files. The output is a compressed
-- archive with two files, @topic-terms.csv@ that lists the terms
-- associated with each topic, and @doc-topics.csv@ that lists the
-- documents associated with each topic
--
-- 'dataAccessRoleArn', 'startTopicsDetectionJob_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>.
newStartTopicsDetectionJob ::
  -- | 'inputDataConfig'
  InputDataConfig ->
  -- | 'outputDataConfig'
  OutputDataConfig ->
  -- | 'dataAccessRoleArn'
  Prelude.Text ->
  StartTopicsDetectionJob
newStartTopicsDetectionJob :: InputDataConfig
-> OutputDataConfig -> Text -> StartTopicsDetectionJob
newStartTopicsDetectionJob
  InputDataConfig
pInputDataConfig_
  OutputDataConfig
pOutputDataConfig_
  Text
pDataAccessRoleArn_ =
    StartTopicsDetectionJob' :: Maybe Text
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> Text
-> StartTopicsDetectionJob
StartTopicsDetectionJob'
      { $sel:jobName:StartTopicsDetectionJob' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:StartTopicsDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:volumeKmsKeyId:StartTopicsDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:numberOfTopics:StartTopicsDetectionJob' :: Maybe Natural
numberOfTopics = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:StartTopicsDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:StartTopicsDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:inputDataConfig:StartTopicsDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
        $sel:outputDataConfig:StartTopicsDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
        $sel:dataAccessRoleArn:StartTopicsDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_
      }

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

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

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

-- | The number of topics to detect.
startTopicsDetectionJob_numberOfTopics :: Lens.Lens' StartTopicsDetectionJob (Prelude.Maybe Prelude.Natural)
startTopicsDetectionJob_numberOfTopics :: (Maybe Natural -> f (Maybe Natural))
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_numberOfTopics = (StartTopicsDetectionJob -> Maybe Natural)
-> (StartTopicsDetectionJob
    -> Maybe Natural -> StartTopicsDetectionJob)
-> Lens
     StartTopicsDetectionJob
     StartTopicsDetectionJob
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {Maybe Natural
numberOfTopics :: Maybe Natural
$sel:numberOfTopics:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> Maybe Natural
numberOfTopics} -> Maybe Natural
numberOfTopics) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} Maybe Natural
a -> StartTopicsDetectionJob
s {$sel:numberOfTopics:StartTopicsDetectionJob' :: Maybe Natural
numberOfTopics = Maybe Natural
a} :: StartTopicsDetectionJob)

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

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

-- | Specifies where to send the output files. The output is a compressed
-- archive with two files, @topic-terms.csv@ that lists the terms
-- associated with each topic, and @doc-topics.csv@ that lists the
-- documents associated with each topic
startTopicsDetectionJob_outputDataConfig :: Lens.Lens' StartTopicsDetectionJob OutputDataConfig
startTopicsDetectionJob_outputDataConfig :: (OutputDataConfig -> f OutputDataConfig)
-> StartTopicsDetectionJob -> f StartTopicsDetectionJob
startTopicsDetectionJob_outputDataConfig = (StartTopicsDetectionJob -> OutputDataConfig)
-> (StartTopicsDetectionJob
    -> OutputDataConfig -> StartTopicsDetectionJob)
-> Lens
     StartTopicsDetectionJob
     StartTopicsDetectionJob
     OutputDataConfig
     OutputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartTopicsDetectionJob' :: StartTopicsDetectionJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartTopicsDetectionJob
s@StartTopicsDetectionJob' {} OutputDataConfig
a -> StartTopicsDetectionJob
s {$sel:outputDataConfig:StartTopicsDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartTopicsDetectionJob)

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

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

instance Prelude.NFData StartTopicsDetectionJob

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

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

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

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

-- |
-- Create a value of 'StartTopicsDetectionJobResponse' 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', 'startTopicsDetectionJobResponse_jobId' - The identifier generated for the job. To get the status of the job, use
-- this identifier with the @DescribeTopicDetectionJob@ operation.
--
-- 'jobArn', 'startTopicsDetectionJobResponse_jobArn' - The Amazon Resource Name (ARN) of the topics 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>:topics-detection-job\/\<job-id>@
--
-- The following is an example job ARN:
--
-- @arn:aws:comprehend:us-west-2:111122223333:document-classification-job\/1234abcd12ab34cd56ef1234567890ab@
--
-- 'jobStatus', 'startTopicsDetectionJobResponse_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
--     @DescribeTopicDetectionJob@ operation.
--
-- 'httpStatus', 'startTopicsDetectionJobResponse_httpStatus' - The response's http status code.
newStartTopicsDetectionJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartTopicsDetectionJobResponse
newStartTopicsDetectionJobResponse :: Int -> StartTopicsDetectionJobResponse
newStartTopicsDetectionJobResponse Int
pHttpStatus_ =
  StartTopicsDetectionJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartTopicsDetectionJobResponse
StartTopicsDetectionJobResponse'
    { $sel:jobId:StartTopicsDetectionJobResponse' :: Maybe Text
jobId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobArn:StartTopicsDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:StartTopicsDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartTopicsDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | 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
--     @DescribeTopicDetectionJob@ operation.
startTopicsDetectionJobResponse_jobStatus :: Lens.Lens' StartTopicsDetectionJobResponse (Prelude.Maybe JobStatus)
startTopicsDetectionJobResponse_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> StartTopicsDetectionJobResponse
-> f StartTopicsDetectionJobResponse
startTopicsDetectionJobResponse_jobStatus = (StartTopicsDetectionJobResponse -> Maybe JobStatus)
-> (StartTopicsDetectionJobResponse
    -> Maybe JobStatus -> StartTopicsDetectionJobResponse)
-> Lens
     StartTopicsDetectionJobResponse
     StartTopicsDetectionJobResponse
     (Maybe JobStatus)
     (Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTopicsDetectionJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartTopicsDetectionJobResponse' :: StartTopicsDetectionJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartTopicsDetectionJobResponse
s@StartTopicsDetectionJobResponse' {} Maybe JobStatus
a -> StartTopicsDetectionJobResponse
s {$sel:jobStatus:StartTopicsDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartTopicsDetectionJobResponse)

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

instance
  Prelude.NFData
    StartTopicsDetectionJobResponse