{-# 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.OpsWorks.Types.WeeklyAutoScalingSchedule
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.OpsWorks.Types.WeeklyAutoScalingSchedule where

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

-- | Describes a time-based instance\'s auto scaling schedule. The schedule
-- consists of a set of key-value pairs.
--
-- -   The key is the time period (a UTC hour) and must be an integer from
--     0 - 23.
--
-- -   The value indicates whether the instance should be online or offline
--     for the specified period, and must be set to \"on\" or \"off\"
--
-- The default setting for all time periods is off, so you use the
-- following parameters primarily to specify the online periods. You don\'t
-- have to explicitly specify offline periods unless you want to change an
-- online period to an offline period.
--
-- The following example specifies that the instance should be online for
-- four hours, from UTC 1200 - 1600. It will be off for the remainder of
-- the day.
--
-- @ { \"12\":\"on\", \"13\":\"on\", \"14\":\"on\", \"15\":\"on\" } @
--
-- /See:/ 'newWeeklyAutoScalingSchedule' smart constructor.
data WeeklyAutoScalingSchedule = WeeklyAutoScalingSchedule'
  { -- | The schedule for Friday.
    WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
friday :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The schedule for Monday.
    WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
monday :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The schedule for Saturday.
    WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
saturday :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The schedule for Sunday.
    WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
sunday :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The schedule for Thursday.
    WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
thursday :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The schedule for Tuesday.
    WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
tuesday :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The schedule for Wednesday.
    WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
wednesday :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (WeeklyAutoScalingSchedule -> WeeklyAutoScalingSchedule -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WeeklyAutoScalingSchedule -> WeeklyAutoScalingSchedule -> Bool
$c/= :: WeeklyAutoScalingSchedule -> WeeklyAutoScalingSchedule -> Bool
== :: WeeklyAutoScalingSchedule -> WeeklyAutoScalingSchedule -> Bool
$c== :: WeeklyAutoScalingSchedule -> WeeklyAutoScalingSchedule -> Bool
Prelude.Eq, ReadPrec [WeeklyAutoScalingSchedule]
ReadPrec WeeklyAutoScalingSchedule
Int -> ReadS WeeklyAutoScalingSchedule
ReadS [WeeklyAutoScalingSchedule]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WeeklyAutoScalingSchedule]
$creadListPrec :: ReadPrec [WeeklyAutoScalingSchedule]
readPrec :: ReadPrec WeeklyAutoScalingSchedule
$creadPrec :: ReadPrec WeeklyAutoScalingSchedule
readList :: ReadS [WeeklyAutoScalingSchedule]
$creadList :: ReadS [WeeklyAutoScalingSchedule]
readsPrec :: Int -> ReadS WeeklyAutoScalingSchedule
$creadsPrec :: Int -> ReadS WeeklyAutoScalingSchedule
Prelude.Read, Int -> WeeklyAutoScalingSchedule -> ShowS
[WeeklyAutoScalingSchedule] -> ShowS
WeeklyAutoScalingSchedule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WeeklyAutoScalingSchedule] -> ShowS
$cshowList :: [WeeklyAutoScalingSchedule] -> ShowS
show :: WeeklyAutoScalingSchedule -> String
$cshow :: WeeklyAutoScalingSchedule -> String
showsPrec :: Int -> WeeklyAutoScalingSchedule -> ShowS
$cshowsPrec :: Int -> WeeklyAutoScalingSchedule -> ShowS
Prelude.Show, forall x.
Rep WeeklyAutoScalingSchedule x -> WeeklyAutoScalingSchedule
forall x.
WeeklyAutoScalingSchedule -> Rep WeeklyAutoScalingSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WeeklyAutoScalingSchedule x -> WeeklyAutoScalingSchedule
$cfrom :: forall x.
WeeklyAutoScalingSchedule -> Rep WeeklyAutoScalingSchedule x
Prelude.Generic)

-- |
-- Create a value of 'WeeklyAutoScalingSchedule' 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:
--
-- 'friday', 'weeklyAutoScalingSchedule_friday' - The schedule for Friday.
--
-- 'monday', 'weeklyAutoScalingSchedule_monday' - The schedule for Monday.
--
-- 'saturday', 'weeklyAutoScalingSchedule_saturday' - The schedule for Saturday.
--
-- 'sunday', 'weeklyAutoScalingSchedule_sunday' - The schedule for Sunday.
--
-- 'thursday', 'weeklyAutoScalingSchedule_thursday' - The schedule for Thursday.
--
-- 'tuesday', 'weeklyAutoScalingSchedule_tuesday' - The schedule for Tuesday.
--
-- 'wednesday', 'weeklyAutoScalingSchedule_wednesday' - The schedule for Wednesday.
newWeeklyAutoScalingSchedule ::
  WeeklyAutoScalingSchedule
newWeeklyAutoScalingSchedule :: WeeklyAutoScalingSchedule
newWeeklyAutoScalingSchedule =
  WeeklyAutoScalingSchedule'
    { $sel:friday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
friday =
        forall a. Maybe a
Prelude.Nothing,
      $sel:monday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
monday = forall a. Maybe a
Prelude.Nothing,
      $sel:saturday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
saturday = forall a. Maybe a
Prelude.Nothing,
      $sel:sunday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
sunday = forall a. Maybe a
Prelude.Nothing,
      $sel:thursday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
thursday = forall a. Maybe a
Prelude.Nothing,
      $sel:tuesday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
tuesday = forall a. Maybe a
Prelude.Nothing,
      $sel:wednesday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
wednesday = forall a. Maybe a
Prelude.Nothing
    }

-- | The schedule for Friday.
weeklyAutoScalingSchedule_friday :: Lens.Lens' WeeklyAutoScalingSchedule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
weeklyAutoScalingSchedule_friday :: Lens' WeeklyAutoScalingSchedule (Maybe (HashMap Text Text))
weeklyAutoScalingSchedule_friday = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WeeklyAutoScalingSchedule' {Maybe (HashMap Text Text)
friday :: Maybe (HashMap Text Text)
$sel:friday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
friday} -> Maybe (HashMap Text Text)
friday) (\s :: WeeklyAutoScalingSchedule
s@WeeklyAutoScalingSchedule' {} Maybe (HashMap Text Text)
a -> WeeklyAutoScalingSchedule
s {$sel:friday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
friday = Maybe (HashMap Text Text)
a} :: WeeklyAutoScalingSchedule) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The schedule for Monday.
weeklyAutoScalingSchedule_monday :: Lens.Lens' WeeklyAutoScalingSchedule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
weeklyAutoScalingSchedule_monday :: Lens' WeeklyAutoScalingSchedule (Maybe (HashMap Text Text))
weeklyAutoScalingSchedule_monday = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WeeklyAutoScalingSchedule' {Maybe (HashMap Text Text)
monday :: Maybe (HashMap Text Text)
$sel:monday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
monday} -> Maybe (HashMap Text Text)
monday) (\s :: WeeklyAutoScalingSchedule
s@WeeklyAutoScalingSchedule' {} Maybe (HashMap Text Text)
a -> WeeklyAutoScalingSchedule
s {$sel:monday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
monday = Maybe (HashMap Text Text)
a} :: WeeklyAutoScalingSchedule) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The schedule for Saturday.
weeklyAutoScalingSchedule_saturday :: Lens.Lens' WeeklyAutoScalingSchedule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
weeklyAutoScalingSchedule_saturday :: Lens' WeeklyAutoScalingSchedule (Maybe (HashMap Text Text))
weeklyAutoScalingSchedule_saturday = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WeeklyAutoScalingSchedule' {Maybe (HashMap Text Text)
saturday :: Maybe (HashMap Text Text)
$sel:saturday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
saturday} -> Maybe (HashMap Text Text)
saturday) (\s :: WeeklyAutoScalingSchedule
s@WeeklyAutoScalingSchedule' {} Maybe (HashMap Text Text)
a -> WeeklyAutoScalingSchedule
s {$sel:saturday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
saturday = Maybe (HashMap Text Text)
a} :: WeeklyAutoScalingSchedule) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The schedule for Sunday.
weeklyAutoScalingSchedule_sunday :: Lens.Lens' WeeklyAutoScalingSchedule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
weeklyAutoScalingSchedule_sunday :: Lens' WeeklyAutoScalingSchedule (Maybe (HashMap Text Text))
weeklyAutoScalingSchedule_sunday = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WeeklyAutoScalingSchedule' {Maybe (HashMap Text Text)
sunday :: Maybe (HashMap Text Text)
$sel:sunday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
sunday} -> Maybe (HashMap Text Text)
sunday) (\s :: WeeklyAutoScalingSchedule
s@WeeklyAutoScalingSchedule' {} Maybe (HashMap Text Text)
a -> WeeklyAutoScalingSchedule
s {$sel:sunday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
sunday = Maybe (HashMap Text Text)
a} :: WeeklyAutoScalingSchedule) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The schedule for Thursday.
weeklyAutoScalingSchedule_thursday :: Lens.Lens' WeeklyAutoScalingSchedule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
weeklyAutoScalingSchedule_thursday :: Lens' WeeklyAutoScalingSchedule (Maybe (HashMap Text Text))
weeklyAutoScalingSchedule_thursday = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WeeklyAutoScalingSchedule' {Maybe (HashMap Text Text)
thursday :: Maybe (HashMap Text Text)
$sel:thursday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
thursday} -> Maybe (HashMap Text Text)
thursday) (\s :: WeeklyAutoScalingSchedule
s@WeeklyAutoScalingSchedule' {} Maybe (HashMap Text Text)
a -> WeeklyAutoScalingSchedule
s {$sel:thursday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
thursday = Maybe (HashMap Text Text)
a} :: WeeklyAutoScalingSchedule) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The schedule for Tuesday.
weeklyAutoScalingSchedule_tuesday :: Lens.Lens' WeeklyAutoScalingSchedule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
weeklyAutoScalingSchedule_tuesday :: Lens' WeeklyAutoScalingSchedule (Maybe (HashMap Text Text))
weeklyAutoScalingSchedule_tuesday = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WeeklyAutoScalingSchedule' {Maybe (HashMap Text Text)
tuesday :: Maybe (HashMap Text Text)
$sel:tuesday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
tuesday} -> Maybe (HashMap Text Text)
tuesday) (\s :: WeeklyAutoScalingSchedule
s@WeeklyAutoScalingSchedule' {} Maybe (HashMap Text Text)
a -> WeeklyAutoScalingSchedule
s {$sel:tuesday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
tuesday = Maybe (HashMap Text Text)
a} :: WeeklyAutoScalingSchedule) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The schedule for Wednesday.
weeklyAutoScalingSchedule_wednesday :: Lens.Lens' WeeklyAutoScalingSchedule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
weeklyAutoScalingSchedule_wednesday :: Lens' WeeklyAutoScalingSchedule (Maybe (HashMap Text Text))
weeklyAutoScalingSchedule_wednesday = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WeeklyAutoScalingSchedule' {Maybe (HashMap Text Text)
wednesday :: Maybe (HashMap Text Text)
$sel:wednesday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
wednesday} -> Maybe (HashMap Text Text)
wednesday) (\s :: WeeklyAutoScalingSchedule
s@WeeklyAutoScalingSchedule' {} Maybe (HashMap Text Text)
a -> WeeklyAutoScalingSchedule
s {$sel:wednesday:WeeklyAutoScalingSchedule' :: Maybe (HashMap Text Text)
wednesday = Maybe (HashMap Text Text)
a} :: WeeklyAutoScalingSchedule) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromJSON WeeklyAutoScalingSchedule where
  parseJSON :: Value -> Parser WeeklyAutoScalingSchedule
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"WeeklyAutoScalingSchedule"
      ( \Object
x ->
          Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> WeeklyAutoScalingSchedule
WeeklyAutoScalingSchedule'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Friday" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Monday" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Saturday" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Sunday" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Thursday" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tuesday" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Wednesday" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable WeeklyAutoScalingSchedule where
  hashWithSalt :: Int -> WeeklyAutoScalingSchedule -> Int
hashWithSalt Int
_salt WeeklyAutoScalingSchedule' {Maybe (HashMap Text Text)
wednesday :: Maybe (HashMap Text Text)
tuesday :: Maybe (HashMap Text Text)
thursday :: Maybe (HashMap Text Text)
sunday :: Maybe (HashMap Text Text)
saturday :: Maybe (HashMap Text Text)
monday :: Maybe (HashMap Text Text)
friday :: Maybe (HashMap Text Text)
$sel:wednesday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:tuesday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:thursday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:sunday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:saturday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:monday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:friday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
friday
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
monday
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
saturday
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
sunday
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
thursday
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tuesday
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
wednesday

instance Prelude.NFData WeeklyAutoScalingSchedule where
  rnf :: WeeklyAutoScalingSchedule -> ()
rnf WeeklyAutoScalingSchedule' {Maybe (HashMap Text Text)
wednesday :: Maybe (HashMap Text Text)
tuesday :: Maybe (HashMap Text Text)
thursday :: Maybe (HashMap Text Text)
sunday :: Maybe (HashMap Text Text)
saturday :: Maybe (HashMap Text Text)
monday :: Maybe (HashMap Text Text)
friday :: Maybe (HashMap Text Text)
$sel:wednesday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:tuesday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:thursday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:sunday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:saturday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:monday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:friday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
friday
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
monday
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
saturday
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
sunday
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
thursday
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tuesday
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
wednesday

instance Data.ToJSON WeeklyAutoScalingSchedule where
  toJSON :: WeeklyAutoScalingSchedule -> Value
toJSON WeeklyAutoScalingSchedule' {Maybe (HashMap Text Text)
wednesday :: Maybe (HashMap Text Text)
tuesday :: Maybe (HashMap Text Text)
thursday :: Maybe (HashMap Text Text)
sunday :: Maybe (HashMap Text Text)
saturday :: Maybe (HashMap Text Text)
monday :: Maybe (HashMap Text Text)
friday :: Maybe (HashMap Text Text)
$sel:wednesday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:tuesday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:thursday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:sunday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:saturday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:monday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
$sel:friday:WeeklyAutoScalingSchedule' :: WeeklyAutoScalingSchedule -> Maybe (HashMap Text Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Friday" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
friday,
            (Key
"Monday" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
monday,
            (Key
"Saturday" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
saturday,
            (Key
"Sunday" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
sunday,
            (Key
"Thursday" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
thursday,
            (Key
"Tuesday" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tuesday,
            (Key
"Wednesday" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
wednesday
          ]
      )