{-# 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.AutoScaling.Types.ScheduledUpdateGroupAction
-- 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.AutoScaling.Types.ScheduledUpdateGroupAction where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes a scheduled scaling action.
--
-- /See:/ 'newScheduledUpdateGroupAction' smart constructor.
data ScheduledUpdateGroupAction = ScheduledUpdateGroupAction'
  { -- | The Amazon Resource Name (ARN) of the scheduled action.
    ScheduledUpdateGroupAction -> Maybe Text
scheduledActionARN :: Prelude.Maybe Prelude.Text,
    -- | The date and time in UTC for this action to start. For example,
    -- @\"2019-06-01T00:00:00Z\"@.
    ScheduledUpdateGroupAction -> Maybe ISO8601
startTime :: Prelude.Maybe Core.ISO8601,
    -- | This parameter is no longer used.
    ScheduledUpdateGroupAction -> Maybe ISO8601
time :: Prelude.Maybe Core.ISO8601,
    -- | The name of the scheduled action.
    ScheduledUpdateGroupAction -> Maybe Text
scheduledActionName :: Prelude.Maybe Prelude.Text,
    -- | The maximum size of the Auto Scaling group.
    ScheduledUpdateGroupAction -> Maybe Int
maxSize :: Prelude.Maybe Prelude.Int,
    -- | The recurring schedule for the action, in Unix cron syntax format.
    --
    -- When @StartTime@ and @EndTime@ are specified with @Recurrence@, they
    -- form the boundaries of when the recurring action starts and stops.
    ScheduledUpdateGroupAction -> Maybe Text
recurrence :: Prelude.Maybe Prelude.Text,
    -- | The desired capacity is the initial capacity of the Auto Scaling group
    -- after the scheduled action runs and the capacity it attempts to
    -- maintain.
    ScheduledUpdateGroupAction -> Maybe Int
desiredCapacity :: Prelude.Maybe Prelude.Int,
    -- | The minimum size of the Auto Scaling group.
    ScheduledUpdateGroupAction -> Maybe Int
minSize :: Prelude.Maybe Prelude.Int,
    -- | The name of the Auto Scaling group.
    ScheduledUpdateGroupAction -> Maybe Text
autoScalingGroupName :: Prelude.Maybe Prelude.Text,
    -- | The date and time in UTC for the recurring schedule to end. For example,
    -- @\"2019-06-01T00:00:00Z\"@.
    ScheduledUpdateGroupAction -> Maybe ISO8601
endTime :: Prelude.Maybe Core.ISO8601,
    -- | The time zone for the cron expression.
    ScheduledUpdateGroupAction -> Maybe Text
timeZone :: Prelude.Maybe Prelude.Text
  }
  deriving (ScheduledUpdateGroupAction -> ScheduledUpdateGroupAction -> Bool
(ScheduledUpdateGroupAction -> ScheduledUpdateGroupAction -> Bool)
-> (ScheduledUpdateGroupAction
    -> ScheduledUpdateGroupAction -> Bool)
-> Eq ScheduledUpdateGroupAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduledUpdateGroupAction -> ScheduledUpdateGroupAction -> Bool
$c/= :: ScheduledUpdateGroupAction -> ScheduledUpdateGroupAction -> Bool
== :: ScheduledUpdateGroupAction -> ScheduledUpdateGroupAction -> Bool
$c== :: ScheduledUpdateGroupAction -> ScheduledUpdateGroupAction -> Bool
Prelude.Eq, ReadPrec [ScheduledUpdateGroupAction]
ReadPrec ScheduledUpdateGroupAction
Int -> ReadS ScheduledUpdateGroupAction
ReadS [ScheduledUpdateGroupAction]
(Int -> ReadS ScheduledUpdateGroupAction)
-> ReadS [ScheduledUpdateGroupAction]
-> ReadPrec ScheduledUpdateGroupAction
-> ReadPrec [ScheduledUpdateGroupAction]
-> Read ScheduledUpdateGroupAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduledUpdateGroupAction]
$creadListPrec :: ReadPrec [ScheduledUpdateGroupAction]
readPrec :: ReadPrec ScheduledUpdateGroupAction
$creadPrec :: ReadPrec ScheduledUpdateGroupAction
readList :: ReadS [ScheduledUpdateGroupAction]
$creadList :: ReadS [ScheduledUpdateGroupAction]
readsPrec :: Int -> ReadS ScheduledUpdateGroupAction
$creadsPrec :: Int -> ReadS ScheduledUpdateGroupAction
Prelude.Read, Int -> ScheduledUpdateGroupAction -> ShowS
[ScheduledUpdateGroupAction] -> ShowS
ScheduledUpdateGroupAction -> String
(Int -> ScheduledUpdateGroupAction -> ShowS)
-> (ScheduledUpdateGroupAction -> String)
-> ([ScheduledUpdateGroupAction] -> ShowS)
-> Show ScheduledUpdateGroupAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduledUpdateGroupAction] -> ShowS
$cshowList :: [ScheduledUpdateGroupAction] -> ShowS
show :: ScheduledUpdateGroupAction -> String
$cshow :: ScheduledUpdateGroupAction -> String
showsPrec :: Int -> ScheduledUpdateGroupAction -> ShowS
$cshowsPrec :: Int -> ScheduledUpdateGroupAction -> ShowS
Prelude.Show, (forall x.
 ScheduledUpdateGroupAction -> Rep ScheduledUpdateGroupAction x)
-> (forall x.
    Rep ScheduledUpdateGroupAction x -> ScheduledUpdateGroupAction)
-> Generic ScheduledUpdateGroupAction
forall x.
Rep ScheduledUpdateGroupAction x -> ScheduledUpdateGroupAction
forall x.
ScheduledUpdateGroupAction -> Rep ScheduledUpdateGroupAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ScheduledUpdateGroupAction x -> ScheduledUpdateGroupAction
$cfrom :: forall x.
ScheduledUpdateGroupAction -> Rep ScheduledUpdateGroupAction x
Prelude.Generic)

-- |
-- Create a value of 'ScheduledUpdateGroupAction' 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:
--
-- 'scheduledActionARN', 'scheduledUpdateGroupAction_scheduledActionARN' - The Amazon Resource Name (ARN) of the scheduled action.
--
-- 'startTime', 'scheduledUpdateGroupAction_startTime' - The date and time in UTC for this action to start. For example,
-- @\"2019-06-01T00:00:00Z\"@.
--
-- 'time', 'scheduledUpdateGroupAction_time' - This parameter is no longer used.
--
-- 'scheduledActionName', 'scheduledUpdateGroupAction_scheduledActionName' - The name of the scheduled action.
--
-- 'maxSize', 'scheduledUpdateGroupAction_maxSize' - The maximum size of the Auto Scaling group.
--
-- 'recurrence', 'scheduledUpdateGroupAction_recurrence' - The recurring schedule for the action, in Unix cron syntax format.
--
-- When @StartTime@ and @EndTime@ are specified with @Recurrence@, they
-- form the boundaries of when the recurring action starts and stops.
--
-- 'desiredCapacity', 'scheduledUpdateGroupAction_desiredCapacity' - The desired capacity is the initial capacity of the Auto Scaling group
-- after the scheduled action runs and the capacity it attempts to
-- maintain.
--
-- 'minSize', 'scheduledUpdateGroupAction_minSize' - The minimum size of the Auto Scaling group.
--
-- 'autoScalingGroupName', 'scheduledUpdateGroupAction_autoScalingGroupName' - The name of the Auto Scaling group.
--
-- 'endTime', 'scheduledUpdateGroupAction_endTime' - The date and time in UTC for the recurring schedule to end. For example,
-- @\"2019-06-01T00:00:00Z\"@.
--
-- 'timeZone', 'scheduledUpdateGroupAction_timeZone' - The time zone for the cron expression.
newScheduledUpdateGroupAction ::
  ScheduledUpdateGroupAction
newScheduledUpdateGroupAction :: ScheduledUpdateGroupAction
newScheduledUpdateGroupAction =
  ScheduledUpdateGroupAction' :: Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> ScheduledUpdateGroupAction
ScheduledUpdateGroupAction'
    { $sel:scheduledActionARN:ScheduledUpdateGroupAction' :: Maybe Text
scheduledActionARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:ScheduledUpdateGroupAction' :: Maybe ISO8601
startTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:time:ScheduledUpdateGroupAction' :: Maybe ISO8601
time = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledActionName:ScheduledUpdateGroupAction' :: Maybe Text
scheduledActionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxSize:ScheduledUpdateGroupAction' :: Maybe Int
maxSize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:recurrence:ScheduledUpdateGroupAction' :: Maybe Text
recurrence = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:desiredCapacity:ScheduledUpdateGroupAction' :: Maybe Int
desiredCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:minSize:ScheduledUpdateGroupAction' :: Maybe Int
minSize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:autoScalingGroupName:ScheduledUpdateGroupAction' :: Maybe Text
autoScalingGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:ScheduledUpdateGroupAction' :: Maybe ISO8601
endTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:timeZone:ScheduledUpdateGroupAction' :: Maybe Text
timeZone = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the scheduled action.
scheduledUpdateGroupAction_scheduledActionARN :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.Text)
scheduledUpdateGroupAction_scheduledActionARN :: (Maybe Text -> f (Maybe Text))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_scheduledActionARN = (ScheduledUpdateGroupAction -> Maybe Text)
-> (ScheduledUpdateGroupAction
    -> Maybe Text -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe Text
scheduledActionARN :: Maybe Text
$sel:scheduledActionARN:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe Text
scheduledActionARN} -> Maybe Text
scheduledActionARN) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe Text
a -> ScheduledUpdateGroupAction
s {$sel:scheduledActionARN:ScheduledUpdateGroupAction' :: Maybe Text
scheduledActionARN = Maybe Text
a} :: ScheduledUpdateGroupAction)

-- | The date and time in UTC for this action to start. For example,
-- @\"2019-06-01T00:00:00Z\"@.
scheduledUpdateGroupAction_startTime :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.UTCTime)
scheduledUpdateGroupAction_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_startTime = (ScheduledUpdateGroupAction -> Maybe ISO8601)
-> (ScheduledUpdateGroupAction
    -> Maybe ISO8601 -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe ISO8601
startTime :: Maybe ISO8601
$sel:startTime:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe ISO8601
startTime} -> Maybe ISO8601
startTime) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe ISO8601
a -> ScheduledUpdateGroupAction
s {$sel:startTime:ScheduledUpdateGroupAction' :: Maybe ISO8601
startTime = Maybe ISO8601
a} :: ScheduledUpdateGroupAction) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledUpdateGroupAction
-> f ScheduledUpdateGroupAction
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | This parameter is no longer used.
scheduledUpdateGroupAction_time :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.UTCTime)
scheduledUpdateGroupAction_time :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_time = (ScheduledUpdateGroupAction -> Maybe ISO8601)
-> (ScheduledUpdateGroupAction
    -> Maybe ISO8601 -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe ISO8601
time :: Maybe ISO8601
$sel:time:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe ISO8601
time} -> Maybe ISO8601
time) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe ISO8601
a -> ScheduledUpdateGroupAction
s {$sel:time:ScheduledUpdateGroupAction' :: Maybe ISO8601
time = Maybe ISO8601
a} :: ScheduledUpdateGroupAction) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledUpdateGroupAction
-> f ScheduledUpdateGroupAction
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the scheduled action.
scheduledUpdateGroupAction_scheduledActionName :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.Text)
scheduledUpdateGroupAction_scheduledActionName :: (Maybe Text -> f (Maybe Text))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_scheduledActionName = (ScheduledUpdateGroupAction -> Maybe Text)
-> (ScheduledUpdateGroupAction
    -> Maybe Text -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe Text
scheduledActionName :: Maybe Text
$sel:scheduledActionName:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe Text
scheduledActionName} -> Maybe Text
scheduledActionName) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe Text
a -> ScheduledUpdateGroupAction
s {$sel:scheduledActionName:ScheduledUpdateGroupAction' :: Maybe Text
scheduledActionName = Maybe Text
a} :: ScheduledUpdateGroupAction)

-- | The maximum size of the Auto Scaling group.
scheduledUpdateGroupAction_maxSize :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.Int)
scheduledUpdateGroupAction_maxSize :: (Maybe Int -> f (Maybe Int))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_maxSize = (ScheduledUpdateGroupAction -> Maybe Int)
-> (ScheduledUpdateGroupAction
    -> Maybe Int -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe Int
maxSize :: Maybe Int
$sel:maxSize:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe Int
maxSize} -> Maybe Int
maxSize) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe Int
a -> ScheduledUpdateGroupAction
s {$sel:maxSize:ScheduledUpdateGroupAction' :: Maybe Int
maxSize = Maybe Int
a} :: ScheduledUpdateGroupAction)

-- | The recurring schedule for the action, in Unix cron syntax format.
--
-- When @StartTime@ and @EndTime@ are specified with @Recurrence@, they
-- form the boundaries of when the recurring action starts and stops.
scheduledUpdateGroupAction_recurrence :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.Text)
scheduledUpdateGroupAction_recurrence :: (Maybe Text -> f (Maybe Text))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_recurrence = (ScheduledUpdateGroupAction -> Maybe Text)
-> (ScheduledUpdateGroupAction
    -> Maybe Text -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe Text
recurrence :: Maybe Text
$sel:recurrence:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe Text
recurrence} -> Maybe Text
recurrence) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe Text
a -> ScheduledUpdateGroupAction
s {$sel:recurrence:ScheduledUpdateGroupAction' :: Maybe Text
recurrence = Maybe Text
a} :: ScheduledUpdateGroupAction)

-- | The desired capacity is the initial capacity of the Auto Scaling group
-- after the scheduled action runs and the capacity it attempts to
-- maintain.
scheduledUpdateGroupAction_desiredCapacity :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.Int)
scheduledUpdateGroupAction_desiredCapacity :: (Maybe Int -> f (Maybe Int))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_desiredCapacity = (ScheduledUpdateGroupAction -> Maybe Int)
-> (ScheduledUpdateGroupAction
    -> Maybe Int -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe Int
desiredCapacity :: Maybe Int
$sel:desiredCapacity:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe Int
desiredCapacity} -> Maybe Int
desiredCapacity) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe Int
a -> ScheduledUpdateGroupAction
s {$sel:desiredCapacity:ScheduledUpdateGroupAction' :: Maybe Int
desiredCapacity = Maybe Int
a} :: ScheduledUpdateGroupAction)

-- | The minimum size of the Auto Scaling group.
scheduledUpdateGroupAction_minSize :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.Int)
scheduledUpdateGroupAction_minSize :: (Maybe Int -> f (Maybe Int))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_minSize = (ScheduledUpdateGroupAction -> Maybe Int)
-> (ScheduledUpdateGroupAction
    -> Maybe Int -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe Int
minSize :: Maybe Int
$sel:minSize:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe Int
minSize} -> Maybe Int
minSize) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe Int
a -> ScheduledUpdateGroupAction
s {$sel:minSize:ScheduledUpdateGroupAction' :: Maybe Int
minSize = Maybe Int
a} :: ScheduledUpdateGroupAction)

-- | The name of the Auto Scaling group.
scheduledUpdateGroupAction_autoScalingGroupName :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.Text)
scheduledUpdateGroupAction_autoScalingGroupName :: (Maybe Text -> f (Maybe Text))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_autoScalingGroupName = (ScheduledUpdateGroupAction -> Maybe Text)
-> (ScheduledUpdateGroupAction
    -> Maybe Text -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe Text
autoScalingGroupName :: Maybe Text
$sel:autoScalingGroupName:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe Text
autoScalingGroupName} -> Maybe Text
autoScalingGroupName) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe Text
a -> ScheduledUpdateGroupAction
s {$sel:autoScalingGroupName:ScheduledUpdateGroupAction' :: Maybe Text
autoScalingGroupName = Maybe Text
a} :: ScheduledUpdateGroupAction)

-- | The date and time in UTC for the recurring schedule to end. For example,
-- @\"2019-06-01T00:00:00Z\"@.
scheduledUpdateGroupAction_endTime :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.UTCTime)
scheduledUpdateGroupAction_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_endTime = (ScheduledUpdateGroupAction -> Maybe ISO8601)
-> (ScheduledUpdateGroupAction
    -> Maybe ISO8601 -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe ISO8601
endTime :: Maybe ISO8601
$sel:endTime:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe ISO8601
endTime} -> Maybe ISO8601
endTime) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe ISO8601
a -> ScheduledUpdateGroupAction
s {$sel:endTime:ScheduledUpdateGroupAction' :: Maybe ISO8601
endTime = Maybe ISO8601
a} :: ScheduledUpdateGroupAction) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ScheduledUpdateGroupAction
-> f ScheduledUpdateGroupAction
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The time zone for the cron expression.
scheduledUpdateGroupAction_timeZone :: Lens.Lens' ScheduledUpdateGroupAction (Prelude.Maybe Prelude.Text)
scheduledUpdateGroupAction_timeZone :: (Maybe Text -> f (Maybe Text))
-> ScheduledUpdateGroupAction -> f ScheduledUpdateGroupAction
scheduledUpdateGroupAction_timeZone = (ScheduledUpdateGroupAction -> Maybe Text)
-> (ScheduledUpdateGroupAction
    -> Maybe Text -> ScheduledUpdateGroupAction)
-> Lens
     ScheduledUpdateGroupAction
     ScheduledUpdateGroupAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledUpdateGroupAction' {Maybe Text
timeZone :: Maybe Text
$sel:timeZone:ScheduledUpdateGroupAction' :: ScheduledUpdateGroupAction -> Maybe Text
timeZone} -> Maybe Text
timeZone) (\s :: ScheduledUpdateGroupAction
s@ScheduledUpdateGroupAction' {} Maybe Text
a -> ScheduledUpdateGroupAction
s {$sel:timeZone:ScheduledUpdateGroupAction' :: Maybe Text
timeZone = Maybe Text
a} :: ScheduledUpdateGroupAction)

instance Core.FromXML ScheduledUpdateGroupAction where
  parseXML :: [Node] -> Either String ScheduledUpdateGroupAction
parseXML [Node]
x =
    Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> ScheduledUpdateGroupAction
ScheduledUpdateGroupAction'
      (Maybe Text
 -> Maybe ISO8601
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Text
 -> ScheduledUpdateGroupAction)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> ScheduledUpdateGroupAction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ScheduledActionARN")
      Either
  String
  (Maybe ISO8601
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> ScheduledUpdateGroupAction)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> ScheduledUpdateGroupAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StartTime")
      Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> ScheduledUpdateGroupAction)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> ScheduledUpdateGroupAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Time")
      Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> ScheduledUpdateGroupAction)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> ScheduledUpdateGroupAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ScheduledActionName")
      Either
  String
  (Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> ScheduledUpdateGroupAction)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> ScheduledUpdateGroupAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MaxSize")
      Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> ScheduledUpdateGroupAction)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> ScheduledUpdateGroupAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Recurrence")
      Either
  String
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> ScheduledUpdateGroupAction)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Int
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> ScheduledUpdateGroupAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DesiredCapacity")
      Either
  String
  (Maybe Int
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> ScheduledUpdateGroupAction)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601 -> Maybe Text -> ScheduledUpdateGroupAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MinSize")
      Either
  String
  (Maybe Text
   -> Maybe ISO8601 -> Maybe Text -> ScheduledUpdateGroupAction)
-> Either String (Maybe Text)
-> Either
     String (Maybe ISO8601 -> Maybe Text -> ScheduledUpdateGroupAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AutoScalingGroupName")
      Either
  String (Maybe ISO8601 -> Maybe Text -> ScheduledUpdateGroupAction)
-> Either String (Maybe ISO8601)
-> Either String (Maybe Text -> ScheduledUpdateGroupAction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EndTime")
      Either String (Maybe Text -> ScheduledUpdateGroupAction)
-> Either String (Maybe Text)
-> Either String ScheduledUpdateGroupAction
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TimeZone")

instance Prelude.Hashable ScheduledUpdateGroupAction

instance Prelude.NFData ScheduledUpdateGroupAction