{-# 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.EventsDetectionJobProperties
-- 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.EventsDetectionJobProperties where

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

-- | Provides information about an events detection job.
--
-- /See:/ 'newEventsDetectionJobProperties' smart constructor.
data EventsDetectionJobProperties = EventsDetectionJobProperties'
  { -- | The language code of the input documents.
    EventsDetectionJobProperties -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
    -- | The identifier assigned to the events detection job.
    EventsDetectionJobProperties -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the events 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>:events-detection-job\/\<job-id>@
    --
    -- The following is an example job ARN:
    --
    -- @arn:aws:comprehend:us-west-2:111122223333:events-detection-job\/1234abcd12ab34cd56ef1234567890ab@
    EventsDetectionJobProperties -> Maybe Text
jobArn :: Prelude.Maybe Prelude.Text,
    -- | The name you assigned the events detection job.
    EventsDetectionJobProperties -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | The types of events that are detected by the job.
    EventsDetectionJobProperties -> Maybe (NonEmpty Text)
targetEventTypes :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The input data configuration that you supplied when you created the
    -- events detection job.
    EventsDetectionJobProperties -> Maybe InputDataConfig
inputDataConfig :: Prelude.Maybe InputDataConfig,
    -- | The time that the events detection job completed.
    EventsDetectionJobProperties -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
    -- | The output data configuration that you supplied when you created the
    -- events detection job.
    EventsDetectionJobProperties -> Maybe OutputDataConfig
outputDataConfig :: Prelude.Maybe OutputDataConfig,
    -- | The Amazon Resource Name (ARN) of the AWS Identify and Access Management
    -- (IAM) role that grants Amazon Comprehend read access to your input data.
    EventsDetectionJobProperties -> Maybe Text
dataAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The current status of the events detection job.
    EventsDetectionJobProperties -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
    -- | A description of the status of the events detection job.
    EventsDetectionJobProperties -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The time that the events detection job was submitted for processing.
    EventsDetectionJobProperties -> Maybe POSIX
submitTime :: Prelude.Maybe Core.POSIX
  }
  deriving (EventsDetectionJobProperties
-> EventsDetectionJobProperties -> Bool
(EventsDetectionJobProperties
 -> EventsDetectionJobProperties -> Bool)
-> (EventsDetectionJobProperties
    -> EventsDetectionJobProperties -> Bool)
-> Eq EventsDetectionJobProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventsDetectionJobProperties
-> EventsDetectionJobProperties -> Bool
$c/= :: EventsDetectionJobProperties
-> EventsDetectionJobProperties -> Bool
== :: EventsDetectionJobProperties
-> EventsDetectionJobProperties -> Bool
$c== :: EventsDetectionJobProperties
-> EventsDetectionJobProperties -> Bool
Prelude.Eq, ReadPrec [EventsDetectionJobProperties]
ReadPrec EventsDetectionJobProperties
Int -> ReadS EventsDetectionJobProperties
ReadS [EventsDetectionJobProperties]
(Int -> ReadS EventsDetectionJobProperties)
-> ReadS [EventsDetectionJobProperties]
-> ReadPrec EventsDetectionJobProperties
-> ReadPrec [EventsDetectionJobProperties]
-> Read EventsDetectionJobProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventsDetectionJobProperties]
$creadListPrec :: ReadPrec [EventsDetectionJobProperties]
readPrec :: ReadPrec EventsDetectionJobProperties
$creadPrec :: ReadPrec EventsDetectionJobProperties
readList :: ReadS [EventsDetectionJobProperties]
$creadList :: ReadS [EventsDetectionJobProperties]
readsPrec :: Int -> ReadS EventsDetectionJobProperties
$creadsPrec :: Int -> ReadS EventsDetectionJobProperties
Prelude.Read, Int -> EventsDetectionJobProperties -> ShowS
[EventsDetectionJobProperties] -> ShowS
EventsDetectionJobProperties -> String
(Int -> EventsDetectionJobProperties -> ShowS)
-> (EventsDetectionJobProperties -> String)
-> ([EventsDetectionJobProperties] -> ShowS)
-> Show EventsDetectionJobProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventsDetectionJobProperties] -> ShowS
$cshowList :: [EventsDetectionJobProperties] -> ShowS
show :: EventsDetectionJobProperties -> String
$cshow :: EventsDetectionJobProperties -> String
showsPrec :: Int -> EventsDetectionJobProperties -> ShowS
$cshowsPrec :: Int -> EventsDetectionJobProperties -> ShowS
Prelude.Show, (forall x.
 EventsDetectionJobProperties -> Rep EventsDetectionJobProperties x)
-> (forall x.
    Rep EventsDetectionJobProperties x -> EventsDetectionJobProperties)
-> Generic EventsDetectionJobProperties
forall x.
Rep EventsDetectionJobProperties x -> EventsDetectionJobProperties
forall x.
EventsDetectionJobProperties -> Rep EventsDetectionJobProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EventsDetectionJobProperties x -> EventsDetectionJobProperties
$cfrom :: forall x.
EventsDetectionJobProperties -> Rep EventsDetectionJobProperties x
Prelude.Generic)

-- |
-- Create a value of 'EventsDetectionJobProperties' 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', 'eventsDetectionJobProperties_languageCode' - The language code of the input documents.
--
-- 'jobId', 'eventsDetectionJobProperties_jobId' - The identifier assigned to the events detection job.
--
-- 'jobArn', 'eventsDetectionJobProperties_jobArn' - The Amazon Resource Name (ARN) of the events 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>:events-detection-job\/\<job-id>@
--
-- The following is an example job ARN:
--
-- @arn:aws:comprehend:us-west-2:111122223333:events-detection-job\/1234abcd12ab34cd56ef1234567890ab@
--
-- 'jobName', 'eventsDetectionJobProperties_jobName' - The name you assigned the events detection job.
--
-- 'targetEventTypes', 'eventsDetectionJobProperties_targetEventTypes' - The types of events that are detected by the job.
--
-- 'inputDataConfig', 'eventsDetectionJobProperties_inputDataConfig' - The input data configuration that you supplied when you created the
-- events detection job.
--
-- 'endTime', 'eventsDetectionJobProperties_endTime' - The time that the events detection job completed.
--
-- 'outputDataConfig', 'eventsDetectionJobProperties_outputDataConfig' - The output data configuration that you supplied when you created the
-- events detection job.
--
-- 'dataAccessRoleArn', 'eventsDetectionJobProperties_dataAccessRoleArn' - The Amazon Resource Name (ARN) of the AWS Identify and Access Management
-- (IAM) role that grants Amazon Comprehend read access to your input data.
--
-- 'jobStatus', 'eventsDetectionJobProperties_jobStatus' - The current status of the events detection job.
--
-- 'message', 'eventsDetectionJobProperties_message' - A description of the status of the events detection job.
--
-- 'submitTime', 'eventsDetectionJobProperties_submitTime' - The time that the events detection job was submitted for processing.
newEventsDetectionJobProperties ::
  EventsDetectionJobProperties
newEventsDetectionJobProperties :: EventsDetectionJobProperties
newEventsDetectionJobProperties =
  EventsDetectionJobProperties' :: Maybe LanguageCode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe InputDataConfig
-> Maybe POSIX
-> Maybe OutputDataConfig
-> Maybe Text
-> Maybe JobStatus
-> Maybe Text
-> Maybe POSIX
-> EventsDetectionJobProperties
EventsDetectionJobProperties'
    { $sel:languageCode:EventsDetectionJobProperties' :: Maybe LanguageCode
languageCode =
        Maybe LanguageCode
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:EventsDetectionJobProperties' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobArn:EventsDetectionJobProperties' :: Maybe Text
jobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:EventsDetectionJobProperties' :: Maybe Text
jobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetEventTypes:EventsDetectionJobProperties' :: Maybe (NonEmpty Text)
targetEventTypes = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataConfig:EventsDetectionJobProperties' :: Maybe InputDataConfig
inputDataConfig = Maybe InputDataConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:EventsDetectionJobProperties' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:outputDataConfig:EventsDetectionJobProperties' :: Maybe OutputDataConfig
outputDataConfig = Maybe OutputDataConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:dataAccessRoleArn:EventsDetectionJobProperties' :: Maybe Text
dataAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:EventsDetectionJobProperties' :: Maybe JobStatus
jobStatus = Maybe JobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:message:EventsDetectionJobProperties' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:submitTime:EventsDetectionJobProperties' :: Maybe POSIX
submitTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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

-- | The types of events that are detected by the job.
eventsDetectionJobProperties_targetEventTypes :: Lens.Lens' EventsDetectionJobProperties (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
eventsDetectionJobProperties_targetEventTypes :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> EventsDetectionJobProperties -> f EventsDetectionJobProperties
eventsDetectionJobProperties_targetEventTypes = (EventsDetectionJobProperties -> Maybe (NonEmpty Text))
-> (EventsDetectionJobProperties
    -> Maybe (NonEmpty Text) -> EventsDetectionJobProperties)
-> Lens
     EventsDetectionJobProperties
     EventsDetectionJobProperties
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventsDetectionJobProperties' {Maybe (NonEmpty Text)
targetEventTypes :: Maybe (NonEmpty Text)
$sel:targetEventTypes:EventsDetectionJobProperties' :: EventsDetectionJobProperties -> Maybe (NonEmpty Text)
targetEventTypes} -> Maybe (NonEmpty Text)
targetEventTypes) (\s :: EventsDetectionJobProperties
s@EventsDetectionJobProperties' {} Maybe (NonEmpty Text)
a -> EventsDetectionJobProperties
s {$sel:targetEventTypes:EventsDetectionJobProperties' :: Maybe (NonEmpty Text)
targetEventTypes = Maybe (NonEmpty Text)
a} :: EventsDetectionJobProperties) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> EventsDetectionJobProperties -> f EventsDetectionJobProperties)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> EventsDetectionJobProperties
-> f EventsDetectionJobProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The time that the events detection job completed.
eventsDetectionJobProperties_endTime :: Lens.Lens' EventsDetectionJobProperties (Prelude.Maybe Prelude.UTCTime)
eventsDetectionJobProperties_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EventsDetectionJobProperties -> f EventsDetectionJobProperties
eventsDetectionJobProperties_endTime = (EventsDetectionJobProperties -> Maybe POSIX)
-> (EventsDetectionJobProperties
    -> Maybe POSIX -> EventsDetectionJobProperties)
-> Lens
     EventsDetectionJobProperties
     EventsDetectionJobProperties
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventsDetectionJobProperties' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:EventsDetectionJobProperties' :: EventsDetectionJobProperties -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: EventsDetectionJobProperties
s@EventsDetectionJobProperties' {} Maybe POSIX
a -> EventsDetectionJobProperties
s {$sel:endTime:EventsDetectionJobProperties' :: Maybe POSIX
endTime = Maybe POSIX
a} :: EventsDetectionJobProperties) ((Maybe POSIX -> f (Maybe POSIX))
 -> EventsDetectionJobProperties -> f EventsDetectionJobProperties)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EventsDetectionJobProperties
-> f EventsDetectionJobProperties
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
-- events detection job.
eventsDetectionJobProperties_outputDataConfig :: Lens.Lens' EventsDetectionJobProperties (Prelude.Maybe OutputDataConfig)
eventsDetectionJobProperties_outputDataConfig :: (Maybe OutputDataConfig -> f (Maybe OutputDataConfig))
-> EventsDetectionJobProperties -> f EventsDetectionJobProperties
eventsDetectionJobProperties_outputDataConfig = (EventsDetectionJobProperties -> Maybe OutputDataConfig)
-> (EventsDetectionJobProperties
    -> Maybe OutputDataConfig -> EventsDetectionJobProperties)
-> Lens
     EventsDetectionJobProperties
     EventsDetectionJobProperties
     (Maybe OutputDataConfig)
     (Maybe OutputDataConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventsDetectionJobProperties' {Maybe OutputDataConfig
outputDataConfig :: Maybe OutputDataConfig
$sel:outputDataConfig:EventsDetectionJobProperties' :: EventsDetectionJobProperties -> Maybe OutputDataConfig
outputDataConfig} -> Maybe OutputDataConfig
outputDataConfig) (\s :: EventsDetectionJobProperties
s@EventsDetectionJobProperties' {} Maybe OutputDataConfig
a -> EventsDetectionJobProperties
s {$sel:outputDataConfig:EventsDetectionJobProperties' :: Maybe OutputDataConfig
outputDataConfig = Maybe OutputDataConfig
a} :: EventsDetectionJobProperties)

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

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

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

-- | The time that the events detection job was submitted for processing.
eventsDetectionJobProperties_submitTime :: Lens.Lens' EventsDetectionJobProperties (Prelude.Maybe Prelude.UTCTime)
eventsDetectionJobProperties_submitTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EventsDetectionJobProperties -> f EventsDetectionJobProperties
eventsDetectionJobProperties_submitTime = (EventsDetectionJobProperties -> Maybe POSIX)
-> (EventsDetectionJobProperties
    -> Maybe POSIX -> EventsDetectionJobProperties)
-> Lens
     EventsDetectionJobProperties
     EventsDetectionJobProperties
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventsDetectionJobProperties' {Maybe POSIX
submitTime :: Maybe POSIX
$sel:submitTime:EventsDetectionJobProperties' :: EventsDetectionJobProperties -> Maybe POSIX
submitTime} -> Maybe POSIX
submitTime) (\s :: EventsDetectionJobProperties
s@EventsDetectionJobProperties' {} Maybe POSIX
a -> EventsDetectionJobProperties
s {$sel:submitTime:EventsDetectionJobProperties' :: Maybe POSIX
submitTime = Maybe POSIX
a} :: EventsDetectionJobProperties) ((Maybe POSIX -> f (Maybe POSIX))
 -> EventsDetectionJobProperties -> f EventsDetectionJobProperties)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EventsDetectionJobProperties
-> f EventsDetectionJobProperties
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 EventsDetectionJobProperties where
  parseJSON :: Value -> Parser EventsDetectionJobProperties
parseJSON =
    String
-> (Object -> Parser EventsDetectionJobProperties)
-> Value
-> Parser EventsDetectionJobProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EventsDetectionJobProperties"
      ( \Object
x ->
          Maybe LanguageCode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe InputDataConfig
-> Maybe POSIX
-> Maybe OutputDataConfig
-> Maybe Text
-> Maybe JobStatus
-> Maybe Text
-> Maybe POSIX
-> EventsDetectionJobProperties
EventsDetectionJobProperties'
            (Maybe LanguageCode
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (NonEmpty Text)
 -> Maybe InputDataConfig
 -> Maybe POSIX
 -> Maybe OutputDataConfig
 -> Maybe Text
 -> Maybe JobStatus
 -> Maybe Text
 -> Maybe POSIX
 -> EventsDetectionJobProperties)
-> Parser (Maybe LanguageCode)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe InputDataConfig
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> EventsDetectionJobProperties)
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 (NonEmpty Text)
   -> Maybe InputDataConfig
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> EventsDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe InputDataConfig
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> EventsDetectionJobProperties)
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 (NonEmpty Text)
   -> Maybe InputDataConfig
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> EventsDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe InputDataConfig
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> EventsDetectionJobProperties)
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 (NonEmpty Text)
   -> Maybe InputDataConfig
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> EventsDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe InputDataConfig
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> EventsDetectionJobProperties)
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 (NonEmpty Text)
   -> Maybe InputDataConfig
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> EventsDetectionJobProperties)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe InputDataConfig
      -> Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> EventsDetectionJobProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TargetEventTypes")
            Parser
  (Maybe InputDataConfig
   -> Maybe POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> EventsDetectionJobProperties)
-> Parser (Maybe InputDataConfig)
-> Parser
     (Maybe POSIX
      -> Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> EventsDetectionJobProperties)
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 POSIX
   -> Maybe OutputDataConfig
   -> Maybe Text
   -> Maybe JobStatus
   -> Maybe Text
   -> Maybe POSIX
   -> EventsDetectionJobProperties)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe OutputDataConfig
      -> Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> EventsDetectionJobProperties)
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
   -> EventsDetectionJobProperties)
-> Parser (Maybe OutputDataConfig)
-> Parser
     (Maybe Text
      -> Maybe JobStatus
      -> Maybe Text
      -> Maybe POSIX
      -> EventsDetectionJobProperties)
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
   -> EventsDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe JobStatus
      -> Maybe Text -> Maybe POSIX -> EventsDetectionJobProperties)
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 -> EventsDetectionJobProperties)
-> Parser (Maybe JobStatus)
-> Parser
     (Maybe Text -> Maybe POSIX -> EventsDetectionJobProperties)
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 -> EventsDetectionJobProperties)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> EventsDetectionJobProperties)
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 -> EventsDetectionJobProperties)
-> Parser (Maybe POSIX) -> Parser EventsDetectionJobProperties
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
    EventsDetectionJobProperties

instance Prelude.NFData EventsDetectionJobProperties