{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DescribeMaintenanceWindowSchedule
-- 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)
--
-- Retrieves information about upcoming executions of a maintenance window.
--
-- This operation returns paginated results.
module Amazonka.SSM.DescribeMaintenanceWindowSchedule
  ( -- * Creating a Request
    DescribeMaintenanceWindowSchedule (..),
    newDescribeMaintenanceWindowSchedule,

    -- * Request Lenses
    describeMaintenanceWindowSchedule_resourceType,
    describeMaintenanceWindowSchedule_filters,
    describeMaintenanceWindowSchedule_nextToken,
    describeMaintenanceWindowSchedule_targets,
    describeMaintenanceWindowSchedule_maxResults,
    describeMaintenanceWindowSchedule_windowId,

    -- * Destructuring the Response
    DescribeMaintenanceWindowScheduleResponse (..),
    newDescribeMaintenanceWindowScheduleResponse,

    -- * Response Lenses
    describeMaintenanceWindowScheduleResponse_scheduledWindowExecutions,
    describeMaintenanceWindowScheduleResponse_nextToken,
    describeMaintenanceWindowScheduleResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SSM.Types

-- | /See:/ 'newDescribeMaintenanceWindowSchedule' smart constructor.
data DescribeMaintenanceWindowSchedule = DescribeMaintenanceWindowSchedule'
  { -- | The type of resource you want to retrieve information about. For
    -- example, @INSTANCE@.
    DescribeMaintenanceWindowSchedule
-> Maybe MaintenanceWindowResourceType
resourceType :: Prelude.Maybe MaintenanceWindowResourceType,
    -- | Filters used to limit the range of results. For example, you can limit
    -- maintenance window executions to only those scheduled before or after a
    -- certain date and time.
    DescribeMaintenanceWindowSchedule
-> Maybe [PatchOrchestratorFilter]
filters :: Prelude.Maybe [PatchOrchestratorFilter],
    -- | The token for the next set of items to return. (You received this token
    -- from a previous call.)
    DescribeMaintenanceWindowSchedule -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The instance ID or key-value pair to retrieve information about.
    DescribeMaintenanceWindowSchedule -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | The maximum number of items to return for this call. The call also
    -- returns a token that you can specify in a subsequent call to get the
    -- next set of results.
    DescribeMaintenanceWindowSchedule -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The ID of the maintenance window to retrieve information about.
    DescribeMaintenanceWindowSchedule -> Maybe Text
windowId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeMaintenanceWindowSchedule
-> DescribeMaintenanceWindowSchedule -> Bool
(DescribeMaintenanceWindowSchedule
 -> DescribeMaintenanceWindowSchedule -> Bool)
-> (DescribeMaintenanceWindowSchedule
    -> DescribeMaintenanceWindowSchedule -> Bool)
-> Eq DescribeMaintenanceWindowSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMaintenanceWindowSchedule
-> DescribeMaintenanceWindowSchedule -> Bool
$c/= :: DescribeMaintenanceWindowSchedule
-> DescribeMaintenanceWindowSchedule -> Bool
== :: DescribeMaintenanceWindowSchedule
-> DescribeMaintenanceWindowSchedule -> Bool
$c== :: DescribeMaintenanceWindowSchedule
-> DescribeMaintenanceWindowSchedule -> Bool
Prelude.Eq, ReadPrec [DescribeMaintenanceWindowSchedule]
ReadPrec DescribeMaintenanceWindowSchedule
Int -> ReadS DescribeMaintenanceWindowSchedule
ReadS [DescribeMaintenanceWindowSchedule]
(Int -> ReadS DescribeMaintenanceWindowSchedule)
-> ReadS [DescribeMaintenanceWindowSchedule]
-> ReadPrec DescribeMaintenanceWindowSchedule
-> ReadPrec [DescribeMaintenanceWindowSchedule]
-> Read DescribeMaintenanceWindowSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMaintenanceWindowSchedule]
$creadListPrec :: ReadPrec [DescribeMaintenanceWindowSchedule]
readPrec :: ReadPrec DescribeMaintenanceWindowSchedule
$creadPrec :: ReadPrec DescribeMaintenanceWindowSchedule
readList :: ReadS [DescribeMaintenanceWindowSchedule]
$creadList :: ReadS [DescribeMaintenanceWindowSchedule]
readsPrec :: Int -> ReadS DescribeMaintenanceWindowSchedule
$creadsPrec :: Int -> ReadS DescribeMaintenanceWindowSchedule
Prelude.Read, Int -> DescribeMaintenanceWindowSchedule -> ShowS
[DescribeMaintenanceWindowSchedule] -> ShowS
DescribeMaintenanceWindowSchedule -> String
(Int -> DescribeMaintenanceWindowSchedule -> ShowS)
-> (DescribeMaintenanceWindowSchedule -> String)
-> ([DescribeMaintenanceWindowSchedule] -> ShowS)
-> Show DescribeMaintenanceWindowSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMaintenanceWindowSchedule] -> ShowS
$cshowList :: [DescribeMaintenanceWindowSchedule] -> ShowS
show :: DescribeMaintenanceWindowSchedule -> String
$cshow :: DescribeMaintenanceWindowSchedule -> String
showsPrec :: Int -> DescribeMaintenanceWindowSchedule -> ShowS
$cshowsPrec :: Int -> DescribeMaintenanceWindowSchedule -> ShowS
Prelude.Show, (forall x.
 DescribeMaintenanceWindowSchedule
 -> Rep DescribeMaintenanceWindowSchedule x)
-> (forall x.
    Rep DescribeMaintenanceWindowSchedule x
    -> DescribeMaintenanceWindowSchedule)
-> Generic DescribeMaintenanceWindowSchedule
forall x.
Rep DescribeMaintenanceWindowSchedule x
-> DescribeMaintenanceWindowSchedule
forall x.
DescribeMaintenanceWindowSchedule
-> Rep DescribeMaintenanceWindowSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMaintenanceWindowSchedule x
-> DescribeMaintenanceWindowSchedule
$cfrom :: forall x.
DescribeMaintenanceWindowSchedule
-> Rep DescribeMaintenanceWindowSchedule x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMaintenanceWindowSchedule' 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:
--
-- 'resourceType', 'describeMaintenanceWindowSchedule_resourceType' - The type of resource you want to retrieve information about. For
-- example, @INSTANCE@.
--
-- 'filters', 'describeMaintenanceWindowSchedule_filters' - Filters used to limit the range of results. For example, you can limit
-- maintenance window executions to only those scheduled before or after a
-- certain date and time.
--
-- 'nextToken', 'describeMaintenanceWindowSchedule_nextToken' - The token for the next set of items to return. (You received this token
-- from a previous call.)
--
-- 'targets', 'describeMaintenanceWindowSchedule_targets' - The instance ID or key-value pair to retrieve information about.
--
-- 'maxResults', 'describeMaintenanceWindowSchedule_maxResults' - The maximum number of items to return for this call. The call also
-- returns a token that you can specify in a subsequent call to get the
-- next set of results.
--
-- 'windowId', 'describeMaintenanceWindowSchedule_windowId' - The ID of the maintenance window to retrieve information about.
newDescribeMaintenanceWindowSchedule ::
  DescribeMaintenanceWindowSchedule
newDescribeMaintenanceWindowSchedule :: DescribeMaintenanceWindowSchedule
newDescribeMaintenanceWindowSchedule =
  DescribeMaintenanceWindowSchedule' :: Maybe MaintenanceWindowResourceType
-> Maybe [PatchOrchestratorFilter]
-> Maybe Text
-> Maybe [Target]
-> Maybe Natural
-> Maybe Text
-> DescribeMaintenanceWindowSchedule
DescribeMaintenanceWindowSchedule'
    { $sel:resourceType:DescribeMaintenanceWindowSchedule' :: Maybe MaintenanceWindowResourceType
resourceType =
        Maybe MaintenanceWindowResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeMaintenanceWindowSchedule' :: Maybe [PatchOrchestratorFilter]
filters = Maybe [PatchOrchestratorFilter]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeMaintenanceWindowSchedule' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:DescribeMaintenanceWindowSchedule' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeMaintenanceWindowSchedule' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:windowId:DescribeMaintenanceWindowSchedule' :: Maybe Text
windowId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The type of resource you want to retrieve information about. For
-- example, @INSTANCE@.
describeMaintenanceWindowSchedule_resourceType :: Lens.Lens' DescribeMaintenanceWindowSchedule (Prelude.Maybe MaintenanceWindowResourceType)
describeMaintenanceWindowSchedule_resourceType :: (Maybe MaintenanceWindowResourceType
 -> f (Maybe MaintenanceWindowResourceType))
-> DescribeMaintenanceWindowSchedule
-> f DescribeMaintenanceWindowSchedule
describeMaintenanceWindowSchedule_resourceType = (DescribeMaintenanceWindowSchedule
 -> Maybe MaintenanceWindowResourceType)
-> (DescribeMaintenanceWindowSchedule
    -> Maybe MaintenanceWindowResourceType
    -> DescribeMaintenanceWindowSchedule)
-> Lens
     DescribeMaintenanceWindowSchedule
     DescribeMaintenanceWindowSchedule
     (Maybe MaintenanceWindowResourceType)
     (Maybe MaintenanceWindowResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowSchedule' {Maybe MaintenanceWindowResourceType
resourceType :: Maybe MaintenanceWindowResourceType
$sel:resourceType:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule
-> Maybe MaintenanceWindowResourceType
resourceType} -> Maybe MaintenanceWindowResourceType
resourceType) (\s :: DescribeMaintenanceWindowSchedule
s@DescribeMaintenanceWindowSchedule' {} Maybe MaintenanceWindowResourceType
a -> DescribeMaintenanceWindowSchedule
s {$sel:resourceType:DescribeMaintenanceWindowSchedule' :: Maybe MaintenanceWindowResourceType
resourceType = Maybe MaintenanceWindowResourceType
a} :: DescribeMaintenanceWindowSchedule)

-- | Filters used to limit the range of results. For example, you can limit
-- maintenance window executions to only those scheduled before or after a
-- certain date and time.
describeMaintenanceWindowSchedule_filters :: Lens.Lens' DescribeMaintenanceWindowSchedule (Prelude.Maybe [PatchOrchestratorFilter])
describeMaintenanceWindowSchedule_filters :: (Maybe [PatchOrchestratorFilter]
 -> f (Maybe [PatchOrchestratorFilter]))
-> DescribeMaintenanceWindowSchedule
-> f DescribeMaintenanceWindowSchedule
describeMaintenanceWindowSchedule_filters = (DescribeMaintenanceWindowSchedule
 -> Maybe [PatchOrchestratorFilter])
-> (DescribeMaintenanceWindowSchedule
    -> Maybe [PatchOrchestratorFilter]
    -> DescribeMaintenanceWindowSchedule)
-> Lens
     DescribeMaintenanceWindowSchedule
     DescribeMaintenanceWindowSchedule
     (Maybe [PatchOrchestratorFilter])
     (Maybe [PatchOrchestratorFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowSchedule' {Maybe [PatchOrchestratorFilter]
filters :: Maybe [PatchOrchestratorFilter]
$sel:filters:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule
-> Maybe [PatchOrchestratorFilter]
filters} -> Maybe [PatchOrchestratorFilter]
filters) (\s :: DescribeMaintenanceWindowSchedule
s@DescribeMaintenanceWindowSchedule' {} Maybe [PatchOrchestratorFilter]
a -> DescribeMaintenanceWindowSchedule
s {$sel:filters:DescribeMaintenanceWindowSchedule' :: Maybe [PatchOrchestratorFilter]
filters = Maybe [PatchOrchestratorFilter]
a} :: DescribeMaintenanceWindowSchedule) ((Maybe [PatchOrchestratorFilter]
  -> f (Maybe [PatchOrchestratorFilter]))
 -> DescribeMaintenanceWindowSchedule
 -> f DescribeMaintenanceWindowSchedule)
-> ((Maybe [PatchOrchestratorFilter]
     -> f (Maybe [PatchOrchestratorFilter]))
    -> Maybe [PatchOrchestratorFilter]
    -> f (Maybe [PatchOrchestratorFilter]))
-> (Maybe [PatchOrchestratorFilter]
    -> f (Maybe [PatchOrchestratorFilter]))
-> DescribeMaintenanceWindowSchedule
-> f DescribeMaintenanceWindowSchedule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PatchOrchestratorFilter]
  [PatchOrchestratorFilter]
  [PatchOrchestratorFilter]
  [PatchOrchestratorFilter]
-> Iso
     (Maybe [PatchOrchestratorFilter])
     (Maybe [PatchOrchestratorFilter])
     (Maybe [PatchOrchestratorFilter])
     (Maybe [PatchOrchestratorFilter])
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
  [PatchOrchestratorFilter]
  [PatchOrchestratorFilter]
  [PatchOrchestratorFilter]
  [PatchOrchestratorFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token for the next set of items to return. (You received this token
-- from a previous call.)
describeMaintenanceWindowSchedule_nextToken :: Lens.Lens' DescribeMaintenanceWindowSchedule (Prelude.Maybe Prelude.Text)
describeMaintenanceWindowSchedule_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMaintenanceWindowSchedule
-> f DescribeMaintenanceWindowSchedule
describeMaintenanceWindowSchedule_nextToken = (DescribeMaintenanceWindowSchedule -> Maybe Text)
-> (DescribeMaintenanceWindowSchedule
    -> Maybe Text -> DescribeMaintenanceWindowSchedule)
-> Lens
     DescribeMaintenanceWindowSchedule
     DescribeMaintenanceWindowSchedule
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowSchedule' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMaintenanceWindowSchedule
s@DescribeMaintenanceWindowSchedule' {} Maybe Text
a -> DescribeMaintenanceWindowSchedule
s {$sel:nextToken:DescribeMaintenanceWindowSchedule' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMaintenanceWindowSchedule)

-- | The instance ID or key-value pair to retrieve information about.
describeMaintenanceWindowSchedule_targets :: Lens.Lens' DescribeMaintenanceWindowSchedule (Prelude.Maybe [Target])
describeMaintenanceWindowSchedule_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> DescribeMaintenanceWindowSchedule
-> f DescribeMaintenanceWindowSchedule
describeMaintenanceWindowSchedule_targets = (DescribeMaintenanceWindowSchedule -> Maybe [Target])
-> (DescribeMaintenanceWindowSchedule
    -> Maybe [Target] -> DescribeMaintenanceWindowSchedule)
-> Lens
     DescribeMaintenanceWindowSchedule
     DescribeMaintenanceWindowSchedule
     (Maybe [Target])
     (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowSchedule' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: DescribeMaintenanceWindowSchedule
s@DescribeMaintenanceWindowSchedule' {} Maybe [Target]
a -> DescribeMaintenanceWindowSchedule
s {$sel:targets:DescribeMaintenanceWindowSchedule' :: Maybe [Target]
targets = Maybe [Target]
a} :: DescribeMaintenanceWindowSchedule) ((Maybe [Target] -> f (Maybe [Target]))
 -> DescribeMaintenanceWindowSchedule
 -> f DescribeMaintenanceWindowSchedule)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> DescribeMaintenanceWindowSchedule
-> f DescribeMaintenanceWindowSchedule
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

-- | The maximum number of items to return for this call. The call also
-- returns a token that you can specify in a subsequent call to get the
-- next set of results.
describeMaintenanceWindowSchedule_maxResults :: Lens.Lens' DescribeMaintenanceWindowSchedule (Prelude.Maybe Prelude.Natural)
describeMaintenanceWindowSchedule_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeMaintenanceWindowSchedule
-> f DescribeMaintenanceWindowSchedule
describeMaintenanceWindowSchedule_maxResults = (DescribeMaintenanceWindowSchedule -> Maybe Natural)
-> (DescribeMaintenanceWindowSchedule
    -> Maybe Natural -> DescribeMaintenanceWindowSchedule)
-> Lens
     DescribeMaintenanceWindowSchedule
     DescribeMaintenanceWindowSchedule
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowSchedule' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeMaintenanceWindowSchedule
s@DescribeMaintenanceWindowSchedule' {} Maybe Natural
a -> DescribeMaintenanceWindowSchedule
s {$sel:maxResults:DescribeMaintenanceWindowSchedule' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeMaintenanceWindowSchedule)

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

instance
  Core.AWSPager
    DescribeMaintenanceWindowSchedule
  where
  page :: DescribeMaintenanceWindowSchedule
-> AWSResponse DescribeMaintenanceWindowSchedule
-> Maybe DescribeMaintenanceWindowSchedule
page DescribeMaintenanceWindowSchedule
rq AWSResponse DescribeMaintenanceWindowSchedule
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeMaintenanceWindowSchedule
DescribeMaintenanceWindowScheduleResponse
rs
            DescribeMaintenanceWindowScheduleResponse
-> Getting
     (First Text) DescribeMaintenanceWindowScheduleResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMaintenanceWindowScheduleResponse
-> Const (First Text) DescribeMaintenanceWindowScheduleResponse
Lens' DescribeMaintenanceWindowScheduleResponse (Maybe Text)
describeMaintenanceWindowScheduleResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeMaintenanceWindowScheduleResponse
 -> Const (First Text) DescribeMaintenanceWindowScheduleResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) DescribeMaintenanceWindowScheduleResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeMaintenanceWindowSchedule
forall a. Maybe a
Prelude.Nothing
    | Maybe [ScheduledWindowExecution] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeMaintenanceWindowSchedule
DescribeMaintenanceWindowScheduleResponse
rs
            DescribeMaintenanceWindowScheduleResponse
-> Getting
     (First [ScheduledWindowExecution])
     DescribeMaintenanceWindowScheduleResponse
     [ScheduledWindowExecution]
-> Maybe [ScheduledWindowExecution]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ScheduledWindowExecution]
 -> Const
      (First [ScheduledWindowExecution])
      (Maybe [ScheduledWindowExecution]))
-> DescribeMaintenanceWindowScheduleResponse
-> Const
     (First [ScheduledWindowExecution])
     DescribeMaintenanceWindowScheduleResponse
Lens'
  DescribeMaintenanceWindowScheduleResponse
  (Maybe [ScheduledWindowExecution])
describeMaintenanceWindowScheduleResponse_scheduledWindowExecutions
              ((Maybe [ScheduledWindowExecution]
  -> Const
       (First [ScheduledWindowExecution])
       (Maybe [ScheduledWindowExecution]))
 -> DescribeMaintenanceWindowScheduleResponse
 -> Const
      (First [ScheduledWindowExecution])
      DescribeMaintenanceWindowScheduleResponse)
-> (([ScheduledWindowExecution]
     -> Const
          (First [ScheduledWindowExecution]) [ScheduledWindowExecution])
    -> Maybe [ScheduledWindowExecution]
    -> Const
         (First [ScheduledWindowExecution])
         (Maybe [ScheduledWindowExecution]))
-> Getting
     (First [ScheduledWindowExecution])
     DescribeMaintenanceWindowScheduleResponse
     [ScheduledWindowExecution]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ScheduledWindowExecution]
 -> Const
      (First [ScheduledWindowExecution]) [ScheduledWindowExecution])
-> Maybe [ScheduledWindowExecution]
-> Const
     (First [ScheduledWindowExecution])
     (Maybe [ScheduledWindowExecution])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeMaintenanceWindowSchedule
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeMaintenanceWindowSchedule
-> Maybe DescribeMaintenanceWindowSchedule
forall a. a -> Maybe a
Prelude.Just (DescribeMaintenanceWindowSchedule
 -> Maybe DescribeMaintenanceWindowSchedule)
-> DescribeMaintenanceWindowSchedule
-> Maybe DescribeMaintenanceWindowSchedule
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeMaintenanceWindowSchedule
rq
          DescribeMaintenanceWindowSchedule
-> (DescribeMaintenanceWindowSchedule
    -> DescribeMaintenanceWindowSchedule)
-> DescribeMaintenanceWindowSchedule
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeMaintenanceWindowSchedule
-> Identity DescribeMaintenanceWindowSchedule
Lens
  DescribeMaintenanceWindowSchedule
  DescribeMaintenanceWindowSchedule
  (Maybe Text)
  (Maybe Text)
describeMaintenanceWindowSchedule_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeMaintenanceWindowSchedule
 -> Identity DescribeMaintenanceWindowSchedule)
-> Maybe Text
-> DescribeMaintenanceWindowSchedule
-> DescribeMaintenanceWindowSchedule
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeMaintenanceWindowSchedule
DescribeMaintenanceWindowScheduleResponse
rs
          DescribeMaintenanceWindowScheduleResponse
-> Getting
     (First Text) DescribeMaintenanceWindowScheduleResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMaintenanceWindowScheduleResponse
-> Const (First Text) DescribeMaintenanceWindowScheduleResponse
Lens' DescribeMaintenanceWindowScheduleResponse (Maybe Text)
describeMaintenanceWindowScheduleResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeMaintenanceWindowScheduleResponse
 -> Const (First Text) DescribeMaintenanceWindowScheduleResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) DescribeMaintenanceWindowScheduleResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance
  Core.AWSRequest
    DescribeMaintenanceWindowSchedule
  where
  type
    AWSResponse DescribeMaintenanceWindowSchedule =
      DescribeMaintenanceWindowScheduleResponse
  request :: DescribeMaintenanceWindowSchedule
-> Request DescribeMaintenanceWindowSchedule
request = Service
-> DescribeMaintenanceWindowSchedule
-> Request DescribeMaintenanceWindowSchedule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeMaintenanceWindowSchedule
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeMaintenanceWindowSchedule)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeMaintenanceWindowSchedule))
-> Logger
-> Service
-> Proxy DescribeMaintenanceWindowSchedule
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeMaintenanceWindowSchedule)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ScheduledWindowExecution]
-> Maybe Text -> Int -> DescribeMaintenanceWindowScheduleResponse
DescribeMaintenanceWindowScheduleResponse'
            (Maybe [ScheduledWindowExecution]
 -> Maybe Text -> Int -> DescribeMaintenanceWindowScheduleResponse)
-> Either String (Maybe [ScheduledWindowExecution])
-> Either
     String
     (Maybe Text -> Int -> DescribeMaintenanceWindowScheduleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ScheduledWindowExecution]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ScheduledWindowExecutions"
                            Either String (Maybe (Maybe [ScheduledWindowExecution]))
-> Maybe [ScheduledWindowExecution]
-> Either String (Maybe [ScheduledWindowExecution])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ScheduledWindowExecution]
forall a. Monoid a => a
Prelude.mempty
                        )
              Either
  String
  (Maybe Text -> Int -> DescribeMaintenanceWindowScheduleResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeMaintenanceWindowScheduleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
              Either String (Int -> DescribeMaintenanceWindowScheduleResponse)
-> Either String Int
-> Either String DescribeMaintenanceWindowScheduleResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    DescribeMaintenanceWindowSchedule

instance
  Prelude.NFData
    DescribeMaintenanceWindowSchedule

instance
  Core.ToHeaders
    DescribeMaintenanceWindowSchedule
  where
  toHeaders :: DescribeMaintenanceWindowSchedule -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeMaintenanceWindowSchedule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonSSM.DescribeMaintenanceWindowSchedule" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Core.ToJSON
    DescribeMaintenanceWindowSchedule
  where
  toJSON :: DescribeMaintenanceWindowSchedule -> Value
toJSON DescribeMaintenanceWindowSchedule' {Maybe Natural
Maybe [PatchOrchestratorFilter]
Maybe [Target]
Maybe Text
Maybe MaintenanceWindowResourceType
windowId :: Maybe Text
maxResults :: Maybe Natural
targets :: Maybe [Target]
nextToken :: Maybe Text
filters :: Maybe [PatchOrchestratorFilter]
resourceType :: Maybe MaintenanceWindowResourceType
$sel:windowId:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule -> Maybe Text
$sel:maxResults:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule -> Maybe Natural
$sel:targets:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule -> Maybe [Target]
$sel:nextToken:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule -> Maybe Text
$sel:filters:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule
-> Maybe [PatchOrchestratorFilter]
$sel:resourceType:DescribeMaintenanceWindowSchedule' :: DescribeMaintenanceWindowSchedule
-> Maybe MaintenanceWindowResourceType
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ResourceType" Text -> MaintenanceWindowResourceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MaintenanceWindowResourceType -> Pair)
-> Maybe MaintenanceWindowResourceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaintenanceWindowResourceType
resourceType,
            (Text
"Filters" Text -> [PatchOrchestratorFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([PatchOrchestratorFilter] -> Pair)
-> Maybe [PatchOrchestratorFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PatchOrchestratorFilter]
filters,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"Targets" Text -> [Target] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Target] -> Pair) -> Maybe [Target] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Target]
targets,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Text
"WindowId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
windowId
          ]
      )

instance
  Core.ToPath
    DescribeMaintenanceWindowSchedule
  where
  toPath :: DescribeMaintenanceWindowSchedule -> ByteString
toPath = ByteString -> DescribeMaintenanceWindowSchedule -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance
  Core.ToQuery
    DescribeMaintenanceWindowSchedule
  where
  toQuery :: DescribeMaintenanceWindowSchedule -> QueryString
toQuery = QueryString -> DescribeMaintenanceWindowSchedule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeMaintenanceWindowScheduleResponse' smart constructor.
data DescribeMaintenanceWindowScheduleResponse = DescribeMaintenanceWindowScheduleResponse'
  { -- | Information about maintenance window executions scheduled for the
    -- specified time range.
    DescribeMaintenanceWindowScheduleResponse
-> Maybe [ScheduledWindowExecution]
scheduledWindowExecutions :: Prelude.Maybe [ScheduledWindowExecution],
    -- | The token for the next set of items to return. (You use this token in
    -- the next call.)
    DescribeMaintenanceWindowScheduleResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeMaintenanceWindowScheduleResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeMaintenanceWindowScheduleResponse
-> DescribeMaintenanceWindowScheduleResponse -> Bool
(DescribeMaintenanceWindowScheduleResponse
 -> DescribeMaintenanceWindowScheduleResponse -> Bool)
-> (DescribeMaintenanceWindowScheduleResponse
    -> DescribeMaintenanceWindowScheduleResponse -> Bool)
-> Eq DescribeMaintenanceWindowScheduleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMaintenanceWindowScheduleResponse
-> DescribeMaintenanceWindowScheduleResponse -> Bool
$c/= :: DescribeMaintenanceWindowScheduleResponse
-> DescribeMaintenanceWindowScheduleResponse -> Bool
== :: DescribeMaintenanceWindowScheduleResponse
-> DescribeMaintenanceWindowScheduleResponse -> Bool
$c== :: DescribeMaintenanceWindowScheduleResponse
-> DescribeMaintenanceWindowScheduleResponse -> Bool
Prelude.Eq, ReadPrec [DescribeMaintenanceWindowScheduleResponse]
ReadPrec DescribeMaintenanceWindowScheduleResponse
Int -> ReadS DescribeMaintenanceWindowScheduleResponse
ReadS [DescribeMaintenanceWindowScheduleResponse]
(Int -> ReadS DescribeMaintenanceWindowScheduleResponse)
-> ReadS [DescribeMaintenanceWindowScheduleResponse]
-> ReadPrec DescribeMaintenanceWindowScheduleResponse
-> ReadPrec [DescribeMaintenanceWindowScheduleResponse]
-> Read DescribeMaintenanceWindowScheduleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMaintenanceWindowScheduleResponse]
$creadListPrec :: ReadPrec [DescribeMaintenanceWindowScheduleResponse]
readPrec :: ReadPrec DescribeMaintenanceWindowScheduleResponse
$creadPrec :: ReadPrec DescribeMaintenanceWindowScheduleResponse
readList :: ReadS [DescribeMaintenanceWindowScheduleResponse]
$creadList :: ReadS [DescribeMaintenanceWindowScheduleResponse]
readsPrec :: Int -> ReadS DescribeMaintenanceWindowScheduleResponse
$creadsPrec :: Int -> ReadS DescribeMaintenanceWindowScheduleResponse
Prelude.Read, Int -> DescribeMaintenanceWindowScheduleResponse -> ShowS
[DescribeMaintenanceWindowScheduleResponse] -> ShowS
DescribeMaintenanceWindowScheduleResponse -> String
(Int -> DescribeMaintenanceWindowScheduleResponse -> ShowS)
-> (DescribeMaintenanceWindowScheduleResponse -> String)
-> ([DescribeMaintenanceWindowScheduleResponse] -> ShowS)
-> Show DescribeMaintenanceWindowScheduleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMaintenanceWindowScheduleResponse] -> ShowS
$cshowList :: [DescribeMaintenanceWindowScheduleResponse] -> ShowS
show :: DescribeMaintenanceWindowScheduleResponse -> String
$cshow :: DescribeMaintenanceWindowScheduleResponse -> String
showsPrec :: Int -> DescribeMaintenanceWindowScheduleResponse -> ShowS
$cshowsPrec :: Int -> DescribeMaintenanceWindowScheduleResponse -> ShowS
Prelude.Show, (forall x.
 DescribeMaintenanceWindowScheduleResponse
 -> Rep DescribeMaintenanceWindowScheduleResponse x)
-> (forall x.
    Rep DescribeMaintenanceWindowScheduleResponse x
    -> DescribeMaintenanceWindowScheduleResponse)
-> Generic DescribeMaintenanceWindowScheduleResponse
forall x.
Rep DescribeMaintenanceWindowScheduleResponse x
-> DescribeMaintenanceWindowScheduleResponse
forall x.
DescribeMaintenanceWindowScheduleResponse
-> Rep DescribeMaintenanceWindowScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMaintenanceWindowScheduleResponse x
-> DescribeMaintenanceWindowScheduleResponse
$cfrom :: forall x.
DescribeMaintenanceWindowScheduleResponse
-> Rep DescribeMaintenanceWindowScheduleResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMaintenanceWindowScheduleResponse' 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:
--
-- 'scheduledWindowExecutions', 'describeMaintenanceWindowScheduleResponse_scheduledWindowExecutions' - Information about maintenance window executions scheduled for the
-- specified time range.
--
-- 'nextToken', 'describeMaintenanceWindowScheduleResponse_nextToken' - The token for the next set of items to return. (You use this token in
-- the next call.)
--
-- 'httpStatus', 'describeMaintenanceWindowScheduleResponse_httpStatus' - The response's http status code.
newDescribeMaintenanceWindowScheduleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeMaintenanceWindowScheduleResponse
newDescribeMaintenanceWindowScheduleResponse :: Int -> DescribeMaintenanceWindowScheduleResponse
newDescribeMaintenanceWindowScheduleResponse
  Int
pHttpStatus_ =
    DescribeMaintenanceWindowScheduleResponse' :: Maybe [ScheduledWindowExecution]
-> Maybe Text -> Int -> DescribeMaintenanceWindowScheduleResponse
DescribeMaintenanceWindowScheduleResponse'
      { $sel:scheduledWindowExecutions:DescribeMaintenanceWindowScheduleResponse' :: Maybe [ScheduledWindowExecution]
scheduledWindowExecutions =
          Maybe [ScheduledWindowExecution]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeMaintenanceWindowScheduleResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeMaintenanceWindowScheduleResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Information about maintenance window executions scheduled for the
-- specified time range.
describeMaintenanceWindowScheduleResponse_scheduledWindowExecutions :: Lens.Lens' DescribeMaintenanceWindowScheduleResponse (Prelude.Maybe [ScheduledWindowExecution])
describeMaintenanceWindowScheduleResponse_scheduledWindowExecutions :: (Maybe [ScheduledWindowExecution]
 -> f (Maybe [ScheduledWindowExecution]))
-> DescribeMaintenanceWindowScheduleResponse
-> f DescribeMaintenanceWindowScheduleResponse
describeMaintenanceWindowScheduleResponse_scheduledWindowExecutions = (DescribeMaintenanceWindowScheduleResponse
 -> Maybe [ScheduledWindowExecution])
-> (DescribeMaintenanceWindowScheduleResponse
    -> Maybe [ScheduledWindowExecution]
    -> DescribeMaintenanceWindowScheduleResponse)
-> Lens'
     DescribeMaintenanceWindowScheduleResponse
     (Maybe [ScheduledWindowExecution])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowScheduleResponse' {Maybe [ScheduledWindowExecution]
scheduledWindowExecutions :: Maybe [ScheduledWindowExecution]
$sel:scheduledWindowExecutions:DescribeMaintenanceWindowScheduleResponse' :: DescribeMaintenanceWindowScheduleResponse
-> Maybe [ScheduledWindowExecution]
scheduledWindowExecutions} -> Maybe [ScheduledWindowExecution]
scheduledWindowExecutions) (\s :: DescribeMaintenanceWindowScheduleResponse
s@DescribeMaintenanceWindowScheduleResponse' {} Maybe [ScheduledWindowExecution]
a -> DescribeMaintenanceWindowScheduleResponse
s {$sel:scheduledWindowExecutions:DescribeMaintenanceWindowScheduleResponse' :: Maybe [ScheduledWindowExecution]
scheduledWindowExecutions = Maybe [ScheduledWindowExecution]
a} :: DescribeMaintenanceWindowScheduleResponse) ((Maybe [ScheduledWindowExecution]
  -> f (Maybe [ScheduledWindowExecution]))
 -> DescribeMaintenanceWindowScheduleResponse
 -> f DescribeMaintenanceWindowScheduleResponse)
-> ((Maybe [ScheduledWindowExecution]
     -> f (Maybe [ScheduledWindowExecution]))
    -> Maybe [ScheduledWindowExecution]
    -> f (Maybe [ScheduledWindowExecution]))
-> (Maybe [ScheduledWindowExecution]
    -> f (Maybe [ScheduledWindowExecution]))
-> DescribeMaintenanceWindowScheduleResponse
-> f DescribeMaintenanceWindowScheduleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ScheduledWindowExecution]
  [ScheduledWindowExecution]
  [ScheduledWindowExecution]
  [ScheduledWindowExecution]
-> Iso
     (Maybe [ScheduledWindowExecution])
     (Maybe [ScheduledWindowExecution])
     (Maybe [ScheduledWindowExecution])
     (Maybe [ScheduledWindowExecution])
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
  [ScheduledWindowExecution]
  [ScheduledWindowExecution]
  [ScheduledWindowExecution]
  [ScheduledWindowExecution]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token for the next set of items to return. (You use this token in
-- the next call.)
describeMaintenanceWindowScheduleResponse_nextToken :: Lens.Lens' DescribeMaintenanceWindowScheduleResponse (Prelude.Maybe Prelude.Text)
describeMaintenanceWindowScheduleResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMaintenanceWindowScheduleResponse
-> f DescribeMaintenanceWindowScheduleResponse
describeMaintenanceWindowScheduleResponse_nextToken = (DescribeMaintenanceWindowScheduleResponse -> Maybe Text)
-> (DescribeMaintenanceWindowScheduleResponse
    -> Maybe Text -> DescribeMaintenanceWindowScheduleResponse)
-> Lens' DescribeMaintenanceWindowScheduleResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowScheduleResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMaintenanceWindowScheduleResponse' :: DescribeMaintenanceWindowScheduleResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMaintenanceWindowScheduleResponse
s@DescribeMaintenanceWindowScheduleResponse' {} Maybe Text
a -> DescribeMaintenanceWindowScheduleResponse
s {$sel:nextToken:DescribeMaintenanceWindowScheduleResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMaintenanceWindowScheduleResponse)

-- | The response's http status code.
describeMaintenanceWindowScheduleResponse_httpStatus :: Lens.Lens' DescribeMaintenanceWindowScheduleResponse Prelude.Int
describeMaintenanceWindowScheduleResponse_httpStatus :: (Int -> f Int)
-> DescribeMaintenanceWindowScheduleResponse
-> f DescribeMaintenanceWindowScheduleResponse
describeMaintenanceWindowScheduleResponse_httpStatus = (DescribeMaintenanceWindowScheduleResponse -> Int)
-> (DescribeMaintenanceWindowScheduleResponse
    -> Int -> DescribeMaintenanceWindowScheduleResponse)
-> Lens
     DescribeMaintenanceWindowScheduleResponse
     DescribeMaintenanceWindowScheduleResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowScheduleResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeMaintenanceWindowScheduleResponse' :: DescribeMaintenanceWindowScheduleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeMaintenanceWindowScheduleResponse
s@DescribeMaintenanceWindowScheduleResponse' {} Int
a -> DescribeMaintenanceWindowScheduleResponse
s {$sel:httpStatus:DescribeMaintenanceWindowScheduleResponse' :: Int
httpStatus = Int
a} :: DescribeMaintenanceWindowScheduleResponse)

instance
  Prelude.NFData
    DescribeMaintenanceWindowScheduleResponse