{-# 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.ScheduleActivityTaskDecisionAttributes
-- 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.ScheduleActivityTaskDecisionAttributes 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 @ScheduleActivityTask@ decision.
--
-- __Access Control__
--
-- You can use IAM policies to control this decision\'s access to Amazon
-- SWF resources as follows:
--
-- -   Use a @Resource@ element with the domain name to limit the action to
--     only specified domains.
--
-- -   Use an @Action@ element to allow or deny permission to call this
--     action.
--
-- -   Constrain the following parameters by using a @Condition@ element
--     with the appropriate keys.
--
--     -   @activityType.name@ – String constraint. The key is
--         @swf:activityType.name@.
--
--     -   @activityType.version@ – String constraint. The key is
--         @swf:activityType.version@.
--
--     -   @taskList@ – String constraint. The key is @swf:taskList.name@.
--
-- If the caller doesn\'t have sufficient permissions to invoke the action,
-- or the parameter values fall outside the specified constraints, the
-- action fails. The associated event attribute\'s @cause@ parameter is set
-- to @OPERATION_NOT_PERMITTED@. For details and example IAM policies, see
-- <https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html Using IAM to Manage Access to Amazon SWF Workflows>
-- in the /Amazon SWF Developer Guide/.
--
-- /See:/ 'newScheduleActivityTaskDecisionAttributes' smart constructor.
data ScheduleActivityTaskDecisionAttributes = ScheduleActivityTaskDecisionAttributes'
  { -- | Data attached to the event that can be used by the decider in subsequent
    -- workflow tasks. This data isn\'t sent to the activity.
    ScheduleActivityTaskDecisionAttributes -> Maybe Text
control :: Prelude.Maybe Prelude.Text,
    -- | If set, specifies the maximum time before which a worker processing a
    -- task of this type 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 returns a result, it is ignored. This overrides
    -- the default heartbeat timeout specified when registering the activity
    -- type using RegisterActivityType.
    --
    -- The duration is specified in seconds, an integer greater than or equal
    -- to @0@. You can use @NONE@ to specify unlimited duration.
    ScheduleActivityTaskDecisionAttributes -> Maybe Text
heartbeatTimeout :: Prelude.Maybe Prelude.Text,
    -- | The maximum duration for this activity task.
    --
    -- The duration is specified in seconds, an integer greater than or equal
    -- to @0@. You can use @NONE@ to specify unlimited duration.
    --
    -- A schedule-to-close timeout for this activity task must be specified
    -- either as a default for the activity type or through this field. If
    -- neither this field is set nor a default schedule-to-close timeout was
    -- specified at registration time then a fault is returned.
    ScheduleActivityTaskDecisionAttributes -> Maybe Text
scheduleToCloseTimeout :: Prelude.Maybe Prelude.Text,
    -- | The input provided to the activity task.
    ScheduleActivityTaskDecisionAttributes -> Maybe Text
input :: Prelude.Maybe Prelude.Text,
    -- | If set, specifies the name of the task list in which to schedule the
    -- activity task. If not specified, the @defaultTaskList@ registered with
    -- the activity type is used.
    --
    -- A task list for this activity task must be specified either as a default
    -- for the activity type or through this field. If neither this field is
    -- set nor a default task list was specified at registration time then a
    -- fault is returned.
    --
    -- The specified string must not start or end with whitespace. It must not
    -- contain a @:@ (colon), @\/@ (slash), @|@ (vertical bar), or any control
    -- characters (@\\u0000-\\u001f@ | @\\u007f-\\u009f@). Also, it must not
    -- contain the literal string @arn@.
    ScheduleActivityTaskDecisionAttributes -> Maybe TaskList
taskList :: Prelude.Maybe TaskList,
    -- | If set, specifies the priority with which the activity task is to be
    -- assigned to a worker. This overrides the defaultTaskPriority specified
    -- when registering the activity type using RegisterActivityType. 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/.
    ScheduleActivityTaskDecisionAttributes -> Maybe Text
taskPriority :: Prelude.Maybe Prelude.Text,
    -- | If set, specifies the maximum duration the activity task can wait to be
    -- assigned to a worker. This overrides the default schedule-to-start
    -- timeout specified when registering the activity type using
    -- RegisterActivityType.
    --
    -- The duration is specified in seconds, an integer greater than or equal
    -- to @0@. You can use @NONE@ to specify unlimited duration.
    --
    -- A schedule-to-start timeout for this activity task must be specified
    -- either as a default for the activity type or through this field. If
    -- neither this field is set nor a default schedule-to-start timeout was
    -- specified at registration time then a fault is returned.
    ScheduleActivityTaskDecisionAttributes -> Maybe Text
scheduleToStartTimeout :: Prelude.Maybe Prelude.Text,
    -- | If set, specifies the maximum duration a worker may take to process this
    -- activity task. This overrides the default start-to-close timeout
    -- specified when registering the activity type using RegisterActivityType.
    --
    -- The duration is specified in seconds, an integer greater than or equal
    -- to @0@. You can use @NONE@ to specify unlimited duration.
    --
    -- A start-to-close timeout for this activity task must be specified either
    -- as a default for the activity type or through this field. If neither
    -- this field is set nor a default start-to-close timeout was specified at
    -- registration time then a fault is returned.
    ScheduleActivityTaskDecisionAttributes -> Maybe Text
startToCloseTimeout :: Prelude.Maybe Prelude.Text,
    -- | The type of the activity task to schedule.
    ScheduleActivityTaskDecisionAttributes -> ActivityType
activityType :: ActivityType,
    -- | The @activityId@ of the activity task.
    --
    -- The specified string must not start or end with whitespace. It must not
    -- contain a @:@ (colon), @\/@ (slash), @|@ (vertical bar), or any control
    -- characters (@\\u0000-\\u001f@ | @\\u007f-\\u009f@). Also, it must not
    -- contain the literal string @arn@.
    ScheduleActivityTaskDecisionAttributes -> Text
activityId :: Prelude.Text
  }
  deriving (ScheduleActivityTaskDecisionAttributes
-> ScheduleActivityTaskDecisionAttributes -> Bool
(ScheduleActivityTaskDecisionAttributes
 -> ScheduleActivityTaskDecisionAttributes -> Bool)
-> (ScheduleActivityTaskDecisionAttributes
    -> ScheduleActivityTaskDecisionAttributes -> Bool)
-> Eq ScheduleActivityTaskDecisionAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduleActivityTaskDecisionAttributes
-> ScheduleActivityTaskDecisionAttributes -> Bool
$c/= :: ScheduleActivityTaskDecisionAttributes
-> ScheduleActivityTaskDecisionAttributes -> Bool
== :: ScheduleActivityTaskDecisionAttributes
-> ScheduleActivityTaskDecisionAttributes -> Bool
$c== :: ScheduleActivityTaskDecisionAttributes
-> ScheduleActivityTaskDecisionAttributes -> Bool
Prelude.Eq, ReadPrec [ScheduleActivityTaskDecisionAttributes]
ReadPrec ScheduleActivityTaskDecisionAttributes
Int -> ReadS ScheduleActivityTaskDecisionAttributes
ReadS [ScheduleActivityTaskDecisionAttributes]
(Int -> ReadS ScheduleActivityTaskDecisionAttributes)
-> ReadS [ScheduleActivityTaskDecisionAttributes]
-> ReadPrec ScheduleActivityTaskDecisionAttributes
-> ReadPrec [ScheduleActivityTaskDecisionAttributes]
-> Read ScheduleActivityTaskDecisionAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduleActivityTaskDecisionAttributes]
$creadListPrec :: ReadPrec [ScheduleActivityTaskDecisionAttributes]
readPrec :: ReadPrec ScheduleActivityTaskDecisionAttributes
$creadPrec :: ReadPrec ScheduleActivityTaskDecisionAttributes
readList :: ReadS [ScheduleActivityTaskDecisionAttributes]
$creadList :: ReadS [ScheduleActivityTaskDecisionAttributes]
readsPrec :: Int -> ReadS ScheduleActivityTaskDecisionAttributes
$creadsPrec :: Int -> ReadS ScheduleActivityTaskDecisionAttributes
Prelude.Read, Int -> ScheduleActivityTaskDecisionAttributes -> ShowS
[ScheduleActivityTaskDecisionAttributes] -> ShowS
ScheduleActivityTaskDecisionAttributes -> String
(Int -> ScheduleActivityTaskDecisionAttributes -> ShowS)
-> (ScheduleActivityTaskDecisionAttributes -> String)
-> ([ScheduleActivityTaskDecisionAttributes] -> ShowS)
-> Show ScheduleActivityTaskDecisionAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduleActivityTaskDecisionAttributes] -> ShowS
$cshowList :: [ScheduleActivityTaskDecisionAttributes] -> ShowS
show :: ScheduleActivityTaskDecisionAttributes -> String
$cshow :: ScheduleActivityTaskDecisionAttributes -> String
showsPrec :: Int -> ScheduleActivityTaskDecisionAttributes -> ShowS
$cshowsPrec :: Int -> ScheduleActivityTaskDecisionAttributes -> ShowS
Prelude.Show, (forall x.
 ScheduleActivityTaskDecisionAttributes
 -> Rep ScheduleActivityTaskDecisionAttributes x)
-> (forall x.
    Rep ScheduleActivityTaskDecisionAttributes x
    -> ScheduleActivityTaskDecisionAttributes)
-> Generic ScheduleActivityTaskDecisionAttributes
forall x.
Rep ScheduleActivityTaskDecisionAttributes x
-> ScheduleActivityTaskDecisionAttributes
forall x.
ScheduleActivityTaskDecisionAttributes
-> Rep ScheduleActivityTaskDecisionAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ScheduleActivityTaskDecisionAttributes x
-> ScheduleActivityTaskDecisionAttributes
$cfrom :: forall x.
ScheduleActivityTaskDecisionAttributes
-> Rep ScheduleActivityTaskDecisionAttributes x
Prelude.Generic)

-- |
-- Create a value of 'ScheduleActivityTaskDecisionAttributes' 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', 'scheduleActivityTaskDecisionAttributes_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', 'scheduleActivityTaskDecisionAttributes_heartbeatTimeout' - If set, specifies the maximum time before which a worker processing a
-- task of this type 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 returns a result, it is ignored. This overrides
-- the default heartbeat timeout specified when registering the activity
-- type using RegisterActivityType.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- 'scheduleToCloseTimeout', 'scheduleActivityTaskDecisionAttributes_scheduleToCloseTimeout' - The maximum duration for this activity task.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- A schedule-to-close timeout for this activity task must be specified
-- either as a default for the activity type or through this field. If
-- neither this field is set nor a default schedule-to-close timeout was
-- specified at registration time then a fault is returned.
--
-- 'input', 'scheduleActivityTaskDecisionAttributes_input' - The input provided to the activity task.
--
-- 'taskList', 'scheduleActivityTaskDecisionAttributes_taskList' - If set, specifies the name of the task list in which to schedule the
-- activity task. If not specified, the @defaultTaskList@ registered with
-- the activity type is used.
--
-- A task list for this activity task must be specified either as a default
-- for the activity type or through this field. If neither this field is
-- set nor a default task list was specified at registration time then a
-- fault is returned.
--
-- The specified string must not start or end with whitespace. It must not
-- contain a @:@ (colon), @\/@ (slash), @|@ (vertical bar), or any control
-- characters (@\\u0000-\\u001f@ | @\\u007f-\\u009f@). Also, it must not
-- contain the literal string @arn@.
--
-- 'taskPriority', 'scheduleActivityTaskDecisionAttributes_taskPriority' - If set, specifies the priority with which the activity task is to be
-- assigned to a worker. This overrides the defaultTaskPriority specified
-- when registering the activity type using RegisterActivityType. 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', 'scheduleActivityTaskDecisionAttributes_scheduleToStartTimeout' - If set, specifies the maximum duration the activity task can wait to be
-- assigned to a worker. This overrides the default schedule-to-start
-- timeout specified when registering the activity type using
-- RegisterActivityType.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- A schedule-to-start timeout for this activity task must be specified
-- either as a default for the activity type or through this field. If
-- neither this field is set nor a default schedule-to-start timeout was
-- specified at registration time then a fault is returned.
--
-- 'startToCloseTimeout', 'scheduleActivityTaskDecisionAttributes_startToCloseTimeout' - If set, specifies the maximum duration a worker may take to process this
-- activity task. This overrides the default start-to-close timeout
-- specified when registering the activity type using RegisterActivityType.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- A start-to-close timeout for this activity task must be specified either
-- as a default for the activity type or through this field. If neither
-- this field is set nor a default start-to-close timeout was specified at
-- registration time then a fault is returned.
--
-- 'activityType', 'scheduleActivityTaskDecisionAttributes_activityType' - The type of the activity task to schedule.
--
-- 'activityId', 'scheduleActivityTaskDecisionAttributes_activityId' - The @activityId@ of the activity task.
--
-- The specified string must not start or end with whitespace. It must not
-- contain a @:@ (colon), @\/@ (slash), @|@ (vertical bar), or any control
-- characters (@\\u0000-\\u001f@ | @\\u007f-\\u009f@). Also, it must not
-- contain the literal string @arn@.
newScheduleActivityTaskDecisionAttributes ::
  -- | 'activityType'
  ActivityType ->
  -- | 'activityId'
  Prelude.Text ->
  ScheduleActivityTaskDecisionAttributes
newScheduleActivityTaskDecisionAttributes :: ActivityType -> Text -> ScheduleActivityTaskDecisionAttributes
newScheduleActivityTaskDecisionAttributes
  ActivityType
pActivityType_
  Text
pActivityId_ =
    ScheduleActivityTaskDecisionAttributes' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe TaskList
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ActivityType
-> Text
-> ScheduleActivityTaskDecisionAttributes
ScheduleActivityTaskDecisionAttributes'
      { $sel:control:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
control =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:heartbeatTimeout:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
heartbeatTimeout = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:scheduleToCloseTimeout:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
scheduleToCloseTimeout =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:input:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
input = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:taskList:ScheduleActivityTaskDecisionAttributes' :: Maybe TaskList
taskList = Maybe TaskList
forall a. Maybe a
Prelude.Nothing,
        $sel:taskPriority:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
taskPriority = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:scheduleToStartTimeout:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
scheduleToStartTimeout =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:startToCloseTimeout:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
startToCloseTimeout =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:activityType:ScheduleActivityTaskDecisionAttributes' :: ActivityType
activityType = ActivityType
pActivityType_,
        $sel:activityId:ScheduleActivityTaskDecisionAttributes' :: Text
activityId = Text
pActivityId_
      }

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

-- | If set, specifies the maximum time before which a worker processing a
-- task of this type 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 returns a result, it is ignored. This overrides
-- the default heartbeat timeout specified when registering the activity
-- type using RegisterActivityType.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
scheduleActivityTaskDecisionAttributes_heartbeatTimeout :: Lens.Lens' ScheduleActivityTaskDecisionAttributes (Prelude.Maybe Prelude.Text)
scheduleActivityTaskDecisionAttributes_heartbeatTimeout :: (Maybe Text -> f (Maybe Text))
-> ScheduleActivityTaskDecisionAttributes
-> f ScheduleActivityTaskDecisionAttributes
scheduleActivityTaskDecisionAttributes_heartbeatTimeout = (ScheduleActivityTaskDecisionAttributes -> Maybe Text)
-> (ScheduleActivityTaskDecisionAttributes
    -> Maybe Text -> ScheduleActivityTaskDecisionAttributes)
-> Lens
     ScheduleActivityTaskDecisionAttributes
     ScheduleActivityTaskDecisionAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskDecisionAttributes' {Maybe Text
heartbeatTimeout :: Maybe Text
$sel:heartbeatTimeout:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
heartbeatTimeout} -> Maybe Text
heartbeatTimeout) (\s :: ScheduleActivityTaskDecisionAttributes
s@ScheduleActivityTaskDecisionAttributes' {} Maybe Text
a -> ScheduleActivityTaskDecisionAttributes
s {$sel:heartbeatTimeout:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
heartbeatTimeout = Maybe Text
a} :: ScheduleActivityTaskDecisionAttributes)

-- | The maximum duration for this activity task.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- A schedule-to-close timeout for this activity task must be specified
-- either as a default for the activity type or through this field. If
-- neither this field is set nor a default schedule-to-close timeout was
-- specified at registration time then a fault is returned.
scheduleActivityTaskDecisionAttributes_scheduleToCloseTimeout :: Lens.Lens' ScheduleActivityTaskDecisionAttributes (Prelude.Maybe Prelude.Text)
scheduleActivityTaskDecisionAttributes_scheduleToCloseTimeout :: (Maybe Text -> f (Maybe Text))
-> ScheduleActivityTaskDecisionAttributes
-> f ScheduleActivityTaskDecisionAttributes
scheduleActivityTaskDecisionAttributes_scheduleToCloseTimeout = (ScheduleActivityTaskDecisionAttributes -> Maybe Text)
-> (ScheduleActivityTaskDecisionAttributes
    -> Maybe Text -> ScheduleActivityTaskDecisionAttributes)
-> Lens
     ScheduleActivityTaskDecisionAttributes
     ScheduleActivityTaskDecisionAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskDecisionAttributes' {Maybe Text
scheduleToCloseTimeout :: Maybe Text
$sel:scheduleToCloseTimeout:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
scheduleToCloseTimeout} -> Maybe Text
scheduleToCloseTimeout) (\s :: ScheduleActivityTaskDecisionAttributes
s@ScheduleActivityTaskDecisionAttributes' {} Maybe Text
a -> ScheduleActivityTaskDecisionAttributes
s {$sel:scheduleToCloseTimeout:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
scheduleToCloseTimeout = Maybe Text
a} :: ScheduleActivityTaskDecisionAttributes)

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

-- | If set, specifies the name of the task list in which to schedule the
-- activity task. If not specified, the @defaultTaskList@ registered with
-- the activity type is used.
--
-- A task list for this activity task must be specified either as a default
-- for the activity type or through this field. If neither this field is
-- set nor a default task list was specified at registration time then a
-- fault is returned.
--
-- The specified string must not start or end with whitespace. It must not
-- contain a @:@ (colon), @\/@ (slash), @|@ (vertical bar), or any control
-- characters (@\\u0000-\\u001f@ | @\\u007f-\\u009f@). Also, it must not
-- contain the literal string @arn@.
scheduleActivityTaskDecisionAttributes_taskList :: Lens.Lens' ScheduleActivityTaskDecisionAttributes (Prelude.Maybe TaskList)
scheduleActivityTaskDecisionAttributes_taskList :: (Maybe TaskList -> f (Maybe TaskList))
-> ScheduleActivityTaskDecisionAttributes
-> f ScheduleActivityTaskDecisionAttributes
scheduleActivityTaskDecisionAttributes_taskList = (ScheduleActivityTaskDecisionAttributes -> Maybe TaskList)
-> (ScheduleActivityTaskDecisionAttributes
    -> Maybe TaskList -> ScheduleActivityTaskDecisionAttributes)
-> Lens
     ScheduleActivityTaskDecisionAttributes
     ScheduleActivityTaskDecisionAttributes
     (Maybe TaskList)
     (Maybe TaskList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskDecisionAttributes' {Maybe TaskList
taskList :: Maybe TaskList
$sel:taskList:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe TaskList
taskList} -> Maybe TaskList
taskList) (\s :: ScheduleActivityTaskDecisionAttributes
s@ScheduleActivityTaskDecisionAttributes' {} Maybe TaskList
a -> ScheduleActivityTaskDecisionAttributes
s {$sel:taskList:ScheduleActivityTaskDecisionAttributes' :: Maybe TaskList
taskList = Maybe TaskList
a} :: ScheduleActivityTaskDecisionAttributes)

-- | If set, specifies the priority with which the activity task is to be
-- assigned to a worker. This overrides the defaultTaskPriority specified
-- when registering the activity type using RegisterActivityType. 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/.
scheduleActivityTaskDecisionAttributes_taskPriority :: Lens.Lens' ScheduleActivityTaskDecisionAttributes (Prelude.Maybe Prelude.Text)
scheduleActivityTaskDecisionAttributes_taskPriority :: (Maybe Text -> f (Maybe Text))
-> ScheduleActivityTaskDecisionAttributes
-> f ScheduleActivityTaskDecisionAttributes
scheduleActivityTaskDecisionAttributes_taskPriority = (ScheduleActivityTaskDecisionAttributes -> Maybe Text)
-> (ScheduleActivityTaskDecisionAttributes
    -> Maybe Text -> ScheduleActivityTaskDecisionAttributes)
-> Lens
     ScheduleActivityTaskDecisionAttributes
     ScheduleActivityTaskDecisionAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskDecisionAttributes' {Maybe Text
taskPriority :: Maybe Text
$sel:taskPriority:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
taskPriority} -> Maybe Text
taskPriority) (\s :: ScheduleActivityTaskDecisionAttributes
s@ScheduleActivityTaskDecisionAttributes' {} Maybe Text
a -> ScheduleActivityTaskDecisionAttributes
s {$sel:taskPriority:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
taskPriority = Maybe Text
a} :: ScheduleActivityTaskDecisionAttributes)

-- | If set, specifies the maximum duration the activity task can wait to be
-- assigned to a worker. This overrides the default schedule-to-start
-- timeout specified when registering the activity type using
-- RegisterActivityType.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- A schedule-to-start timeout for this activity task must be specified
-- either as a default for the activity type or through this field. If
-- neither this field is set nor a default schedule-to-start timeout was
-- specified at registration time then a fault is returned.
scheduleActivityTaskDecisionAttributes_scheduleToStartTimeout :: Lens.Lens' ScheduleActivityTaskDecisionAttributes (Prelude.Maybe Prelude.Text)
scheduleActivityTaskDecisionAttributes_scheduleToStartTimeout :: (Maybe Text -> f (Maybe Text))
-> ScheduleActivityTaskDecisionAttributes
-> f ScheduleActivityTaskDecisionAttributes
scheduleActivityTaskDecisionAttributes_scheduleToStartTimeout = (ScheduleActivityTaskDecisionAttributes -> Maybe Text)
-> (ScheduleActivityTaskDecisionAttributes
    -> Maybe Text -> ScheduleActivityTaskDecisionAttributes)
-> Lens
     ScheduleActivityTaskDecisionAttributes
     ScheduleActivityTaskDecisionAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskDecisionAttributes' {Maybe Text
scheduleToStartTimeout :: Maybe Text
$sel:scheduleToStartTimeout:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
scheduleToStartTimeout} -> Maybe Text
scheduleToStartTimeout) (\s :: ScheduleActivityTaskDecisionAttributes
s@ScheduleActivityTaskDecisionAttributes' {} Maybe Text
a -> ScheduleActivityTaskDecisionAttributes
s {$sel:scheduleToStartTimeout:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
scheduleToStartTimeout = Maybe Text
a} :: ScheduleActivityTaskDecisionAttributes)

-- | If set, specifies the maximum duration a worker may take to process this
-- activity task. This overrides the default start-to-close timeout
-- specified when registering the activity type using RegisterActivityType.
--
-- The duration is specified in seconds, an integer greater than or equal
-- to @0@. You can use @NONE@ to specify unlimited duration.
--
-- A start-to-close timeout for this activity task must be specified either
-- as a default for the activity type or through this field. If neither
-- this field is set nor a default start-to-close timeout was specified at
-- registration time then a fault is returned.
scheduleActivityTaskDecisionAttributes_startToCloseTimeout :: Lens.Lens' ScheduleActivityTaskDecisionAttributes (Prelude.Maybe Prelude.Text)
scheduleActivityTaskDecisionAttributes_startToCloseTimeout :: (Maybe Text -> f (Maybe Text))
-> ScheduleActivityTaskDecisionAttributes
-> f ScheduleActivityTaskDecisionAttributes
scheduleActivityTaskDecisionAttributes_startToCloseTimeout = (ScheduleActivityTaskDecisionAttributes -> Maybe Text)
-> (ScheduleActivityTaskDecisionAttributes
    -> Maybe Text -> ScheduleActivityTaskDecisionAttributes)
-> Lens
     ScheduleActivityTaskDecisionAttributes
     ScheduleActivityTaskDecisionAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskDecisionAttributes' {Maybe Text
startToCloseTimeout :: Maybe Text
$sel:startToCloseTimeout:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
startToCloseTimeout} -> Maybe Text
startToCloseTimeout) (\s :: ScheduleActivityTaskDecisionAttributes
s@ScheduleActivityTaskDecisionAttributes' {} Maybe Text
a -> ScheduleActivityTaskDecisionAttributes
s {$sel:startToCloseTimeout:ScheduleActivityTaskDecisionAttributes' :: Maybe Text
startToCloseTimeout = Maybe Text
a} :: ScheduleActivityTaskDecisionAttributes)

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

-- | The @activityId@ of the activity task.
--
-- The specified string must not start or end with whitespace. It must not
-- contain a @:@ (colon), @\/@ (slash), @|@ (vertical bar), or any control
-- characters (@\\u0000-\\u001f@ | @\\u007f-\\u009f@). Also, it must not
-- contain the literal string @arn@.
scheduleActivityTaskDecisionAttributes_activityId :: Lens.Lens' ScheduleActivityTaskDecisionAttributes Prelude.Text
scheduleActivityTaskDecisionAttributes_activityId :: (Text -> f Text)
-> ScheduleActivityTaskDecisionAttributes
-> f ScheduleActivityTaskDecisionAttributes
scheduleActivityTaskDecisionAttributes_activityId = (ScheduleActivityTaskDecisionAttributes -> Text)
-> (ScheduleActivityTaskDecisionAttributes
    -> Text -> ScheduleActivityTaskDecisionAttributes)
-> Lens
     ScheduleActivityTaskDecisionAttributes
     ScheduleActivityTaskDecisionAttributes
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskDecisionAttributes' {Text
activityId :: Text
$sel:activityId:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Text
activityId} -> Text
activityId) (\s :: ScheduleActivityTaskDecisionAttributes
s@ScheduleActivityTaskDecisionAttributes' {} Text
a -> ScheduleActivityTaskDecisionAttributes
s {$sel:activityId:ScheduleActivityTaskDecisionAttributes' :: Text
activityId = Text
a} :: ScheduleActivityTaskDecisionAttributes)

instance
  Prelude.Hashable
    ScheduleActivityTaskDecisionAttributes

instance
  Prelude.NFData
    ScheduleActivityTaskDecisionAttributes

instance
  Core.ToJSON
    ScheduleActivityTaskDecisionAttributes
  where
  toJSON :: ScheduleActivityTaskDecisionAttributes -> Value
toJSON ScheduleActivityTaskDecisionAttributes' {Maybe Text
Maybe TaskList
Text
ActivityType
activityId :: Text
activityType :: ActivityType
startToCloseTimeout :: Maybe Text
scheduleToStartTimeout :: Maybe Text
taskPriority :: Maybe Text
taskList :: Maybe TaskList
input :: Maybe Text
scheduleToCloseTimeout :: Maybe Text
heartbeatTimeout :: Maybe Text
control :: Maybe Text
$sel:activityId:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Text
$sel:activityType:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> ActivityType
$sel:startToCloseTimeout:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
$sel:scheduleToStartTimeout:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
$sel:taskPriority:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
$sel:taskList:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe TaskList
$sel:input:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
$sel:scheduleToCloseTimeout:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
$sel:heartbeatTimeout:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
$sel:control:ScheduleActivityTaskDecisionAttributes' :: ScheduleActivityTaskDecisionAttributes -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"control" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
control,
            (Text
"heartbeatTimeout" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
heartbeatTimeout,
            (Text
"scheduleToCloseTimeout" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
scheduleToCloseTimeout,
            (Text
"input" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
input,
            (Text
"taskList" Text -> TaskList -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TaskList -> Pair) -> Maybe TaskList -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TaskList
taskList,
            (Text
"taskPriority" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
taskPriority,
            (Text
"scheduleToStartTimeout" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
scheduleToStartTimeout,
            (Text
"startToCloseTimeout" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
startToCloseTimeout,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"activityType" Text -> ActivityType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ActivityType
activityType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"activityId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
activityId)
          ]
      )