{-# 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.SWF.Types.ActivityTaskScheduledEventAttributes
-- 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.SWF.Types.ActivityTaskScheduledEventAttributes where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SWF.Types.ActivityType
import Amazonka.SWF.Types.TaskList

-- | Provides the details of the @ActivityTaskScheduled@ event.
--
-- /See:/ 'newActivityTaskScheduledEventAttributes' smart constructor.
data ActivityTaskScheduledEventAttributes = ActivityTaskScheduledEventAttributes'
  { -- | Data attached to the event that can be used by the decider in subsequent
    -- workflow tasks. This data isn\'t sent to the activity.
    ActivityTaskScheduledEventAttributes -> Maybe Text
control :: Prelude.Maybe Prelude.Text,
    -- | The maximum time before which the worker processing this task must
    -- report progress by calling RecordActivityTaskHeartbeat. If the timeout
    -- is exceeded, the activity task is automatically timed out. If the worker
    -- subsequently attempts to record a heartbeat or return a result, it is
    -- ignored.
    ActivityTaskScheduledEventAttributes -> Maybe Text
heartbeatTimeout :: Prelude.Maybe Prelude.Text,
    -- | The maximum amount of time for this activity task.
    ActivityTaskScheduledEventAttributes -> Maybe Text
scheduleToCloseTimeout :: Prelude.Maybe Prelude.Text,
    -- | The input provided to the activity task.
    ActivityTaskScheduledEventAttributes -> Maybe Text
input :: Prelude.Maybe Prelude.Text,
    -- | The priority to assign to the scheduled activity task. If set, this
    -- overrides any default priority value that was assigned when the activity
    -- type was registered.
    --
    -- Valid values are integers that range from Java\'s @Integer.MIN_VALUE@
    -- (-2147483648) to @Integer.MAX_VALUE@ (2147483647). Higher numbers
    -- indicate higher priority.
    --
    -- For more information about setting task priority, see
    -- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html Setting Task Priority>
    -- in the /Amazon SWF Developer Guide/.
    ActivityTaskScheduledEventAttributes -> Maybe Text
taskPriority :: Prelude.Maybe Prelude.Text,
    -- | The maximum amount of time the activity task can wait to be assigned to
    -- a worker.
    ActivityTaskScheduledEventAttributes -> Maybe Text
scheduleToStartTimeout :: Prelude.Maybe Prelude.Text,
    -- | The maximum amount of time a worker may take to process the activity
    -- task.
    ActivityTaskScheduledEventAttributes -> Maybe Text
startToCloseTimeout :: Prelude.Maybe Prelude.Text,
    -- | The type of the activity task.
    ActivityTaskScheduledEventAttributes -> ActivityType
activityType :: ActivityType,
    -- | The unique ID of the activity task.
    ActivityTaskScheduledEventAttributes -> Text
activityId :: Prelude.Text,
    -- | The task list in which the activity task has been scheduled.
    ActivityTaskScheduledEventAttributes -> TaskList
taskList :: TaskList,
    -- | The ID of the @DecisionTaskCompleted@ event corresponding to the
    -- decision that resulted in the scheduling of this activity task. This
    -- information can be useful for diagnosing problems by tracing back the
    -- chain of events leading up to this event.
    ActivityTaskScheduledEventAttributes -> Integer
decisionTaskCompletedEventId :: Prelude.Integer
  }
  deriving (ActivityTaskScheduledEventAttributes
-> ActivityTaskScheduledEventAttributes -> Bool
(ActivityTaskScheduledEventAttributes
 -> ActivityTaskScheduledEventAttributes -> Bool)
-> (ActivityTaskScheduledEventAttributes
    -> ActivityTaskScheduledEventAttributes -> Bool)
-> Eq ActivityTaskScheduledEventAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActivityTaskScheduledEventAttributes
-> ActivityTaskScheduledEventAttributes -> Bool
$c/= :: ActivityTaskScheduledEventAttributes
-> ActivityTaskScheduledEventAttributes -> Bool
== :: ActivityTaskScheduledEventAttributes
-> ActivityTaskScheduledEventAttributes -> Bool
$c== :: ActivityTaskScheduledEventAttributes
-> ActivityTaskScheduledEventAttributes -> Bool
Prelude.Eq, ReadPrec [ActivityTaskScheduledEventAttributes]
ReadPrec ActivityTaskScheduledEventAttributes
Int -> ReadS ActivityTaskScheduledEventAttributes
ReadS [ActivityTaskScheduledEventAttributes]
(Int -> ReadS ActivityTaskScheduledEventAttributes)
-> ReadS [ActivityTaskScheduledEventAttributes]
-> ReadPrec ActivityTaskScheduledEventAttributes
-> ReadPrec [ActivityTaskScheduledEventAttributes]
-> Read ActivityTaskScheduledEventAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActivityTaskScheduledEventAttributes]
$creadListPrec :: ReadPrec [ActivityTaskScheduledEventAttributes]
readPrec :: ReadPrec ActivityTaskScheduledEventAttributes
$creadPrec :: ReadPrec ActivityTaskScheduledEventAttributes
readList :: ReadS [ActivityTaskScheduledEventAttributes]
$creadList :: ReadS [ActivityTaskScheduledEventAttributes]
readsPrec :: Int -> ReadS ActivityTaskScheduledEventAttributes
$creadsPrec :: Int -> ReadS ActivityTaskScheduledEventAttributes
Prelude.Read, Int -> ActivityTaskScheduledEventAttributes -> ShowS
[ActivityTaskScheduledEventAttributes] -> ShowS
ActivityTaskScheduledEventAttributes -> String
(Int -> ActivityTaskScheduledEventAttributes -> ShowS)
-> (ActivityTaskScheduledEventAttributes -> String)
-> ([ActivityTaskScheduledEventAttributes] -> ShowS)
-> Show ActivityTaskScheduledEventAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActivityTaskScheduledEventAttributes] -> ShowS
$cshowList :: [ActivityTaskScheduledEventAttributes] -> ShowS
show :: ActivityTaskScheduledEventAttributes -> String
$cshow :: ActivityTaskScheduledEventAttributes -> String
showsPrec :: Int -> ActivityTaskScheduledEventAttributes -> ShowS
$cshowsPrec :: Int -> ActivityTaskScheduledEventAttributes -> ShowS
Prelude.Show, (forall x.
 ActivityTaskScheduledEventAttributes
 -> Rep ActivityTaskScheduledEventAttributes x)
-> (forall x.
    Rep ActivityTaskScheduledEventAttributes x
    -> ActivityTaskScheduledEventAttributes)
-> Generic ActivityTaskScheduledEventAttributes
forall x.
Rep ActivityTaskScheduledEventAttributes x
-> ActivityTaskScheduledEventAttributes
forall x.
ActivityTaskScheduledEventAttributes
-> Rep ActivityTaskScheduledEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ActivityTaskScheduledEventAttributes x
-> ActivityTaskScheduledEventAttributes
$cfrom :: forall x.
ActivityTaskScheduledEventAttributes
-> Rep ActivityTaskScheduledEventAttributes x
Prelude.Generic)

-- |
-- Create a value of 'ActivityTaskScheduledEventAttributes' 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:
--
-- 'control', 'activityTaskScheduledEventAttributes_control' - Data attached to the event that can be used by the decider in subsequent
-- workflow tasks. This data isn\'t sent to the activity.
--
-- 'heartbeatTimeout', 'activityTaskScheduledEventAttributes_heartbeatTimeout' - The maximum time before which the worker processing this task must
-- report progress by calling RecordActivityTaskHeartbeat. If the timeout
-- is exceeded, the activity task is automatically timed out. If the worker
-- subsequently attempts to record a heartbeat or return a result, it is
-- ignored.
--
-- 'scheduleToCloseTimeout', 'activityTaskScheduledEventAttributes_scheduleToCloseTimeout' - The maximum amount of time for this activity task.
--
-- 'input', 'activityTaskScheduledEventAttributes_input' - The input provided to the activity task.
--
-- 'taskPriority', 'activityTaskScheduledEventAttributes_taskPriority' - The priority to assign to the scheduled activity task. If set, this
-- overrides any default priority value that was assigned when the activity
-- type was registered.
--
-- Valid values are integers that range from Java\'s @Integer.MIN_VALUE@
-- (-2147483648) to @Integer.MAX_VALUE@ (2147483647). Higher numbers
-- indicate higher priority.
--
-- For more information about setting task priority, see
-- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html Setting Task Priority>
-- in the /Amazon SWF Developer Guide/.
--
-- 'scheduleToStartTimeout', 'activityTaskScheduledEventAttributes_scheduleToStartTimeout' - The maximum amount of time the activity task can wait to be assigned to
-- a worker.
--
-- 'startToCloseTimeout', 'activityTaskScheduledEventAttributes_startToCloseTimeout' - The maximum amount of time a worker may take to process the activity
-- task.
--
-- 'activityType', 'activityTaskScheduledEventAttributes_activityType' - The type of the activity task.
--
-- 'activityId', 'activityTaskScheduledEventAttributes_activityId' - The unique ID of the activity task.
--
-- 'taskList', 'activityTaskScheduledEventAttributes_taskList' - The task list in which the activity task has been scheduled.
--
-- 'decisionTaskCompletedEventId', 'activityTaskScheduledEventAttributes_decisionTaskCompletedEventId' - The ID of the @DecisionTaskCompleted@ event corresponding to the
-- decision that resulted in the scheduling of this activity task. This
-- information can be useful for diagnosing problems by tracing back the
-- chain of events leading up to this event.
newActivityTaskScheduledEventAttributes ::
  -- | 'activityType'
  ActivityType ->
  -- | 'activityId'
  Prelude.Text ->
  -- | 'taskList'
  TaskList ->
  -- | 'decisionTaskCompletedEventId'
  Prelude.Integer ->
  ActivityTaskScheduledEventAttributes
newActivityTaskScheduledEventAttributes :: ActivityType
-> Text
-> TaskList
-> Integer
-> ActivityTaskScheduledEventAttributes
newActivityTaskScheduledEventAttributes
  ActivityType
pActivityType_
  Text
pActivityId_
  TaskList
pTaskList_
  Integer
pDecisionTaskCompletedEventId_ =
    ActivityTaskScheduledEventAttributes' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ActivityType
-> Text
-> TaskList
-> Integer
-> ActivityTaskScheduledEventAttributes
ActivityTaskScheduledEventAttributes'
      { $sel:control:ActivityTaskScheduledEventAttributes' :: Maybe Text
control =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:heartbeatTimeout:ActivityTaskScheduledEventAttributes' :: Maybe Text
heartbeatTimeout = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:scheduleToCloseTimeout:ActivityTaskScheduledEventAttributes' :: Maybe Text
scheduleToCloseTimeout =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:input:ActivityTaskScheduledEventAttributes' :: Maybe Text
input = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:taskPriority:ActivityTaskScheduledEventAttributes' :: Maybe Text
taskPriority = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:scheduleToStartTimeout:ActivityTaskScheduledEventAttributes' :: Maybe Text
scheduleToStartTimeout =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:startToCloseTimeout:ActivityTaskScheduledEventAttributes' :: Maybe Text
startToCloseTimeout = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:activityType:ActivityTaskScheduledEventAttributes' :: ActivityType
activityType = ActivityType
pActivityType_,
        $sel:activityId:ActivityTaskScheduledEventAttributes' :: Text
activityId = Text
pActivityId_,
        $sel:taskList:ActivityTaskScheduledEventAttributes' :: TaskList
taskList = TaskList
pTaskList_,
        $sel:decisionTaskCompletedEventId:ActivityTaskScheduledEventAttributes' :: Integer
decisionTaskCompletedEventId =
          Integer
pDecisionTaskCompletedEventId_
      }

-- | Data attached to the event that can be used by the decider in subsequent
-- workflow tasks. This data isn\'t sent to the activity.
activityTaskScheduledEventAttributes_control :: Lens.Lens' ActivityTaskScheduledEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskScheduledEventAttributes_control :: (Maybe Text -> f (Maybe Text))
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_control = (ActivityTaskScheduledEventAttributes -> Maybe Text)
-> (ActivityTaskScheduledEventAttributes
    -> Maybe Text -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {Maybe Text
control :: Maybe Text
$sel:control:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> Maybe Text
control} -> Maybe Text
control) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} Maybe Text
a -> ActivityTaskScheduledEventAttributes
s {$sel:control:ActivityTaskScheduledEventAttributes' :: Maybe Text
control = Maybe Text
a} :: ActivityTaskScheduledEventAttributes)

-- | The maximum time before which the worker processing this task must
-- report progress by calling RecordActivityTaskHeartbeat. If the timeout
-- is exceeded, the activity task is automatically timed out. If the worker
-- subsequently attempts to record a heartbeat or return a result, it is
-- ignored.
activityTaskScheduledEventAttributes_heartbeatTimeout :: Lens.Lens' ActivityTaskScheduledEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskScheduledEventAttributes_heartbeatTimeout :: (Maybe Text -> f (Maybe Text))
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_heartbeatTimeout = (ActivityTaskScheduledEventAttributes -> Maybe Text)
-> (ActivityTaskScheduledEventAttributes
    -> Maybe Text -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {Maybe Text
heartbeatTimeout :: Maybe Text
$sel:heartbeatTimeout:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> Maybe Text
heartbeatTimeout} -> Maybe Text
heartbeatTimeout) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} Maybe Text
a -> ActivityTaskScheduledEventAttributes
s {$sel:heartbeatTimeout:ActivityTaskScheduledEventAttributes' :: Maybe Text
heartbeatTimeout = Maybe Text
a} :: ActivityTaskScheduledEventAttributes)

-- | The maximum amount of time for this activity task.
activityTaskScheduledEventAttributes_scheduleToCloseTimeout :: Lens.Lens' ActivityTaskScheduledEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskScheduledEventAttributes_scheduleToCloseTimeout :: (Maybe Text -> f (Maybe Text))
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_scheduleToCloseTimeout = (ActivityTaskScheduledEventAttributes -> Maybe Text)
-> (ActivityTaskScheduledEventAttributes
    -> Maybe Text -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {Maybe Text
scheduleToCloseTimeout :: Maybe Text
$sel:scheduleToCloseTimeout:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> Maybe Text
scheduleToCloseTimeout} -> Maybe Text
scheduleToCloseTimeout) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} Maybe Text
a -> ActivityTaskScheduledEventAttributes
s {$sel:scheduleToCloseTimeout:ActivityTaskScheduledEventAttributes' :: Maybe Text
scheduleToCloseTimeout = Maybe Text
a} :: ActivityTaskScheduledEventAttributes)

-- | The input provided to the activity task.
activityTaskScheduledEventAttributes_input :: Lens.Lens' ActivityTaskScheduledEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskScheduledEventAttributes_input :: (Maybe Text -> f (Maybe Text))
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_input = (ActivityTaskScheduledEventAttributes -> Maybe Text)
-> (ActivityTaskScheduledEventAttributes
    -> Maybe Text -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {Maybe Text
input :: Maybe Text
$sel:input:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> Maybe Text
input} -> Maybe Text
input) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} Maybe Text
a -> ActivityTaskScheduledEventAttributes
s {$sel:input:ActivityTaskScheduledEventAttributes' :: Maybe Text
input = Maybe Text
a} :: ActivityTaskScheduledEventAttributes)

-- | The priority to assign to the scheduled activity task. If set, this
-- overrides any default priority value that was assigned when the activity
-- type was registered.
--
-- Valid values are integers that range from Java\'s @Integer.MIN_VALUE@
-- (-2147483648) to @Integer.MAX_VALUE@ (2147483647). Higher numbers
-- indicate higher priority.
--
-- For more information about setting task priority, see
-- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html Setting Task Priority>
-- in the /Amazon SWF Developer Guide/.
activityTaskScheduledEventAttributes_taskPriority :: Lens.Lens' ActivityTaskScheduledEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskScheduledEventAttributes_taskPriority :: (Maybe Text -> f (Maybe Text))
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_taskPriority = (ActivityTaskScheduledEventAttributes -> Maybe Text)
-> (ActivityTaskScheduledEventAttributes
    -> Maybe Text -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {Maybe Text
taskPriority :: Maybe Text
$sel:taskPriority:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> Maybe Text
taskPriority} -> Maybe Text
taskPriority) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} Maybe Text
a -> ActivityTaskScheduledEventAttributes
s {$sel:taskPriority:ActivityTaskScheduledEventAttributes' :: Maybe Text
taskPriority = Maybe Text
a} :: ActivityTaskScheduledEventAttributes)

-- | The maximum amount of time the activity task can wait to be assigned to
-- a worker.
activityTaskScheduledEventAttributes_scheduleToStartTimeout :: Lens.Lens' ActivityTaskScheduledEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskScheduledEventAttributes_scheduleToStartTimeout :: (Maybe Text -> f (Maybe Text))
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_scheduleToStartTimeout = (ActivityTaskScheduledEventAttributes -> Maybe Text)
-> (ActivityTaskScheduledEventAttributes
    -> Maybe Text -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {Maybe Text
scheduleToStartTimeout :: Maybe Text
$sel:scheduleToStartTimeout:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> Maybe Text
scheduleToStartTimeout} -> Maybe Text
scheduleToStartTimeout) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} Maybe Text
a -> ActivityTaskScheduledEventAttributes
s {$sel:scheduleToStartTimeout:ActivityTaskScheduledEventAttributes' :: Maybe Text
scheduleToStartTimeout = Maybe Text
a} :: ActivityTaskScheduledEventAttributes)

-- | The maximum amount of time a worker may take to process the activity
-- task.
activityTaskScheduledEventAttributes_startToCloseTimeout :: Lens.Lens' ActivityTaskScheduledEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskScheduledEventAttributes_startToCloseTimeout :: (Maybe Text -> f (Maybe Text))
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_startToCloseTimeout = (ActivityTaskScheduledEventAttributes -> Maybe Text)
-> (ActivityTaskScheduledEventAttributes
    -> Maybe Text -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {Maybe Text
startToCloseTimeout :: Maybe Text
$sel:startToCloseTimeout:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> Maybe Text
startToCloseTimeout} -> Maybe Text
startToCloseTimeout) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} Maybe Text
a -> ActivityTaskScheduledEventAttributes
s {$sel:startToCloseTimeout:ActivityTaskScheduledEventAttributes' :: Maybe Text
startToCloseTimeout = Maybe Text
a} :: ActivityTaskScheduledEventAttributes)

-- | The type of the activity task.
activityTaskScheduledEventAttributes_activityType :: Lens.Lens' ActivityTaskScheduledEventAttributes ActivityType
activityTaskScheduledEventAttributes_activityType :: (ActivityType -> f ActivityType)
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_activityType = (ActivityTaskScheduledEventAttributes -> ActivityType)
-> (ActivityTaskScheduledEventAttributes
    -> ActivityType -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     ActivityType
     ActivityType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {ActivityType
activityType :: ActivityType
$sel:activityType:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> ActivityType
activityType} -> ActivityType
activityType) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} ActivityType
a -> ActivityTaskScheduledEventAttributes
s {$sel:activityType:ActivityTaskScheduledEventAttributes' :: ActivityType
activityType = ActivityType
a} :: ActivityTaskScheduledEventAttributes)

-- | The unique ID of the activity task.
activityTaskScheduledEventAttributes_activityId :: Lens.Lens' ActivityTaskScheduledEventAttributes Prelude.Text
activityTaskScheduledEventAttributes_activityId :: (Text -> f Text)
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_activityId = (ActivityTaskScheduledEventAttributes -> Text)
-> (ActivityTaskScheduledEventAttributes
    -> Text -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {Text
activityId :: Text
$sel:activityId:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> Text
activityId} -> Text
activityId) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} Text
a -> ActivityTaskScheduledEventAttributes
s {$sel:activityId:ActivityTaskScheduledEventAttributes' :: Text
activityId = Text
a} :: ActivityTaskScheduledEventAttributes)

-- | The task list in which the activity task has been scheduled.
activityTaskScheduledEventAttributes_taskList :: Lens.Lens' ActivityTaskScheduledEventAttributes TaskList
activityTaskScheduledEventAttributes_taskList :: (TaskList -> f TaskList)
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_taskList = (ActivityTaskScheduledEventAttributes -> TaskList)
-> (ActivityTaskScheduledEventAttributes
    -> TaskList -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     TaskList
     TaskList
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {TaskList
taskList :: TaskList
$sel:taskList:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> TaskList
taskList} -> TaskList
taskList) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} TaskList
a -> ActivityTaskScheduledEventAttributes
s {$sel:taskList:ActivityTaskScheduledEventAttributes' :: TaskList
taskList = TaskList
a} :: ActivityTaskScheduledEventAttributes)

-- | The ID of the @DecisionTaskCompleted@ event corresponding to the
-- decision that resulted in the scheduling of this activity task. This
-- information can be useful for diagnosing problems by tracing back the
-- chain of events leading up to this event.
activityTaskScheduledEventAttributes_decisionTaskCompletedEventId :: Lens.Lens' ActivityTaskScheduledEventAttributes Prelude.Integer
activityTaskScheduledEventAttributes_decisionTaskCompletedEventId :: (Integer -> f Integer)
-> ActivityTaskScheduledEventAttributes
-> f ActivityTaskScheduledEventAttributes
activityTaskScheduledEventAttributes_decisionTaskCompletedEventId = (ActivityTaskScheduledEventAttributes -> Integer)
-> (ActivityTaskScheduledEventAttributes
    -> Integer -> ActivityTaskScheduledEventAttributes)
-> Lens
     ActivityTaskScheduledEventAttributes
     ActivityTaskScheduledEventAttributes
     Integer
     Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskScheduledEventAttributes' {Integer
decisionTaskCompletedEventId :: Integer
$sel:decisionTaskCompletedEventId:ActivityTaskScheduledEventAttributes' :: ActivityTaskScheduledEventAttributes -> Integer
decisionTaskCompletedEventId} -> Integer
decisionTaskCompletedEventId) (\s :: ActivityTaskScheduledEventAttributes
s@ActivityTaskScheduledEventAttributes' {} Integer
a -> ActivityTaskScheduledEventAttributes
s {$sel:decisionTaskCompletedEventId:ActivityTaskScheduledEventAttributes' :: Integer
decisionTaskCompletedEventId = Integer
a} :: ActivityTaskScheduledEventAttributes)

instance
  Core.FromJSON
    ActivityTaskScheduledEventAttributes
  where
  parseJSON :: Value -> Parser ActivityTaskScheduledEventAttributes
parseJSON =
    String
-> (Object -> Parser ActivityTaskScheduledEventAttributes)
-> Value
-> Parser ActivityTaskScheduledEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ActivityTaskScheduledEventAttributes"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ActivityType
-> Text
-> TaskList
-> Integer
-> ActivityTaskScheduledEventAttributes
ActivityTaskScheduledEventAttributes'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> ActivityType
 -> Text
 -> TaskList
 -> Integer
 -> ActivityTaskScheduledEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ActivityType
      -> Text
      -> TaskList
      -> Integer
      -> ActivityTaskScheduledEventAttributes)
forall (f :: * -> *) a b. Functor 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
"control")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ActivityType
   -> Text
   -> TaskList
   -> Integer
   -> ActivityTaskScheduledEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ActivityType
      -> Text
      -> TaskList
      -> Integer
      -> ActivityTaskScheduledEventAttributes)
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
"heartbeatTimeout")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ActivityType
   -> Text
   -> TaskList
   -> Integer
   -> ActivityTaskScheduledEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ActivityType
      -> Text
      -> TaskList
      -> Integer
      -> ActivityTaskScheduledEventAttributes)
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
"scheduleToCloseTimeout")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ActivityType
   -> Text
   -> TaskList
   -> Integer
   -> ActivityTaskScheduledEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ActivityType
      -> Text
      -> TaskList
      -> Integer
      -> ActivityTaskScheduledEventAttributes)
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
"input")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ActivityType
   -> Text
   -> TaskList
   -> Integer
   -> ActivityTaskScheduledEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> ActivityType
      -> Text
      -> TaskList
      -> Integer
      -> ActivityTaskScheduledEventAttributes)
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
"taskPriority")
            Parser
  (Maybe Text
   -> Maybe Text
   -> ActivityType
   -> Text
   -> TaskList
   -> Integer
   -> ActivityTaskScheduledEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> ActivityType
      -> Text
      -> TaskList
      -> Integer
      -> ActivityTaskScheduledEventAttributes)
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
"scheduleToStartTimeout")
            Parser
  (Maybe Text
   -> ActivityType
   -> Text
   -> TaskList
   -> Integer
   -> ActivityTaskScheduledEventAttributes)
-> Parser (Maybe Text)
-> Parser
     (ActivityType
      -> Text
      -> TaskList
      -> Integer
      -> ActivityTaskScheduledEventAttributes)
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
"startToCloseTimeout")
            Parser
  (ActivityType
   -> Text
   -> TaskList
   -> Integer
   -> ActivityTaskScheduledEventAttributes)
-> Parser ActivityType
-> Parser
     (Text
      -> TaskList -> Integer -> ActivityTaskScheduledEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ActivityType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"activityType")
            Parser
  (Text
   -> TaskList -> Integer -> ActivityTaskScheduledEventAttributes)
-> Parser Text
-> Parser
     (TaskList -> Integer -> ActivityTaskScheduledEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"activityId")
            Parser
  (TaskList -> Integer -> ActivityTaskScheduledEventAttributes)
-> Parser TaskList
-> Parser (Integer -> ActivityTaskScheduledEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser TaskList
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"taskList")
            Parser (Integer -> ActivityTaskScheduledEventAttributes)
-> Parser Integer -> Parser ActivityTaskScheduledEventAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"decisionTaskCompletedEventId")
      )

instance
  Prelude.Hashable
    ActivityTaskScheduledEventAttributes

instance
  Prelude.NFData
    ActivityTaskScheduledEventAttributes