{-# 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.StartSentimentDetectionJob
-- 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 sentiment detection job for a collection of
-- documents. use the operation to track the status of a job.
module Amazonka.Comprehend.StartSentimentDetectionJob
  ( -- * Creating a Request
    StartSentimentDetectionJob (..),
    newStartSentimentDetectionJob,

    -- * Request Lenses
    startSentimentDetectionJob_jobName,
    startSentimentDetectionJob_vpcConfig,
    startSentimentDetectionJob_volumeKmsKeyId,
    startSentimentDetectionJob_clientRequestToken,
    startSentimentDetectionJob_tags,
    startSentimentDetectionJob_inputDataConfig,
    startSentimentDetectionJob_outputDataConfig,
    startSentimentDetectionJob_dataAccessRoleArn,
    startSentimentDetectionJob_languageCode,

    -- * Destructuring the Response
    StartSentimentDetectionJobResponse (..),
    newStartSentimentDetectionJobResponse,

    -- * Response Lenses
    startSentimentDetectionJobResponse_jobId,
    startSentimentDetectionJobResponse_jobArn,
    startSentimentDetectionJobResponse_jobStatus,
    startSentimentDetectionJobResponse_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:/ 'newStartSentimentDetectionJob' smart constructor.
data StartSentimentDetectionJob = StartSentimentDetectionJob'
  { -- | The identifier of the job.
    StartSentimentDetectionJob -> 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 sentiment
    -- detection job. For more information, see
    -- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
    StartSentimentDetectionJob -> 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\"@
    StartSentimentDetectionJob -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the request. If you don\'t set the client
    -- request token, Amazon Comprehend generates one.
    StartSentimentDetectionJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Tags to be associated with the sentiment 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.
    StartSentimentDetectionJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | Specifies the format and location of the input data for the job.
    StartSentimentDetectionJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
    -- | Specifies where to send the output files.
    StartSentimentDetectionJob -> 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>.
    StartSentimentDetectionJob -> Text
dataAccessRoleArn :: Prelude.Text,
    -- | The language of the input documents. You can specify any of the primary
    -- languages supported by Amazon Comprehend. All documents must be in the
    -- same language.
    StartSentimentDetectionJob -> LanguageCode
languageCode :: LanguageCode
  }
  deriving (StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
(StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool)
-> (StartSentimentDetectionJob
    -> StartSentimentDetectionJob -> Bool)
-> Eq StartSentimentDetectionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
$c/= :: StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
== :: StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
$c== :: StartSentimentDetectionJob -> StartSentimentDetectionJob -> Bool
Prelude.Eq, ReadPrec [StartSentimentDetectionJob]
ReadPrec StartSentimentDetectionJob
Int -> ReadS StartSentimentDetectionJob
ReadS [StartSentimentDetectionJob]
(Int -> ReadS StartSentimentDetectionJob)
-> ReadS [StartSentimentDetectionJob]
-> ReadPrec StartSentimentDetectionJob
-> ReadPrec [StartSentimentDetectionJob]
-> Read StartSentimentDetectionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartSentimentDetectionJob]
$creadListPrec :: ReadPrec [StartSentimentDetectionJob]
readPrec :: ReadPrec StartSentimentDetectionJob
$creadPrec :: ReadPrec StartSentimentDetectionJob
readList :: ReadS [StartSentimentDetectionJob]
$creadList :: ReadS [StartSentimentDetectionJob]
readsPrec :: Int -> ReadS StartSentimentDetectionJob
$creadsPrec :: Int -> ReadS StartSentimentDetectionJob
Prelude.Read, Int -> StartSentimentDetectionJob -> ShowS
[StartSentimentDetectionJob] -> ShowS
StartSentimentDetectionJob -> String
(Int -> StartSentimentDetectionJob -> ShowS)
-> (StartSentimentDetectionJob -> String)
-> ([StartSentimentDetectionJob] -> ShowS)
-> Show StartSentimentDetectionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSentimentDetectionJob] -> ShowS
$cshowList :: [StartSentimentDetectionJob] -> ShowS
show :: StartSentimentDetectionJob -> String
$cshow :: StartSentimentDetectionJob -> String
showsPrec :: Int -> StartSentimentDetectionJob -> ShowS
$cshowsPrec :: Int -> StartSentimentDetectionJob -> ShowS
Prelude.Show, (forall x.
 StartSentimentDetectionJob -> Rep StartSentimentDetectionJob x)
-> (forall x.
    Rep StartSentimentDetectionJob x -> StartSentimentDetectionJob)
-> Generic StartSentimentDetectionJob
forall x.
Rep StartSentimentDetectionJob x -> StartSentimentDetectionJob
forall x.
StartSentimentDetectionJob -> Rep StartSentimentDetectionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartSentimentDetectionJob x -> StartSentimentDetectionJob
$cfrom :: forall x.
StartSentimentDetectionJob -> Rep StartSentimentDetectionJob x
Prelude.Generic)

-- |
-- Create a value of 'StartSentimentDetectionJob' 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', 'startSentimentDetectionJob_jobName' - The identifier of the job.
--
-- 'vpcConfig', 'startSentimentDetectionJob_vpcConfig' - Configuration parameters for an optional private Virtual Private Cloud
-- (VPC) containing the resources you are using for your sentiment
-- detection job. For more information, see
-- <https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html Amazon VPC>.
--
-- 'volumeKmsKeyId', 'startSentimentDetectionJob_volumeKmsKeyId' - ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
-- uses to encrypt data on the storage volume attached to the ML compute
-- instance(s) that process the analysis job. The VolumeKmsKeyId can be
-- either of the following formats:
--
-- -   KMS Key ID: @\"1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- -   Amazon Resource Name (ARN) of a KMS Key:
--     @\"arn:aws:kms:us-west-2:111122223333:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"@
--
-- 'clientRequestToken', 'startSentimentDetectionJob_clientRequestToken' - A unique identifier for the request. If you don\'t set the client
-- request token, Amazon Comprehend generates one.
--
-- 'tags', 'startSentimentDetectionJob_tags' - Tags to be associated with the sentiment 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', 'startSentimentDetectionJob_inputDataConfig' - Specifies the format and location of the input data for the job.
--
-- 'outputDataConfig', 'startSentimentDetectionJob_outputDataConfig' - Specifies where to send the output files.
--
-- 'dataAccessRoleArn', 'startSentimentDetectionJob_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', 'startSentimentDetectionJob_languageCode' - The language of the input documents. You can specify any of the primary
-- languages supported by Amazon Comprehend. All documents must be in the
-- same language.
newStartSentimentDetectionJob ::
  -- | 'inputDataConfig'
  InputDataConfig ->
  -- | 'outputDataConfig'
  OutputDataConfig ->
  -- | 'dataAccessRoleArn'
  Prelude.Text ->
  -- | 'languageCode'
  LanguageCode ->
  StartSentimentDetectionJob
newStartSentimentDetectionJob :: InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartSentimentDetectionJob
newStartSentimentDetectionJob
  InputDataConfig
pInputDataConfig_
  OutputDataConfig
pOutputDataConfig_
  Text
pDataAccessRoleArn_
  LanguageCode
pLanguageCode_ =
    StartSentimentDetectionJob' :: Maybe Text
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InputDataConfig
-> OutputDataConfig
-> Text
-> LanguageCode
-> StartSentimentDetectionJob
StartSentimentDetectionJob'
      { $sel:jobName:StartSentimentDetectionJob' :: Maybe Text
jobName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:vpcConfig:StartSentimentDetectionJob' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:volumeKmsKeyId:StartSentimentDetectionJob' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:clientRequestToken:StartSentimentDetectionJob' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:StartSentimentDetectionJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:inputDataConfig:StartSentimentDetectionJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
        $sel:outputDataConfig:StartSentimentDetectionJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
        $sel:dataAccessRoleArn:StartSentimentDetectionJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
        $sel:languageCode:StartSentimentDetectionJob' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
      }

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

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

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

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

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

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

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

-- | The language of the input documents. You can specify any of the primary
-- languages supported by Amazon Comprehend. All documents must be in the
-- same language.
startSentimentDetectionJob_languageCode :: Lens.Lens' StartSentimentDetectionJob LanguageCode
startSentimentDetectionJob_languageCode :: (LanguageCode -> f LanguageCode)
-> StartSentimentDetectionJob -> f StartSentimentDetectionJob
startSentimentDetectionJob_languageCode = (StartSentimentDetectionJob -> LanguageCode)
-> (StartSentimentDetectionJob
    -> LanguageCode -> StartSentimentDetectionJob)
-> Lens
     StartSentimentDetectionJob
     StartSentimentDetectionJob
     LanguageCode
     LanguageCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSentimentDetectionJob' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:StartSentimentDetectionJob' :: StartSentimentDetectionJob -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: StartSentimentDetectionJob
s@StartSentimentDetectionJob' {} LanguageCode
a -> StartSentimentDetectionJob
s {$sel:languageCode:StartSentimentDetectionJob' :: LanguageCode
languageCode = LanguageCode
a} :: StartSentimentDetectionJob)

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

instance Prelude.NFData StartSentimentDetectionJob

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

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

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

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

-- |
-- Create a value of 'StartSentimentDetectionJobResponse' 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', 'startSentimentDetectionJobResponse_jobId' - The identifier generated for the job. To get the status of a job, use
-- this identifier with the operation.
--
-- 'jobArn', 'startSentimentDetectionJobResponse_jobArn' - The Amazon Resource Name (ARN) of the sentiment 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>:sentiment-detection-job\/\<job-id>@
--
-- The following is an example job ARN:
--
-- @arn:aws:comprehend:us-west-2:111122223333:sentiment-detection-job\/1234abcd12ab34cd56ef1234567890ab@
--
-- 'jobStatus', 'startSentimentDetectionJobResponse_jobStatus' - The status of the job.
--
-- -   SUBMITTED - The job has been received and is queued for processing.
--
-- -   IN_PROGRESS - Amazon Comprehend is processing the job.
--
-- -   COMPLETED - The job was successfully completed and the output is
--     available.
--
-- -   FAILED - The job did not complete. To get details, use the
--     operation.
--
-- 'httpStatus', 'startSentimentDetectionJobResponse_httpStatus' - The response's http status code.
newStartSentimentDetectionJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartSentimentDetectionJobResponse
newStartSentimentDetectionJobResponse :: Int -> StartSentimentDetectionJobResponse
newStartSentimentDetectionJobResponse Int
pHttpStatus_ =
  StartSentimentDetectionJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Int
-> StartSentimentDetectionJobResponse
StartSentimentDetectionJobResponse'
    { $sel:jobId:StartSentimentDetectionJobResponse' :: Maybe Text
jobId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobArn:StartSentimentDetectionJobResponse' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:StartSentimentDetectionJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartSentimentDetectionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

instance
  Prelude.NFData
    StartSentimentDetectionJobResponse