{-# 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.SSM.Types.MaintenanceWindowTask
-- 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.SSM.Types.MaintenanceWindowTask where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.LoggingInfo
import Amazonka.SSM.Types.MaintenanceWindowTaskCutoffBehavior
import Amazonka.SSM.Types.MaintenanceWindowTaskParameterValueExpression
import Amazonka.SSM.Types.MaintenanceWindowTaskType
import Amazonka.SSM.Types.Target

-- | Information about a task defined for a maintenance window.
--
-- /See:/ 'newMaintenanceWindowTask' smart constructor.
data MaintenanceWindowTask = MaintenanceWindowTask'
  { -- | The Amazon Resource Name (ARN) of the Identity and Access Management
    -- (IAM) service role to use to publish Amazon Simple Notification Service
    -- (Amazon SNS) notifications for maintenance window Run Command tasks.
    MaintenanceWindowTask -> Maybe Text
serviceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The task ID.
    MaintenanceWindowTask -> Maybe Text
windowTaskId :: Prelude.Maybe Prelude.Text,
    -- | The parameters that should be passed to the task when it is run.
    --
    -- @TaskParameters@ has been deprecated. To specify parameters to pass to a
    -- task when it runs, instead use the @Parameters@ option in the
    -- @TaskInvocationParameters@ structure. For information about how Systems
    -- Manager handles these options for the supported maintenance window task
    -- types, see MaintenanceWindowTaskInvocationParameters.
    MaintenanceWindowTask
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text (Core.Sensitive MaintenanceWindowTaskParameterValueExpression))),
    -- | The priority of the task in the maintenance window. The lower the
    -- number, the higher the priority. Tasks that have the same priority are
    -- scheduled in parallel.
    MaintenanceWindowTask -> Maybe Natural
priority :: Prelude.Maybe Prelude.Natural,
    -- | The resource that the task uses during execution. For @RUN_COMMAND@ and
    -- @AUTOMATION@ task types, @TaskArn@ is the Amazon Web Services Systems
    -- Manager (SSM document) name or ARN. For @LAMBDA@ tasks, it\'s the
    -- function name or ARN. For @STEP_FUNCTIONS@ tasks, it\'s the state
    -- machine ARN.
    MaintenanceWindowTask -> Maybe Text
taskArn :: Prelude.Maybe Prelude.Text,
    -- | The specification for whether tasks should continue to run after the
    -- cutoff time specified in the maintenance windows is reached.
    MaintenanceWindowTask -> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior :: Prelude.Maybe MaintenanceWindowTaskCutoffBehavior,
    -- | The maximum number of errors allowed before this task stops being
    -- scheduled.
    MaintenanceWindowTask -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
    -- | The task name.
    MaintenanceWindowTask -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The targets (either instances or tags). Instances are specified using
    -- @Key=instanceids,Values=\<instanceid1>,\<instanceid2>@. Tags are
    -- specified using @Key=\<tag name>,Values=\<tag value>@.
    MaintenanceWindowTask -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | Information about an S3 bucket to write task-level logs to.
    --
    -- @LoggingInfo@ has been deprecated. To specify an Amazon Simple Storage
    -- Service (Amazon S3) bucket to contain logs, instead use the
    -- @OutputS3BucketName@ and @OutputS3KeyPrefix@ options in the
    -- @TaskInvocationParameters@ structure. For information about how Amazon
    -- Web Services Systems Manager handles these options for the supported
    -- maintenance window task types, see
    -- MaintenanceWindowTaskInvocationParameters.
    MaintenanceWindowTask -> Maybe LoggingInfo
loggingInfo :: Prelude.Maybe LoggingInfo,
    -- | The type of task.
    MaintenanceWindowTask -> Maybe MaintenanceWindowTaskType
type' :: Prelude.Maybe MaintenanceWindowTaskType,
    -- | A description of the task.
    MaintenanceWindowTask -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The maximum number of targets this task can be run for, in parallel.
    MaintenanceWindowTask -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text,
    -- | The ID of the maintenance window where the task is registered.
    MaintenanceWindowTask -> Maybe Text
windowId :: Prelude.Maybe Prelude.Text
  }
  deriving (MaintenanceWindowTask -> MaintenanceWindowTask -> Bool
(MaintenanceWindowTask -> MaintenanceWindowTask -> Bool)
-> (MaintenanceWindowTask -> MaintenanceWindowTask -> Bool)
-> Eq MaintenanceWindowTask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceWindowTask -> MaintenanceWindowTask -> Bool
$c/= :: MaintenanceWindowTask -> MaintenanceWindowTask -> Bool
== :: MaintenanceWindowTask -> MaintenanceWindowTask -> Bool
$c== :: MaintenanceWindowTask -> MaintenanceWindowTask -> Bool
Prelude.Eq, Int -> MaintenanceWindowTask -> ShowS
[MaintenanceWindowTask] -> ShowS
MaintenanceWindowTask -> String
(Int -> MaintenanceWindowTask -> ShowS)
-> (MaintenanceWindowTask -> String)
-> ([MaintenanceWindowTask] -> ShowS)
-> Show MaintenanceWindowTask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceWindowTask] -> ShowS
$cshowList :: [MaintenanceWindowTask] -> ShowS
show :: MaintenanceWindowTask -> String
$cshow :: MaintenanceWindowTask -> String
showsPrec :: Int -> MaintenanceWindowTask -> ShowS
$cshowsPrec :: Int -> MaintenanceWindowTask -> ShowS
Prelude.Show, (forall x. MaintenanceWindowTask -> Rep MaintenanceWindowTask x)
-> (forall x. Rep MaintenanceWindowTask x -> MaintenanceWindowTask)
-> Generic MaintenanceWindowTask
forall x. Rep MaintenanceWindowTask x -> MaintenanceWindowTask
forall x. MaintenanceWindowTask -> Rep MaintenanceWindowTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MaintenanceWindowTask x -> MaintenanceWindowTask
$cfrom :: forall x. MaintenanceWindowTask -> Rep MaintenanceWindowTask x
Prelude.Generic)

-- |
-- Create a value of 'MaintenanceWindowTask' 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:
--
-- 'serviceRoleArn', 'maintenanceWindowTask_serviceRoleArn' - The Amazon Resource Name (ARN) of the Identity and Access Management
-- (IAM) service role to use to publish Amazon Simple Notification Service
-- (Amazon SNS) notifications for maintenance window Run Command tasks.
--
-- 'windowTaskId', 'maintenanceWindowTask_windowTaskId' - The task ID.
--
-- 'taskParameters', 'maintenanceWindowTask_taskParameters' - The parameters that should be passed to the task when it is run.
--
-- @TaskParameters@ has been deprecated. To specify parameters to pass to a
-- task when it runs, instead use the @Parameters@ option in the
-- @TaskInvocationParameters@ structure. For information about how Systems
-- Manager handles these options for the supported maintenance window task
-- types, see MaintenanceWindowTaskInvocationParameters.
--
-- 'priority', 'maintenanceWindowTask_priority' - The priority of the task in the maintenance window. The lower the
-- number, the higher the priority. Tasks that have the same priority are
-- scheduled in parallel.
--
-- 'taskArn', 'maintenanceWindowTask_taskArn' - The resource that the task uses during execution. For @RUN_COMMAND@ and
-- @AUTOMATION@ task types, @TaskArn@ is the Amazon Web Services Systems
-- Manager (SSM document) name or ARN. For @LAMBDA@ tasks, it\'s the
-- function name or ARN. For @STEP_FUNCTIONS@ tasks, it\'s the state
-- machine ARN.
--
-- 'cutoffBehavior', 'maintenanceWindowTask_cutoffBehavior' - The specification for whether tasks should continue to run after the
-- cutoff time specified in the maintenance windows is reached.
--
-- 'maxErrors', 'maintenanceWindowTask_maxErrors' - The maximum number of errors allowed before this task stops being
-- scheduled.
--
-- 'name', 'maintenanceWindowTask_name' - The task name.
--
-- 'targets', 'maintenanceWindowTask_targets' - The targets (either instances or tags). Instances are specified using
-- @Key=instanceids,Values=\<instanceid1>,\<instanceid2>@. Tags are
-- specified using @Key=\<tag name>,Values=\<tag value>@.
--
-- 'loggingInfo', 'maintenanceWindowTask_loggingInfo' - Information about an S3 bucket to write task-level logs to.
--
-- @LoggingInfo@ has been deprecated. To specify an Amazon Simple Storage
-- Service (Amazon S3) bucket to contain logs, instead use the
-- @OutputS3BucketName@ and @OutputS3KeyPrefix@ options in the
-- @TaskInvocationParameters@ structure. For information about how Amazon
-- Web Services Systems Manager handles these options for the supported
-- maintenance window task types, see
-- MaintenanceWindowTaskInvocationParameters.
--
-- 'type'', 'maintenanceWindowTask_type' - The type of task.
--
-- 'description', 'maintenanceWindowTask_description' - A description of the task.
--
-- 'maxConcurrency', 'maintenanceWindowTask_maxConcurrency' - The maximum number of targets this task can be run for, in parallel.
--
-- 'windowId', 'maintenanceWindowTask_windowId' - The ID of the maintenance window where the task is registered.
newMaintenanceWindowTask ::
  MaintenanceWindowTask
newMaintenanceWindowTask :: MaintenanceWindowTask
newMaintenanceWindowTask =
  MaintenanceWindowTask' :: Maybe Text
-> Maybe Text
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Maybe Natural
-> Maybe Text
-> Maybe MaintenanceWindowTaskCutoffBehavior
-> Maybe Text
-> Maybe Text
-> Maybe [Target]
-> Maybe LoggingInfo
-> Maybe MaintenanceWindowTaskType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> MaintenanceWindowTask
MaintenanceWindowTask'
    { $sel:serviceRoleArn:MaintenanceWindowTask' :: Maybe Text
serviceRoleArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:windowTaskId:MaintenanceWindowTask' :: Maybe Text
windowTaskId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:taskParameters:MaintenanceWindowTask' :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters = Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
forall a. Maybe a
Prelude.Nothing,
      $sel:priority:MaintenanceWindowTask' :: Maybe Natural
priority = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:taskArn:MaintenanceWindowTask' :: Maybe Text
taskArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cutoffBehavior:MaintenanceWindowTask' :: Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior = Maybe MaintenanceWindowTaskCutoffBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:maxErrors:MaintenanceWindowTask' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:MaintenanceWindowTask' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:MaintenanceWindowTask' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
      $sel:loggingInfo:MaintenanceWindowTask' :: Maybe LoggingInfo
loggingInfo = Maybe LoggingInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:type':MaintenanceWindowTask' :: Maybe MaintenanceWindowTaskType
type' = Maybe MaintenanceWindowTaskType
forall a. Maybe a
Prelude.Nothing,
      $sel:description:MaintenanceWindowTask' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:maxConcurrency:MaintenanceWindowTask' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:windowId:MaintenanceWindowTask' :: Maybe Text
windowId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the Identity and Access Management
-- (IAM) service role to use to publish Amazon Simple Notification Service
-- (Amazon SNS) notifications for maintenance window Run Command tasks.
maintenanceWindowTask_serviceRoleArn :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe Prelude.Text)
maintenanceWindowTask_serviceRoleArn :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_serviceRoleArn = (MaintenanceWindowTask -> Maybe Text)
-> (MaintenanceWindowTask -> Maybe Text -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe Text
serviceRoleArn :: Maybe Text
$sel:serviceRoleArn:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe Text
serviceRoleArn} -> Maybe Text
serviceRoleArn) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe Text
a -> MaintenanceWindowTask
s {$sel:serviceRoleArn:MaintenanceWindowTask' :: Maybe Text
serviceRoleArn = Maybe Text
a} :: MaintenanceWindowTask)

-- | The task ID.
maintenanceWindowTask_windowTaskId :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe Prelude.Text)
maintenanceWindowTask_windowTaskId :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_windowTaskId = (MaintenanceWindowTask -> Maybe Text)
-> (MaintenanceWindowTask -> Maybe Text -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe Text
windowTaskId :: Maybe Text
$sel:windowTaskId:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe Text
windowTaskId} -> Maybe Text
windowTaskId) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe Text
a -> MaintenanceWindowTask
s {$sel:windowTaskId:MaintenanceWindowTask' :: Maybe Text
windowTaskId = Maybe Text
a} :: MaintenanceWindowTask)

-- | The parameters that should be passed to the task when it is run.
--
-- @TaskParameters@ has been deprecated. To specify parameters to pass to a
-- task when it runs, instead use the @Parameters@ option in the
-- @TaskInvocationParameters@ structure. For information about how Systems
-- Manager handles these options for the supported maintenance window task
-- types, see MaintenanceWindowTaskInvocationParameters.
maintenanceWindowTask_taskParameters :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe (Prelude.HashMap Prelude.Text MaintenanceWindowTaskParameterValueExpression))
maintenanceWindowTask_taskParameters :: (Maybe (HashMap Text MaintenanceWindowTaskParameterValueExpression)
 -> f (Maybe
         (HashMap Text MaintenanceWindowTaskParameterValueExpression)))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_taskParameters = (MaintenanceWindowTask
 -> Maybe
      (Sensitive
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
-> (MaintenanceWindowTask
    -> Maybe
         (Sensitive
            (HashMap
               Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
    -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
$sel:taskParameters:MaintenanceWindowTask' :: MaintenanceWindowTask
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters} -> Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
a -> MaintenanceWindowTask
s {$sel:taskParameters:MaintenanceWindowTask' :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters = Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
a} :: MaintenanceWindowTask) ((Maybe
    (Sensitive
       (HashMap
          Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
  -> f (Maybe
          (Sensitive
             (HashMap
                Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
 -> MaintenanceWindowTask -> f MaintenanceWindowTask)
-> ((Maybe
       (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     -> f (Maybe
             (HashMap Text MaintenanceWindowTaskParameterValueExpression)))
    -> Maybe
         (Sensitive
            (HashMap
               Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
    -> f (Maybe
            (Sensitive
               (HashMap
                  Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
-> (Maybe
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
    -> f (Maybe
            (HashMap Text MaintenanceWindowTaskParameterValueExpression)))
-> MaintenanceWindowTask
-> f MaintenanceWindowTask
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
-> Iso
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
     (Maybe
        (HashMap Text MaintenanceWindowTaskParameterValueExpression))
     (Maybe
        (HashMap Text MaintenanceWindowTaskParameterValueExpression))
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 (Exchange
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (HashMap
     Text (Sensitive MaintenanceWindowTaskParameterValueExpression))
  (Identity
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Exchange
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
     (Identity
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Exchange
   (HashMap Text MaintenanceWindowTaskParameterValueExpression)
   (HashMap Text MaintenanceWindowTaskParameterValueExpression)
   (HashMap
      Text (Sensitive MaintenanceWindowTaskParameterValueExpression))
   (Identity
      (HashMap
         Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
 -> Exchange
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
      (Sensitive
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
      (Identity
         (Sensitive
            (HashMap
               Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
-> (Exchange
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
      (Identity
         (HashMap Text MaintenanceWindowTaskParameterValueExpression))
    -> Exchange
         (HashMap Text MaintenanceWindowTaskParameterValueExpression)
         (HashMap Text MaintenanceWindowTaskParameterValueExpression)
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression))
         (Identity
            (HashMap
               Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
-> AnIso
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (Identity
     (HashMap Text MaintenanceWindowTaskParameterValueExpression))
-> Exchange
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression))
     (Identity
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | The priority of the task in the maintenance window. The lower the
-- number, the higher the priority. Tasks that have the same priority are
-- scheduled in parallel.
maintenanceWindowTask_priority :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe Prelude.Natural)
maintenanceWindowTask_priority :: (Maybe Natural -> f (Maybe Natural))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_priority = (MaintenanceWindowTask -> Maybe Natural)
-> (MaintenanceWindowTask
    -> Maybe Natural -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe Natural
priority :: Maybe Natural
$sel:priority:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe Natural
priority} -> Maybe Natural
priority) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe Natural
a -> MaintenanceWindowTask
s {$sel:priority:MaintenanceWindowTask' :: Maybe Natural
priority = Maybe Natural
a} :: MaintenanceWindowTask)

-- | The resource that the task uses during execution. For @RUN_COMMAND@ and
-- @AUTOMATION@ task types, @TaskArn@ is the Amazon Web Services Systems
-- Manager (SSM document) name or ARN. For @LAMBDA@ tasks, it\'s the
-- function name or ARN. For @STEP_FUNCTIONS@ tasks, it\'s the state
-- machine ARN.
maintenanceWindowTask_taskArn :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe Prelude.Text)
maintenanceWindowTask_taskArn :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_taskArn = (MaintenanceWindowTask -> Maybe Text)
-> (MaintenanceWindowTask -> Maybe Text -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe Text
taskArn :: Maybe Text
$sel:taskArn:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe Text
taskArn} -> Maybe Text
taskArn) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe Text
a -> MaintenanceWindowTask
s {$sel:taskArn:MaintenanceWindowTask' :: Maybe Text
taskArn = Maybe Text
a} :: MaintenanceWindowTask)

-- | The specification for whether tasks should continue to run after the
-- cutoff time specified in the maintenance windows is reached.
maintenanceWindowTask_cutoffBehavior :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe MaintenanceWindowTaskCutoffBehavior)
maintenanceWindowTask_cutoffBehavior :: (Maybe MaintenanceWindowTaskCutoffBehavior
 -> f (Maybe MaintenanceWindowTaskCutoffBehavior))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_cutoffBehavior = (MaintenanceWindowTask
 -> Maybe MaintenanceWindowTaskCutoffBehavior)
-> (MaintenanceWindowTask
    -> Maybe MaintenanceWindowTaskCutoffBehavior
    -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe MaintenanceWindowTaskCutoffBehavior)
     (Maybe MaintenanceWindowTaskCutoffBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior :: Maybe MaintenanceWindowTaskCutoffBehavior
$sel:cutoffBehavior:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior} -> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe MaintenanceWindowTaskCutoffBehavior
a -> MaintenanceWindowTask
s {$sel:cutoffBehavior:MaintenanceWindowTask' :: Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior = Maybe MaintenanceWindowTaskCutoffBehavior
a} :: MaintenanceWindowTask)

-- | The maximum number of errors allowed before this task stops being
-- scheduled.
maintenanceWindowTask_maxErrors :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe Prelude.Text)
maintenanceWindowTask_maxErrors :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_maxErrors = (MaintenanceWindowTask -> Maybe Text)
-> (MaintenanceWindowTask -> Maybe Text -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe Text
a -> MaintenanceWindowTask
s {$sel:maxErrors:MaintenanceWindowTask' :: Maybe Text
maxErrors = Maybe Text
a} :: MaintenanceWindowTask)

-- | The task name.
maintenanceWindowTask_name :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe Prelude.Text)
maintenanceWindowTask_name :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_name = (MaintenanceWindowTask -> Maybe Text)
-> (MaintenanceWindowTask -> Maybe Text -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe Text
name :: Maybe Text
$sel:name:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe Text
name} -> Maybe Text
name) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe Text
a -> MaintenanceWindowTask
s {$sel:name:MaintenanceWindowTask' :: Maybe Text
name = Maybe Text
a} :: MaintenanceWindowTask)

-- | The targets (either instances or tags). Instances are specified using
-- @Key=instanceids,Values=\<instanceid1>,\<instanceid2>@. Tags are
-- specified using @Key=\<tag name>,Values=\<tag value>@.
maintenanceWindowTask_targets :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe [Target])
maintenanceWindowTask_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_targets = (MaintenanceWindowTask -> Maybe [Target])
-> (MaintenanceWindowTask
    -> Maybe [Target] -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe [Target])
     (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe [Target]
a -> MaintenanceWindowTask
s {$sel:targets:MaintenanceWindowTask' :: Maybe [Target]
targets = Maybe [Target]
a} :: MaintenanceWindowTask) ((Maybe [Target] -> f (Maybe [Target]))
 -> MaintenanceWindowTask -> f MaintenanceWindowTask)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> MaintenanceWindowTask
-> f MaintenanceWindowTask
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Target] [Target] [Target] [Target]
-> Iso
     (Maybe [Target]) (Maybe [Target]) (Maybe [Target]) (Maybe [Target])
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 [Target] [Target] [Target] [Target]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about an S3 bucket to write task-level logs to.
--
-- @LoggingInfo@ has been deprecated. To specify an Amazon Simple Storage
-- Service (Amazon S3) bucket to contain logs, instead use the
-- @OutputS3BucketName@ and @OutputS3KeyPrefix@ options in the
-- @TaskInvocationParameters@ structure. For information about how Amazon
-- Web Services Systems Manager handles these options for the supported
-- maintenance window task types, see
-- MaintenanceWindowTaskInvocationParameters.
maintenanceWindowTask_loggingInfo :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe LoggingInfo)
maintenanceWindowTask_loggingInfo :: (Maybe LoggingInfo -> f (Maybe LoggingInfo))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_loggingInfo = (MaintenanceWindowTask -> Maybe LoggingInfo)
-> (MaintenanceWindowTask
    -> Maybe LoggingInfo -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe LoggingInfo)
     (Maybe LoggingInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe LoggingInfo
loggingInfo :: Maybe LoggingInfo
$sel:loggingInfo:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe LoggingInfo
loggingInfo} -> Maybe LoggingInfo
loggingInfo) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe LoggingInfo
a -> MaintenanceWindowTask
s {$sel:loggingInfo:MaintenanceWindowTask' :: Maybe LoggingInfo
loggingInfo = Maybe LoggingInfo
a} :: MaintenanceWindowTask)

-- | The type of task.
maintenanceWindowTask_type :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe MaintenanceWindowTaskType)
maintenanceWindowTask_type :: (Maybe MaintenanceWindowTaskType
 -> f (Maybe MaintenanceWindowTaskType))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_type = (MaintenanceWindowTask -> Maybe MaintenanceWindowTaskType)
-> (MaintenanceWindowTask
    -> Maybe MaintenanceWindowTaskType -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe MaintenanceWindowTaskType)
     (Maybe MaintenanceWindowTaskType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe MaintenanceWindowTaskType
type' :: Maybe MaintenanceWindowTaskType
$sel:type':MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe MaintenanceWindowTaskType
type'} -> Maybe MaintenanceWindowTaskType
type') (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe MaintenanceWindowTaskType
a -> MaintenanceWindowTask
s {$sel:type':MaintenanceWindowTask' :: Maybe MaintenanceWindowTaskType
type' = Maybe MaintenanceWindowTaskType
a} :: MaintenanceWindowTask)

-- | A description of the task.
maintenanceWindowTask_description :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe Prelude.Text)
maintenanceWindowTask_description :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_description = (MaintenanceWindowTask -> Maybe (Sensitive Text))
-> (MaintenanceWindowTask
    -> Maybe (Sensitive Text) -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe (Sensitive Text)
a -> MaintenanceWindowTask
s {$sel:description:MaintenanceWindowTask' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: MaintenanceWindowTask) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> MaintenanceWindowTask -> f MaintenanceWindowTask)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowTask
-> f MaintenanceWindowTask
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The maximum number of targets this task can be run for, in parallel.
maintenanceWindowTask_maxConcurrency :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe Prelude.Text)
maintenanceWindowTask_maxConcurrency :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_maxConcurrency = (MaintenanceWindowTask -> Maybe Text)
-> (MaintenanceWindowTask -> Maybe Text -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe Text
a -> MaintenanceWindowTask
s {$sel:maxConcurrency:MaintenanceWindowTask' :: Maybe Text
maxConcurrency = Maybe Text
a} :: MaintenanceWindowTask)

-- | The ID of the maintenance window where the task is registered.
maintenanceWindowTask_windowId :: Lens.Lens' MaintenanceWindowTask (Prelude.Maybe Prelude.Text)
maintenanceWindowTask_windowId :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowTask -> f MaintenanceWindowTask
maintenanceWindowTask_windowId = (MaintenanceWindowTask -> Maybe Text)
-> (MaintenanceWindowTask -> Maybe Text -> MaintenanceWindowTask)
-> Lens
     MaintenanceWindowTask
     MaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTask' {Maybe Text
windowId :: Maybe Text
$sel:windowId:MaintenanceWindowTask' :: MaintenanceWindowTask -> Maybe Text
windowId} -> Maybe Text
windowId) (\s :: MaintenanceWindowTask
s@MaintenanceWindowTask' {} Maybe Text
a -> MaintenanceWindowTask
s {$sel:windowId:MaintenanceWindowTask' :: Maybe Text
windowId = Maybe Text
a} :: MaintenanceWindowTask)

instance Core.FromJSON MaintenanceWindowTask where
  parseJSON :: Value -> Parser MaintenanceWindowTask
parseJSON =
    String
-> (Object -> Parser MaintenanceWindowTask)
-> Value
-> Parser MaintenanceWindowTask
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MaintenanceWindowTask"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Maybe Natural
-> Maybe Text
-> Maybe MaintenanceWindowTaskCutoffBehavior
-> Maybe Text
-> Maybe Text
-> Maybe [Target]
-> Maybe LoggingInfo
-> Maybe MaintenanceWindowTaskType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> MaintenanceWindowTask
MaintenanceWindowTask'
            (Maybe Text
 -> Maybe Text
 -> Maybe
      (Sensitive
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
 -> Maybe Natural
 -> Maybe Text
 -> Maybe MaintenanceWindowTaskCutoffBehavior
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Target]
 -> Maybe LoggingInfo
 -> Maybe MaintenanceWindowTaskType
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe Text
 -> MaintenanceWindowTask)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe
           (Sensitive
              (HashMap
                 Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
      -> Maybe Natural
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe MaintenanceWindowTaskType
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> MaintenanceWindowTask)
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
"ServiceRoleArn")
            Parser
  (Maybe Text
   -> Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
   -> Maybe Natural
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe MaintenanceWindowTaskType
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> MaintenanceWindowTask)
-> Parser (Maybe Text)
-> Parser
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
      -> Maybe Natural
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe MaintenanceWindowTaskType
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> MaintenanceWindowTask)
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
"WindowTaskId")
            Parser
  (Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
   -> Maybe Natural
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe MaintenanceWindowTaskType
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> MaintenanceWindowTask)
-> Parser
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe MaintenanceWindowTaskType
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> MaintenanceWindowTask)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
     (Maybe
        (Maybe
           (Sensitive
              (HashMap
                 Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TaskParameters" Parser
  (Maybe
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Parser
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe MaintenanceWindowTaskType
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> MaintenanceWindowTask)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe MaintenanceWindowTaskType
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> MaintenanceWindowTask)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Priority")
            Parser
  (Maybe Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe MaintenanceWindowTaskType
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> MaintenanceWindowTask)
-> Parser (Maybe Text)
-> Parser
     (Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe MaintenanceWindowTaskType
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> MaintenanceWindowTask)
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
"TaskArn")
            Parser
  (Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe MaintenanceWindowTaskType
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> MaintenanceWindowTask)
-> Parser (Maybe MaintenanceWindowTaskCutoffBehavior)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe MaintenanceWindowTaskType
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> MaintenanceWindowTask)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe MaintenanceWindowTaskCutoffBehavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CutoffBehavior")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe MaintenanceWindowTaskType
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> MaintenanceWindowTask)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe MaintenanceWindowTaskType
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> MaintenanceWindowTask)
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
"MaxErrors")
            Parser
  (Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe MaintenanceWindowTaskType
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> MaintenanceWindowTask)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe MaintenanceWindowTaskType
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> MaintenanceWindowTask)
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
"Name")
            Parser
  (Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe MaintenanceWindowTaskType
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> MaintenanceWindowTask)
-> Parser (Maybe [Target])
-> Parser
     (Maybe LoggingInfo
      -> Maybe MaintenanceWindowTaskType
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> MaintenanceWindowTask)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Target]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Targets" Parser (Maybe (Maybe [Target]))
-> Maybe [Target] -> Parser (Maybe [Target])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Target]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe LoggingInfo
   -> Maybe MaintenanceWindowTaskType
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> MaintenanceWindowTask)
-> Parser (Maybe LoggingInfo)
-> Parser
     (Maybe MaintenanceWindowTaskType
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> MaintenanceWindowTask)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LoggingInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LoggingInfo")
            Parser
  (Maybe MaintenanceWindowTaskType
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> MaintenanceWindowTask)
-> Parser (Maybe MaintenanceWindowTaskType)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Text -> Maybe Text -> MaintenanceWindowTask)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MaintenanceWindowTaskType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Text -> Maybe Text -> MaintenanceWindowTask)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe Text -> Maybe Text -> MaintenanceWindowTask)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser (Maybe Text -> Maybe Text -> MaintenanceWindowTask)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> MaintenanceWindowTask)
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
"MaxConcurrency")
            Parser (Maybe Text -> MaintenanceWindowTask)
-> Parser (Maybe Text) -> Parser MaintenanceWindowTask
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
"WindowId")
      )

instance Prelude.Hashable MaintenanceWindowTask

instance Prelude.NFData MaintenanceWindowTask