{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.SentimentDetectionJobProperties
-- 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)
module Amazonka.Comprehend.Types.SentimentDetectionJobProperties where

import Amazonka.Comprehend.Types.InputDataConfig
import Amazonka.Comprehend.Types.JobStatus
import Amazonka.Comprehend.Types.LanguageCode
import Amazonka.Comprehend.Types.OutputDataConfig
import Amazonka.Comprehend.Types.VpcConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Provides information about a sentiment detection job.
--
-- /See:/ 'newSentimentDetectionJobProperties' smart constructor.
data SentimentDetectionJobProperties = SentimentDetectionJobProperties'
  { -- | The language code of the input documents.
    SentimentDetectionJobProperties -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
    -- | The identifier assigned to the sentiment detection job.
    SentimentDetectionJobProperties -> 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@
    SentimentDetectionJobProperties -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
    -- | The name that you assigned to the sentiment detection job
    SentimentDetectionJobProperties -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | The input data configuration that you supplied when you created the
    -- sentiment detection job.
    SentimentDetectionJobProperties -> Maybe InputDataConfig
inputDataConfig :: Prelude.Maybe InputDataConfig,
    -- | Configuration parameters for a 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>.
    SentimentDetectionJobProperties -> 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\"@
    SentimentDetectionJobProperties -> Maybe Text
volumeKmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The time that the sentiment detection job ended.
    SentimentDetectionJobProperties -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
    -- | The output data configuration that you supplied when you created the
    -- sentiment detection job.
    SentimentDetectionJobProperties -> Maybe OutputDataConfig
outputDataConfig :: Prelude.Maybe OutputDataConfig,
    -- | The Amazon Resource Name (ARN) that gives Amazon Comprehend read access
    -- to your input data.
    SentimentDetectionJobProperties -> Maybe Text
dataAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The current status of the sentiment detection job. If the status is
    -- @FAILED@, the @Messages@ field shows the reason for the failure.
    SentimentDetectionJobProperties -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
    -- | A description of the status of a job.
    SentimentDetectionJobProperties -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The time that the sentiment detection job was submitted for processing.
    SentimentDetectionJobProperties -> Maybe POSIX
submitTime :: Prelude.Maybe Core.POSIX
  }
  deriving (SentimentDetectionJobProperties
-> SentimentDetectionJobProperties -> Bool
(SentimentDetectionJobProperties
 -> SentimentDetectionJobProperties -> Bool)
-> (SentimentDetectionJobProperties
    -> SentimentDetectionJobProperties -> Bool)
-> Eq SentimentDetectionJobProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SentimentDetectionJobProperties
-> SentimentDetectionJobProperties -> Bool
$c/= :: SentimentDetectionJobProperties
-> SentimentDetectionJobProperties -> Bool
== :: SentimentDetectionJobProperties
-> SentimentDetectionJobProperties -> Bool
$c== :: SentimentDetectionJobProperties
-> SentimentDetectionJobProperties -> Bool
Prelude.Eq, ReadPrec [SentimentDetectionJobProperties]
ReadPrec SentimentDetectionJobProperties
Int -> ReadS SentimentDetectionJobProperties
ReadS [SentimentDetectionJobProperties]
(Int -> ReadS SentimentDetectionJobProperties)
-> ReadS [SentimentDetectionJobProperties]
-> ReadPrec SentimentDetectionJobProperties
-> ReadPrec [SentimentDetectionJobProperties]
-> Read SentimentDetectionJobProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SentimentDetectionJobProperties]
$creadListPrec :: ReadPrec [SentimentDetectionJobProperties]
readPrec :: ReadPrec SentimentDetectionJobProperties
$creadPrec :: ReadPrec SentimentDetectionJobProperties
readList :: ReadS [SentimentDetectionJobProperties]
$creadList :: ReadS [SentimentDetectionJobProperties]
readsPrec :: Int -> ReadS SentimentDetectionJobProperties
$creadsPrec :: Int -> ReadS SentimentDetectionJobProperties
Prelude.Read, Int -> SentimentDetectionJobProperties -> ShowS
[SentimentDetectionJobProperties] -> ShowS
SentimentDetectionJobProperties -> String
(Int -> SentimentDetectionJobProperties -> ShowS)
-> (SentimentDetectionJobProperties -> String)
-> ([SentimentDetectionJobProperties] -> ShowS)
-> Show SentimentDetectionJobProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SentimentDetectionJobProperties] -> ShowS
$cshowList :: [SentimentDetectionJobProperties] -> ShowS
show :: SentimentDetectionJobProperties -> String
$cshow :: SentimentDetectionJobProperties -> String
showsPrec :: Int -> SentimentDetectionJobProperties -> ShowS
$cshowsPrec :: Int -> SentimentDetectionJobProperties -> ShowS
Prelude.Show, (forall x.
 SentimentDetectionJobProperties
 -> Rep SentimentDetectionJobProperties x)
-> (forall x.
    Rep SentimentDetectionJobProperties x
    -> SentimentDetectionJobProperties)
-> Generic SentimentDetectionJobProperties
forall x.
Rep SentimentDetectionJobProperties x
-> SentimentDetectionJobProperties
forall x.
SentimentDetectionJobProperties
-> Rep SentimentDetectionJobProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SentimentDetectionJobProperties x
-> SentimentDetectionJobProperties
$cfrom :: forall x.
SentimentDetectionJobProperties
-> Rep SentimentDetectionJobProperties x
Prelude.Generic)

-- |
-- Create a value of 'SentimentDetectionJobProperties' 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:
--
-- 'languageCode', 'sentimentDetectionJobProperties_languageCode' - The language code of the input documents.
--
-- 'jobId', 'sentimentDetectionJobProperties_jobId' - The identifier assigned to the sentiment detection job.
--
-- 'jobArn', 'sentimentDetectionJobProperties_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@
--
-- 'jobName', 'sentimentDetectionJobProperties_jobName' - The name that you assigned to the sentiment detection job
--
-- 'inputDataConfig', 'sentimentDetectionJobProperties_inputDataConfig' - The input data configuration that you supplied when you created the
-- sentiment detection job.
--
-- 'vpcConfig', 'sentimentDetectionJobProperties_vpcConfig' - Configuration parameters for a 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', 'sentimentDetectionJobProperties_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\"@
--
-- 'endTime', 'sentimentDetectionJobProperties_endTime' - The time that the sentiment detection job ended.
--
-- 'outputDataConfig', 'sentimentDetectionJobProperties_outputDataConfig' - The output data configuration that you supplied when you created the
-- sentiment detection job.
--
-- 'dataAccessRoleArn', 'sentimentDetectionJobProperties_dataAccessRoleArn' - The Amazon Resource Name (ARN) that gives Amazon Comprehend read access
-- to your input data.
--
-- 'jobStatus', 'sentimentDetectionJobProperties_jobStatus' - The current status of the sentiment detection job. If the status is
-- @FAILED@, the @Messages@ field shows the reason for the failure.
--
-- 'message', 'sentimentDetectionJobProperties_message' - A description of the status of a job.
--
-- 'submitTime', 'sentimentDetectionJobProperties_submitTime' - The time that the sentiment detection job was submitted for processing.
newSentimentDetectionJobProperties ::
  SentimentDetectionJobProperties
newSentimentDetectionJobProperties :: SentimentDetectionJobProperties
newSentimentDetectionJobProperties =
  SentimentDetectionJobProperties' :: Maybe LanguageCode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InputDataConfig
-> Maybe VpcConfig
-> Maybe Text
-> Maybe POSIX
-> Maybe OutputDataConfig
-> Maybe Text
-> Maybe JobStatus
-> Maybe Text
-> Maybe POSIX
-> SentimentDetectionJobProperties
SentimentDetectionJobProperties'
    { $sel:languageCode:SentimentDetectionJobProperties' :: Maybe LanguageCode
languageCode =
        Maybe LanguageCode
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:SentimentDetectionJobProperties' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobArn:SentimentDetectionJobProperties' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:SentimentDetectionJobProperties' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataConfig:SentimentDetectionJobProperties' :: Maybe InputDataConfig
inputDataConfig = Maybe InputDataConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcConfig:SentimentDetectionJobProperties' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:volumeKmsKeyId:SentimentDetectionJobProperties' :: Maybe Text
volumeKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:SentimentDetectionJobProperties' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:outputDataConfig:SentimentDetectionJobProperties' :: Maybe OutputDataConfig
outputDataConfig = Maybe OutputDataConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:dataAccessRoleArn:SentimentDetectionJobProperties' :: Maybe Text
dataAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:SentimentDetectionJobProperties' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:message:SentimentDetectionJobProperties' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:submitTime:SentimentDetectionJobProperties' :: Maybe POSIX
submitTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The identifier assigned to the sentiment detection job.
sentimentDetectionJobProperties_jobId :: Lens.Lens' SentimentDetectionJobProperties (Prelude.Maybe Prelude.Text)
sentimentDetectionJobProperties_jobId :: (Maybe Text -> f (Maybe Text))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
sentimentDetectionJobProperties_jobId = (SentimentDetectionJobProperties -> Maybe Text)
-> (SentimentDetectionJobProperties
    -> Maybe Text -> SentimentDetectionJobProperties)
-> Lens
     SentimentDetectionJobProperties
     SentimentDetectionJobProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SentimentDetectionJobProperties' {Maybe Text
jobId :: Maybe Text
$sel:jobId:SentimentDetectionJobProperties' :: SentimentDetectionJobProperties -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: SentimentDetectionJobProperties
s@SentimentDetectionJobProperties' {} Maybe Text
a -> SentimentDetectionJobProperties
s {$sel:jobId:SentimentDetectionJobProperties' :: Maybe Text
jobId = Maybe Text
a} :: SentimentDetectionJobProperties)

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

-- | The name that you assigned to the sentiment detection job
sentimentDetectionJobProperties_jobName :: Lens.Lens' SentimentDetectionJobProperties (Prelude.Maybe Prelude.Text)
sentimentDetectionJobProperties_jobName :: (Maybe Text -> f (Maybe Text))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
sentimentDetectionJobProperties_jobName = (SentimentDetectionJobProperties -> Maybe Text)
-> (SentimentDetectionJobProperties
    -> Maybe Text -> SentimentDetectionJobProperties)
-> Lens
     SentimentDetectionJobProperties
     SentimentDetectionJobProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SentimentDetectionJobProperties' {Maybe Text
jobName :: Maybe Text
$sel:jobName:SentimentDetectionJobProperties' :: SentimentDetectionJobProperties -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: SentimentDetectionJobProperties
s@SentimentDetectionJobProperties' {} Maybe Text
a -> SentimentDetectionJobProperties
s {$sel:jobName:SentimentDetectionJobProperties' :: Maybe Text
jobName = Maybe Text
a} :: SentimentDetectionJobProperties)

-- | The input data configuration that you supplied when you created the
-- sentiment detection job.
sentimentDetectionJobProperties_inputDataConfig :: Lens.Lens' SentimentDetectionJobProperties (Prelude.Maybe InputDataConfig)
sentimentDetectionJobProperties_inputDataConfig :: (Maybe InputDataConfig -> f (Maybe InputDataConfig))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
sentimentDetectionJobProperties_inputDataConfig = (SentimentDetectionJobProperties -> Maybe InputDataConfig)
-> (SentimentDetectionJobProperties
    -> Maybe InputDataConfig -> SentimentDetectionJobProperties)
-> Lens
     SentimentDetectionJobProperties
     SentimentDetectionJobProperties
     (Maybe InputDataConfig)
     (Maybe InputDataConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SentimentDetectionJobProperties' {Maybe InputDataConfig
inputDataConfig :: Maybe InputDataConfig
$sel:inputDataConfig:SentimentDetectionJobProperties' :: SentimentDetectionJobProperties -> Maybe InputDataConfig
inputDataConfig} -> Maybe InputDataConfig
inputDataConfig) (\s :: SentimentDetectionJobProperties
s@SentimentDetectionJobProperties' {} Maybe InputDataConfig
a -> SentimentDetectionJobProperties
s {$sel:inputDataConfig:SentimentDetectionJobProperties' :: Maybe InputDataConfig
inputDataConfig = Maybe InputDataConfig
a} :: SentimentDetectionJobProperties)

-- | Configuration parameters for a 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>.
sentimentDetectionJobProperties_vpcConfig :: Lens.Lens' SentimentDetectionJobProperties (Prelude.Maybe VpcConfig)
sentimentDetectionJobProperties_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
sentimentDetectionJobProperties_vpcConfig = (SentimentDetectionJobProperties -> Maybe VpcConfig)
-> (SentimentDetectionJobProperties
    -> Maybe VpcConfig -> SentimentDetectionJobProperties)
-> Lens
     SentimentDetectionJobProperties
     SentimentDetectionJobProperties
     (Maybe VpcConfig)
     (Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SentimentDetectionJobProperties' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:SentimentDetectionJobProperties' :: SentimentDetectionJobProperties -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: SentimentDetectionJobProperties
s@SentimentDetectionJobProperties' {} Maybe VpcConfig
a -> SentimentDetectionJobProperties
s {$sel:vpcConfig:SentimentDetectionJobProperties' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: SentimentDetectionJobProperties)

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

-- | The time that the sentiment detection job ended.
sentimentDetectionJobProperties_endTime :: Lens.Lens' SentimentDetectionJobProperties (Prelude.Maybe Prelude.UTCTime)
sentimentDetectionJobProperties_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
sentimentDetectionJobProperties_endTime = (SentimentDetectionJobProperties -> Maybe POSIX)
-> (SentimentDetectionJobProperties
    -> Maybe POSIX -> SentimentDetectionJobProperties)
-> Lens
     SentimentDetectionJobProperties
     SentimentDetectionJobProperties
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SentimentDetectionJobProperties' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:SentimentDetectionJobProperties' :: SentimentDetectionJobProperties -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: SentimentDetectionJobProperties
s@SentimentDetectionJobProperties' {} Maybe POSIX
a -> SentimentDetectionJobProperties
s {$sel:endTime:SentimentDetectionJobProperties' :: Maybe POSIX
endTime = Maybe POSIX
a} :: SentimentDetectionJobProperties) ((Maybe POSIX -> f (Maybe POSIX))
 -> SentimentDetectionJobProperties
 -> f SentimentDetectionJobProperties)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The output data configuration that you supplied when you created the
-- sentiment detection job.
sentimentDetectionJobProperties_outputDataConfig :: Lens.Lens' SentimentDetectionJobProperties (Prelude.Maybe OutputDataConfig)
sentimentDetectionJobProperties_outputDataConfig :: (Maybe OutputDataConfig -> f (Maybe OutputDataConfig))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
sentimentDetectionJobProperties_outputDataConfig = (SentimentDetectionJobProperties -> Maybe OutputDataConfig)
-> (SentimentDetectionJobProperties
    -> Maybe OutputDataConfig -> SentimentDetectionJobProperties)
-> Lens
     SentimentDetectionJobProperties
     SentimentDetectionJobProperties
     (Maybe OutputDataConfig)
     (Maybe OutputDataConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SentimentDetectionJobProperties' {Maybe OutputDataConfig
outputDataConfig :: Maybe OutputDataConfig
$sel:outputDataConfig:SentimentDetectionJobProperties' :: SentimentDetectionJobProperties -> Maybe OutputDataConfig
outputDataConfig} -> Maybe OutputDataConfig
outputDataConfig) (\s :: SentimentDetectionJobProperties
s@SentimentDetectionJobProperties' {} Maybe OutputDataConfig
a -> SentimentDetectionJobProperties
s {$sel:outputDataConfig:SentimentDetectionJobProperties' :: Maybe OutputDataConfig
outputDataConfig = Maybe OutputDataConfig
a} :: SentimentDetectionJobProperties)

-- | The Amazon Resource Name (ARN) that gives Amazon Comprehend read access
-- to your input data.
sentimentDetectionJobProperties_dataAccessRoleArn :: Lens.Lens' SentimentDetectionJobProperties (Prelude.Maybe Prelude.Text)
sentimentDetectionJobProperties_dataAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
sentimentDetectionJobProperties_dataAccessRoleArn = (SentimentDetectionJobProperties -> Maybe Text)
-> (SentimentDetectionJobProperties
    -> Maybe Text -> SentimentDetectionJobProperties)
-> Lens
     SentimentDetectionJobProperties
     SentimentDetectionJobProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SentimentDetectionJobProperties' {Maybe Text
dataAccessRoleArn :: Maybe Text
$sel:dataAccessRoleArn:SentimentDetectionJobProperties' :: SentimentDetectionJobProperties -> Maybe Text
dataAccessRoleArn} -> Maybe Text
dataAccessRoleArn) (\s :: SentimentDetectionJobProperties
s@SentimentDetectionJobProperties' {} Maybe Text
a -> SentimentDetectionJobProperties
s {$sel:dataAccessRoleArn:SentimentDetectionJobProperties' :: Maybe Text
dataAccessRoleArn = Maybe Text
a} :: SentimentDetectionJobProperties)

-- | The current status of the sentiment detection job. If the status is
-- @FAILED@, the @Messages@ field shows the reason for the failure.
sentimentDetectionJobProperties_jobStatus :: Lens.Lens' SentimentDetectionJobProperties (Prelude.Maybe JobStatus)
sentimentDetectionJobProperties_jobStatus :: (Maybe JobStatus -> f (Maybe JobStatus))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
sentimentDetectionJobProperties_jobStatus = (SentimentDetectionJobProperties -> Maybe JobStatus)
-> (SentimentDetectionJobProperties
    -> Maybe JobStatus -> SentimentDetectionJobProperties)
-> Lens
     SentimentDetectionJobProperties
     SentimentDetectionJobProperties
     (Maybe JobStatus)
     (Maybe JobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SentimentDetectionJobProperties' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:SentimentDetectionJobProperties' :: SentimentDetectionJobProperties -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: SentimentDetectionJobProperties
s@SentimentDetectionJobProperties' {} Maybe JobStatus
a -> SentimentDetectionJobProperties
s {$sel:jobStatus:SentimentDetectionJobProperties' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: SentimentDetectionJobProperties)

-- | A description of the status of a job.
sentimentDetectionJobProperties_message :: Lens.Lens' SentimentDetectionJobProperties (Prelude.Maybe Prelude.Text)
sentimentDetectionJobProperties_message :: (Maybe Text -> f (Maybe Text))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
sentimentDetectionJobProperties_message = (SentimentDetectionJobProperties -> Maybe Text)
-> (SentimentDetectionJobProperties
    -> Maybe Text -> SentimentDetectionJobProperties)
-> Lens
     SentimentDetectionJobProperties
     SentimentDetectionJobProperties
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SentimentDetectionJobProperties' {Maybe Text
message :: Maybe Text
$sel:message:SentimentDetectionJobProperties' :: SentimentDetectionJobProperties -> Maybe Text
message} -> Maybe Text
message) (\s :: SentimentDetectionJobProperties
s@SentimentDetectionJobProperties' {} Maybe Text
a -> SentimentDetectionJobProperties
s {$sel:message:SentimentDetectionJobProperties' :: Maybe Text
message = Maybe Text
a} :: SentimentDetectionJobProperties)

-- | The time that the sentiment detection job was submitted for processing.
sentimentDetectionJobProperties_submitTime :: Lens.Lens' SentimentDetectionJobProperties (Prelude.Maybe Prelude.UTCTime)
sentimentDetectionJobProperties_submitTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
sentimentDetectionJobProperties_submitTime = (SentimentDetectionJobProperties -> Maybe POSIX)
-> (SentimentDetectionJobProperties
    -> Maybe POSIX -> SentimentDetectionJobProperties)
-> Lens
     SentimentDetectionJobProperties
     SentimentDetectionJobProperties
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SentimentDetectionJobProperties' {Maybe POSIX
submitTime :: Maybe POSIX
$sel:submitTime:SentimentDetectionJobProperties' :: SentimentDetectionJobProperties -> Maybe POSIX
submitTime} -> Maybe POSIX
submitTime) (\s :: SentimentDetectionJobProperties
s@SentimentDetectionJobProperties' {} Maybe POSIX
a -> SentimentDetectionJobProperties
s {$sel:submitTime:SentimentDetectionJobProperties' :: Maybe POSIX
submitTime = Maybe POSIX
a} :: SentimentDetectionJobProperties) ((Maybe POSIX -> f (Maybe POSIX))
 -> SentimentDetectionJobProperties
 -> f SentimentDetectionJobProperties)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SentimentDetectionJobProperties
-> f SentimentDetectionJobProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance
  Core.FromJSON
    SentimentDetectionJobProperties
  where
  parseJSON :: Value -> Parser SentimentDetectionJobProperties
parseJSON =
    String
-> (Object -> Parser SentimentDetectionJobProperties)
-> Value
-> Parser SentimentDetectionJobProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SentimentDetectionJobProperties"
      ( \Object
x ->
          Maybe LanguageCode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InputDataConfig
-> Maybe VpcConfig
-> Maybe Text
-> Maybe POSIX
-> Maybe OutputDataConfig
-> Maybe Text
-> Maybe JobStatus
-> Maybe Text
-> Maybe POSIX
-> SentimentDetectionJobProperties
SentimentDetectionJobProperties'
            (Maybe LanguageCode
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe InputDataConfig
 -> Maybe VpcConfig
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe OutputDataConfig
 -> Maybe Text
 -> Maybe JobStatus
 -> Maybe Text
 -> Maybe POSIX
 -> SentimentDetectionJobProperties)
-> Parser (Maybe LanguageCode)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InputDataConfig
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe LanguageCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LanguageCode")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InputDataConfig
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> SentimentDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe InputDataConfig
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe InputDataConfig
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> SentimentDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe InputDataConfig
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobArn")
            Parser
  (Maybe Text
   -> Maybe InputDataConfig
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> SentimentDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe InputDataConfig
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobName")
            Parser
  (Maybe InputDataConfig
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> SentimentDetectionJobProperties)
-> Parser (Maybe InputDataConfig)
-> Parser
     (Maybe VpcConfig
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputDataConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputDataConfig")
            Parser
  (Maybe VpcConfig
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> SentimentDetectionJobProperties)
-> Parser (Maybe VpcConfig)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VpcConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VpcConfig")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> SentimentDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VolumeKmsKeyId")
            Parser
  (Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> SentimentDetectionJobProperties)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndTime")
            Parser
  (Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> SentimentDetectionJobProperties)
-> Parser (Maybe OutputDataConfig)
-> Parser
     (Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OutputDataConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputDataConfig")
            Parser
  (Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> SentimentDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe JobStatus
      -> Maybe Text -> Maybe POSIX -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataAccessRoleArn")
            Parser
  (Maybe JobStatus
   -> Maybe Text -> Maybe POSIX -> SentimentDetectionJobProperties)
-> Parser (Maybe JobStatus)
-> Parser
     (Maybe Text -> Maybe POSIX -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobStatus")
            Parser
  (Maybe Text -> Maybe POSIX -> SentimentDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> SentimentDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Message")
            Parser (Maybe POSIX -> SentimentDetectionJobProperties)
-> Parser (Maybe POSIX) -> Parser SentimentDetectionJobProperties
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubmitTime")
      )

instance
  Prelude.Hashable
    SentimentDetectionJobProperties

instance
  Prelude.NFData
    SentimentDetectionJobProperties