{-# 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.MaintenanceWindowIdentity
-- 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.MaintenanceWindowIdentity where

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

-- | Information about the maintenance window.
--
-- /See:/ 'newMaintenanceWindowIdentity' smart constructor.
data MaintenanceWindowIdentity = MaintenanceWindowIdentity'
  { -- | Indicates whether the maintenance window is enabled.
    MaintenanceWindowIdentity -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | The schedule of the maintenance window in the form of a cron or rate
    -- expression.
    MaintenanceWindowIdentity -> Maybe Text
schedule :: Prelude.Maybe Prelude.Text,
    -- | The next time the maintenance window will actually run, taking into
    -- account any specified times for the maintenance window to become active
    -- or inactive.
    MaintenanceWindowIdentity -> Maybe Text
nextExecutionTime :: Prelude.Maybe Prelude.Text,
    -- | The number of days to wait to run a maintenance window after the
    -- scheduled cron expression date and time.
    MaintenanceWindowIdentity -> Maybe Natural
scheduleOffset :: Prelude.Maybe Prelude.Natural,
    -- | The date and time, in ISO-8601 Extended format, for when the maintenance
    -- window is scheduled to become inactive.
    MaintenanceWindowIdentity -> Maybe Text
endDate :: Prelude.Maybe Prelude.Text,
    -- | The time zone that the scheduled maintenance window executions are based
    -- on, in Internet Assigned Numbers Authority (IANA) format.
    MaintenanceWindowIdentity -> Maybe Text
scheduleTimezone :: Prelude.Maybe Prelude.Text,
    -- | The date and time, in ISO-8601 Extended format, for when the maintenance
    -- window is scheduled to become active.
    MaintenanceWindowIdentity -> Maybe Text
startDate :: Prelude.Maybe Prelude.Text,
    -- | The name of the maintenance window.
    MaintenanceWindowIdentity -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The number of hours before the end of the maintenance window that Amazon
    -- Web Services Systems Manager stops scheduling new tasks for execution.
    MaintenanceWindowIdentity -> Maybe Natural
cutoff :: Prelude.Maybe Prelude.Natural,
    -- | A description of the maintenance window.
    MaintenanceWindowIdentity -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The duration of the maintenance window in hours.
    MaintenanceWindowIdentity -> Maybe Natural
duration :: Prelude.Maybe Prelude.Natural,
    -- | The ID of the maintenance window.
    MaintenanceWindowIdentity -> Maybe Text
windowId :: Prelude.Maybe Prelude.Text
  }
  deriving (MaintenanceWindowIdentity -> MaintenanceWindowIdentity -> Bool
(MaintenanceWindowIdentity -> MaintenanceWindowIdentity -> Bool)
-> (MaintenanceWindowIdentity -> MaintenanceWindowIdentity -> Bool)
-> Eq MaintenanceWindowIdentity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceWindowIdentity -> MaintenanceWindowIdentity -> Bool
$c/= :: MaintenanceWindowIdentity -> MaintenanceWindowIdentity -> Bool
== :: MaintenanceWindowIdentity -> MaintenanceWindowIdentity -> Bool
$c== :: MaintenanceWindowIdentity -> MaintenanceWindowIdentity -> Bool
Prelude.Eq, Int -> MaintenanceWindowIdentity -> ShowS
[MaintenanceWindowIdentity] -> ShowS
MaintenanceWindowIdentity -> String
(Int -> MaintenanceWindowIdentity -> ShowS)
-> (MaintenanceWindowIdentity -> String)
-> ([MaintenanceWindowIdentity] -> ShowS)
-> Show MaintenanceWindowIdentity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceWindowIdentity] -> ShowS
$cshowList :: [MaintenanceWindowIdentity] -> ShowS
show :: MaintenanceWindowIdentity -> String
$cshow :: MaintenanceWindowIdentity -> String
showsPrec :: Int -> MaintenanceWindowIdentity -> ShowS
$cshowsPrec :: Int -> MaintenanceWindowIdentity -> ShowS
Prelude.Show, (forall x.
 MaintenanceWindowIdentity -> Rep MaintenanceWindowIdentity x)
-> (forall x.
    Rep MaintenanceWindowIdentity x -> MaintenanceWindowIdentity)
-> Generic MaintenanceWindowIdentity
forall x.
Rep MaintenanceWindowIdentity x -> MaintenanceWindowIdentity
forall x.
MaintenanceWindowIdentity -> Rep MaintenanceWindowIdentity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MaintenanceWindowIdentity x -> MaintenanceWindowIdentity
$cfrom :: forall x.
MaintenanceWindowIdentity -> Rep MaintenanceWindowIdentity x
Prelude.Generic)

-- |
-- Create a value of 'MaintenanceWindowIdentity' 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:
--
-- 'enabled', 'maintenanceWindowIdentity_enabled' - Indicates whether the maintenance window is enabled.
--
-- 'schedule', 'maintenanceWindowIdentity_schedule' - The schedule of the maintenance window in the form of a cron or rate
-- expression.
--
-- 'nextExecutionTime', 'maintenanceWindowIdentity_nextExecutionTime' - The next time the maintenance window will actually run, taking into
-- account any specified times for the maintenance window to become active
-- or inactive.
--
-- 'scheduleOffset', 'maintenanceWindowIdentity_scheduleOffset' - The number of days to wait to run a maintenance window after the
-- scheduled cron expression date and time.
--
-- 'endDate', 'maintenanceWindowIdentity_endDate' - The date and time, in ISO-8601 Extended format, for when the maintenance
-- window is scheduled to become inactive.
--
-- 'scheduleTimezone', 'maintenanceWindowIdentity_scheduleTimezone' - The time zone that the scheduled maintenance window executions are based
-- on, in Internet Assigned Numbers Authority (IANA) format.
--
-- 'startDate', 'maintenanceWindowIdentity_startDate' - The date and time, in ISO-8601 Extended format, for when the maintenance
-- window is scheduled to become active.
--
-- 'name', 'maintenanceWindowIdentity_name' - The name of the maintenance window.
--
-- 'cutoff', 'maintenanceWindowIdentity_cutoff' - The number of hours before the end of the maintenance window that Amazon
-- Web Services Systems Manager stops scheduling new tasks for execution.
--
-- 'description', 'maintenanceWindowIdentity_description' - A description of the maintenance window.
--
-- 'duration', 'maintenanceWindowIdentity_duration' - The duration of the maintenance window in hours.
--
-- 'windowId', 'maintenanceWindowIdentity_windowId' - The ID of the maintenance window.
newMaintenanceWindowIdentity ::
  MaintenanceWindowIdentity
newMaintenanceWindowIdentity :: MaintenanceWindowIdentity
newMaintenanceWindowIdentity =
  MaintenanceWindowIdentity' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe (Sensitive Text)
-> Maybe Natural
-> Maybe Text
-> MaintenanceWindowIdentity
MaintenanceWindowIdentity'
    { $sel:enabled:MaintenanceWindowIdentity' :: Maybe Bool
enabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:schedule:MaintenanceWindowIdentity' :: Maybe Text
schedule = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextExecutionTime:MaintenanceWindowIdentity' :: Maybe Text
nextExecutionTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduleOffset:MaintenanceWindowIdentity' :: Maybe Natural
scheduleOffset = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:endDate:MaintenanceWindowIdentity' :: Maybe Text
endDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduleTimezone:MaintenanceWindowIdentity' :: Maybe Text
scheduleTimezone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startDate:MaintenanceWindowIdentity' :: Maybe Text
startDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:MaintenanceWindowIdentity' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cutoff:MaintenanceWindowIdentity' :: Maybe Natural
cutoff = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:description:MaintenanceWindowIdentity' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:duration:MaintenanceWindowIdentity' :: Maybe Natural
duration = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:windowId:MaintenanceWindowIdentity' :: Maybe Text
windowId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Indicates whether the maintenance window is enabled.
maintenanceWindowIdentity_enabled :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Bool)
maintenanceWindowIdentity_enabled :: (Maybe Bool -> f (Maybe Bool))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_enabled = (MaintenanceWindowIdentity -> Maybe Bool)
-> (MaintenanceWindowIdentity
    -> Maybe Bool -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe Bool
a -> MaintenanceWindowIdentity
s {$sel:enabled:MaintenanceWindowIdentity' :: Maybe Bool
enabled = Maybe Bool
a} :: MaintenanceWindowIdentity)

-- | The schedule of the maintenance window in the form of a cron or rate
-- expression.
maintenanceWindowIdentity_schedule :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowIdentity_schedule :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_schedule = (MaintenanceWindowIdentity -> Maybe Text)
-> (MaintenanceWindowIdentity
    -> Maybe Text -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe Text
schedule :: Maybe Text
$sel:schedule:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe Text
schedule} -> Maybe Text
schedule) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe Text
a -> MaintenanceWindowIdentity
s {$sel:schedule:MaintenanceWindowIdentity' :: Maybe Text
schedule = Maybe Text
a} :: MaintenanceWindowIdentity)

-- | The next time the maintenance window will actually run, taking into
-- account any specified times for the maintenance window to become active
-- or inactive.
maintenanceWindowIdentity_nextExecutionTime :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowIdentity_nextExecutionTime :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_nextExecutionTime = (MaintenanceWindowIdentity -> Maybe Text)
-> (MaintenanceWindowIdentity
    -> Maybe Text -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe Text
nextExecutionTime :: Maybe Text
$sel:nextExecutionTime:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe Text
nextExecutionTime} -> Maybe Text
nextExecutionTime) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe Text
a -> MaintenanceWindowIdentity
s {$sel:nextExecutionTime:MaintenanceWindowIdentity' :: Maybe Text
nextExecutionTime = Maybe Text
a} :: MaintenanceWindowIdentity)

-- | The number of days to wait to run a maintenance window after the
-- scheduled cron expression date and time.
maintenanceWindowIdentity_scheduleOffset :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Natural)
maintenanceWindowIdentity_scheduleOffset :: (Maybe Natural -> f (Maybe Natural))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_scheduleOffset = (MaintenanceWindowIdentity -> Maybe Natural)
-> (MaintenanceWindowIdentity
    -> Maybe Natural -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe Natural
scheduleOffset :: Maybe Natural
$sel:scheduleOffset:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe Natural
scheduleOffset} -> Maybe Natural
scheduleOffset) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe Natural
a -> MaintenanceWindowIdentity
s {$sel:scheduleOffset:MaintenanceWindowIdentity' :: Maybe Natural
scheduleOffset = Maybe Natural
a} :: MaintenanceWindowIdentity)

-- | The date and time, in ISO-8601 Extended format, for when the maintenance
-- window is scheduled to become inactive.
maintenanceWindowIdentity_endDate :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowIdentity_endDate :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_endDate = (MaintenanceWindowIdentity -> Maybe Text)
-> (MaintenanceWindowIdentity
    -> Maybe Text -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe Text
endDate :: Maybe Text
$sel:endDate:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe Text
endDate} -> Maybe Text
endDate) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe Text
a -> MaintenanceWindowIdentity
s {$sel:endDate:MaintenanceWindowIdentity' :: Maybe Text
endDate = Maybe Text
a} :: MaintenanceWindowIdentity)

-- | The time zone that the scheduled maintenance window executions are based
-- on, in Internet Assigned Numbers Authority (IANA) format.
maintenanceWindowIdentity_scheduleTimezone :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowIdentity_scheduleTimezone :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_scheduleTimezone = (MaintenanceWindowIdentity -> Maybe Text)
-> (MaintenanceWindowIdentity
    -> Maybe Text -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe Text
scheduleTimezone :: Maybe Text
$sel:scheduleTimezone:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe Text
scheduleTimezone} -> Maybe Text
scheduleTimezone) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe Text
a -> MaintenanceWindowIdentity
s {$sel:scheduleTimezone:MaintenanceWindowIdentity' :: Maybe Text
scheduleTimezone = Maybe Text
a} :: MaintenanceWindowIdentity)

-- | The date and time, in ISO-8601 Extended format, for when the maintenance
-- window is scheduled to become active.
maintenanceWindowIdentity_startDate :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowIdentity_startDate :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_startDate = (MaintenanceWindowIdentity -> Maybe Text)
-> (MaintenanceWindowIdentity
    -> Maybe Text -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe Text
startDate :: Maybe Text
$sel:startDate:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe Text
startDate} -> Maybe Text
startDate) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe Text
a -> MaintenanceWindowIdentity
s {$sel:startDate:MaintenanceWindowIdentity' :: Maybe Text
startDate = Maybe Text
a} :: MaintenanceWindowIdentity)

-- | The name of the maintenance window.
maintenanceWindowIdentity_name :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowIdentity_name :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_name = (MaintenanceWindowIdentity -> Maybe Text)
-> (MaintenanceWindowIdentity
    -> Maybe Text -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe Text
name :: Maybe Text
$sel:name:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe Text
name} -> Maybe Text
name) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe Text
a -> MaintenanceWindowIdentity
s {$sel:name:MaintenanceWindowIdentity' :: Maybe Text
name = Maybe Text
a} :: MaintenanceWindowIdentity)

-- | The number of hours before the end of the maintenance window that Amazon
-- Web Services Systems Manager stops scheduling new tasks for execution.
maintenanceWindowIdentity_cutoff :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Natural)
maintenanceWindowIdentity_cutoff :: (Maybe Natural -> f (Maybe Natural))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_cutoff = (MaintenanceWindowIdentity -> Maybe Natural)
-> (MaintenanceWindowIdentity
    -> Maybe Natural -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe Natural
cutoff :: Maybe Natural
$sel:cutoff:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe Natural
cutoff} -> Maybe Natural
cutoff) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe Natural
a -> MaintenanceWindowIdentity
s {$sel:cutoff:MaintenanceWindowIdentity' :: Maybe Natural
cutoff = Maybe Natural
a} :: MaintenanceWindowIdentity)

-- | A description of the maintenance window.
maintenanceWindowIdentity_description :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Text)
maintenanceWindowIdentity_description :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_description = (MaintenanceWindowIdentity -> Maybe (Sensitive Text))
-> (MaintenanceWindowIdentity
    -> Maybe (Sensitive Text) -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe (Sensitive Text)
a -> MaintenanceWindowIdentity
s {$sel:description:MaintenanceWindowIdentity' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: MaintenanceWindowIdentity) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowIdentity
-> f MaintenanceWindowIdentity
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 duration of the maintenance window in hours.
maintenanceWindowIdentity_duration :: Lens.Lens' MaintenanceWindowIdentity (Prelude.Maybe Prelude.Natural)
maintenanceWindowIdentity_duration :: (Maybe Natural -> f (Maybe Natural))
-> MaintenanceWindowIdentity -> f MaintenanceWindowIdentity
maintenanceWindowIdentity_duration = (MaintenanceWindowIdentity -> Maybe Natural)
-> (MaintenanceWindowIdentity
    -> Maybe Natural -> MaintenanceWindowIdentity)
-> Lens
     MaintenanceWindowIdentity
     MaintenanceWindowIdentity
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentity' {Maybe Natural
duration :: Maybe Natural
$sel:duration:MaintenanceWindowIdentity' :: MaintenanceWindowIdentity -> Maybe Natural
duration} -> Maybe Natural
duration) (\s :: MaintenanceWindowIdentity
s@MaintenanceWindowIdentity' {} Maybe Natural
a -> MaintenanceWindowIdentity
s {$sel:duration:MaintenanceWindowIdentity' :: Maybe Natural
duration = Maybe Natural
a} :: MaintenanceWindowIdentity)

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

instance Core.FromJSON MaintenanceWindowIdentity where
  parseJSON :: Value -> Parser MaintenanceWindowIdentity
parseJSON =
    String
-> (Object -> Parser MaintenanceWindowIdentity)
-> Value
-> Parser MaintenanceWindowIdentity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MaintenanceWindowIdentity"
      ( \Object
x ->
          Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe (Sensitive Text)
-> Maybe Natural
-> Maybe Text
-> MaintenanceWindowIdentity
MaintenanceWindowIdentity'
            (Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe (Sensitive Text)
 -> Maybe Natural
 -> Maybe Text
 -> MaintenanceWindowIdentity)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (Sensitive Text)
      -> Maybe Natural
      -> Maybe Text
      -> MaintenanceWindowIdentity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Enabled")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (Sensitive Text)
   -> Maybe Natural
   -> Maybe Text
   -> MaintenanceWindowIdentity)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (Sensitive Text)
      -> Maybe Natural
      -> Maybe Text
      -> MaintenanceWindowIdentity)
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
"Schedule")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (Sensitive Text)
   -> Maybe Natural
   -> Maybe Text
   -> MaintenanceWindowIdentity)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (Sensitive Text)
      -> Maybe Natural
      -> Maybe Text
      -> MaintenanceWindowIdentity)
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
"NextExecutionTime")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (Sensitive Text)
   -> Maybe Natural
   -> Maybe Text
   -> MaintenanceWindowIdentity)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (Sensitive Text)
      -> Maybe Natural
      -> Maybe Text
      -> MaintenanceWindowIdentity)
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
"ScheduleOffset")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (Sensitive Text)
   -> Maybe Natural
   -> Maybe Text
   -> MaintenanceWindowIdentity)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (Sensitive Text)
      -> Maybe Natural
      -> Maybe Text
      -> MaintenanceWindowIdentity)
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
"EndDate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (Sensitive Text)
   -> Maybe Natural
   -> Maybe Text
   -> MaintenanceWindowIdentity)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe (Sensitive Text)
      -> Maybe Natural
      -> Maybe Text
      -> MaintenanceWindowIdentity)
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
"ScheduleTimezone")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe (Sensitive Text)
   -> Maybe Natural
   -> Maybe Text
   -> MaintenanceWindowIdentity)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe (Sensitive Text)
      -> Maybe Natural
      -> Maybe Text
      -> MaintenanceWindowIdentity)
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
"StartDate")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe (Sensitive Text)
   -> Maybe Natural
   -> Maybe Text
   -> MaintenanceWindowIdentity)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe (Sensitive Text)
      -> Maybe Natural
      -> Maybe Text
      -> MaintenanceWindowIdentity)
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 Natural
   -> Maybe (Sensitive Text)
   -> Maybe Natural
   -> Maybe Text
   -> MaintenanceWindowIdentity)
-> Parser (Maybe Natural)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Natural -> Maybe Text -> MaintenanceWindowIdentity)
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
"Cutoff")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Natural -> Maybe Text -> MaintenanceWindowIdentity)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Natural -> Maybe Text -> MaintenanceWindowIdentity)
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 Natural -> Maybe Text -> MaintenanceWindowIdentity)
-> Parser (Maybe Natural)
-> Parser (Maybe Text -> MaintenanceWindowIdentity)
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
"Duration")
            Parser (Maybe Text -> MaintenanceWindowIdentity)
-> Parser (Maybe Text) -> Parser MaintenanceWindowIdentity
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 MaintenanceWindowIdentity

instance Prelude.NFData MaintenanceWindowIdentity