{-# 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 #-}
module Amazonka.SSM.DescribeMaintenanceWindowExecutions
(
DescribeMaintenanceWindowExecutions (..),
newDescribeMaintenanceWindowExecutions,
describeMaintenanceWindowExecutions_filters,
describeMaintenanceWindowExecutions_nextToken,
describeMaintenanceWindowExecutions_maxResults,
describeMaintenanceWindowExecutions_windowId,
DescribeMaintenanceWindowExecutionsResponse (..),
newDescribeMaintenanceWindowExecutionsResponse,
describeMaintenanceWindowExecutionsResponse_windowExecutions,
describeMaintenanceWindowExecutionsResponse_nextToken,
describeMaintenanceWindowExecutionsResponse_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
data DescribeMaintenanceWindowExecutions = DescribeMaintenanceWindowExecutions'
{
DescribeMaintenanceWindowExecutions
-> Maybe [MaintenanceWindowFilter]
filters :: Prelude.Maybe [MaintenanceWindowFilter],
DescribeMaintenanceWindowExecutions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeMaintenanceWindowExecutions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeMaintenanceWindowExecutions -> Text
windowId :: Prelude.Text
}
deriving (DescribeMaintenanceWindowExecutions
-> DescribeMaintenanceWindowExecutions -> Bool
(DescribeMaintenanceWindowExecutions
-> DescribeMaintenanceWindowExecutions -> Bool)
-> (DescribeMaintenanceWindowExecutions
-> DescribeMaintenanceWindowExecutions -> Bool)
-> Eq DescribeMaintenanceWindowExecutions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMaintenanceWindowExecutions
-> DescribeMaintenanceWindowExecutions -> Bool
$c/= :: DescribeMaintenanceWindowExecutions
-> DescribeMaintenanceWindowExecutions -> Bool
== :: DescribeMaintenanceWindowExecutions
-> DescribeMaintenanceWindowExecutions -> Bool
$c== :: DescribeMaintenanceWindowExecutions
-> DescribeMaintenanceWindowExecutions -> Bool
Prelude.Eq, ReadPrec [DescribeMaintenanceWindowExecutions]
ReadPrec DescribeMaintenanceWindowExecutions
Int -> ReadS DescribeMaintenanceWindowExecutions
ReadS [DescribeMaintenanceWindowExecutions]
(Int -> ReadS DescribeMaintenanceWindowExecutions)
-> ReadS [DescribeMaintenanceWindowExecutions]
-> ReadPrec DescribeMaintenanceWindowExecutions
-> ReadPrec [DescribeMaintenanceWindowExecutions]
-> Read DescribeMaintenanceWindowExecutions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMaintenanceWindowExecutions]
$creadListPrec :: ReadPrec [DescribeMaintenanceWindowExecutions]
readPrec :: ReadPrec DescribeMaintenanceWindowExecutions
$creadPrec :: ReadPrec DescribeMaintenanceWindowExecutions
readList :: ReadS [DescribeMaintenanceWindowExecutions]
$creadList :: ReadS [DescribeMaintenanceWindowExecutions]
readsPrec :: Int -> ReadS DescribeMaintenanceWindowExecutions
$creadsPrec :: Int -> ReadS DescribeMaintenanceWindowExecutions
Prelude.Read, Int -> DescribeMaintenanceWindowExecutions -> ShowS
[DescribeMaintenanceWindowExecutions] -> ShowS
DescribeMaintenanceWindowExecutions -> String
(Int -> DescribeMaintenanceWindowExecutions -> ShowS)
-> (DescribeMaintenanceWindowExecutions -> String)
-> ([DescribeMaintenanceWindowExecutions] -> ShowS)
-> Show DescribeMaintenanceWindowExecutions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMaintenanceWindowExecutions] -> ShowS
$cshowList :: [DescribeMaintenanceWindowExecutions] -> ShowS
show :: DescribeMaintenanceWindowExecutions -> String
$cshow :: DescribeMaintenanceWindowExecutions -> String
showsPrec :: Int -> DescribeMaintenanceWindowExecutions -> ShowS
$cshowsPrec :: Int -> DescribeMaintenanceWindowExecutions -> ShowS
Prelude.Show, (forall x.
DescribeMaintenanceWindowExecutions
-> Rep DescribeMaintenanceWindowExecutions x)
-> (forall x.
Rep DescribeMaintenanceWindowExecutions x
-> DescribeMaintenanceWindowExecutions)
-> Generic DescribeMaintenanceWindowExecutions
forall x.
Rep DescribeMaintenanceWindowExecutions x
-> DescribeMaintenanceWindowExecutions
forall x.
DescribeMaintenanceWindowExecutions
-> Rep DescribeMaintenanceWindowExecutions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMaintenanceWindowExecutions x
-> DescribeMaintenanceWindowExecutions
$cfrom :: forall x.
DescribeMaintenanceWindowExecutions
-> Rep DescribeMaintenanceWindowExecutions x
Prelude.Generic)
newDescribeMaintenanceWindowExecutions ::
Prelude.Text ->
DescribeMaintenanceWindowExecutions
newDescribeMaintenanceWindowExecutions :: Text -> DescribeMaintenanceWindowExecutions
newDescribeMaintenanceWindowExecutions Text
pWindowId_ =
DescribeMaintenanceWindowExecutions' :: Maybe [MaintenanceWindowFilter]
-> Maybe Text
-> Maybe Natural
-> Text
-> DescribeMaintenanceWindowExecutions
DescribeMaintenanceWindowExecutions'
{ $sel:filters:DescribeMaintenanceWindowExecutions' :: Maybe [MaintenanceWindowFilter]
filters =
Maybe [MaintenanceWindowFilter]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeMaintenanceWindowExecutions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeMaintenanceWindowExecutions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:windowId:DescribeMaintenanceWindowExecutions' :: Text
windowId = Text
pWindowId_
}
describeMaintenanceWindowExecutions_filters :: Lens.Lens' DescribeMaintenanceWindowExecutions (Prelude.Maybe [MaintenanceWindowFilter])
describeMaintenanceWindowExecutions_filters :: (Maybe [MaintenanceWindowFilter]
-> f (Maybe [MaintenanceWindowFilter]))
-> DescribeMaintenanceWindowExecutions
-> f DescribeMaintenanceWindowExecutions
describeMaintenanceWindowExecutions_filters = (DescribeMaintenanceWindowExecutions
-> Maybe [MaintenanceWindowFilter])
-> (DescribeMaintenanceWindowExecutions
-> Maybe [MaintenanceWindowFilter]
-> DescribeMaintenanceWindowExecutions)
-> Lens
DescribeMaintenanceWindowExecutions
DescribeMaintenanceWindowExecutions
(Maybe [MaintenanceWindowFilter])
(Maybe [MaintenanceWindowFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowExecutions' {Maybe [MaintenanceWindowFilter]
filters :: Maybe [MaintenanceWindowFilter]
$sel:filters:DescribeMaintenanceWindowExecutions' :: DescribeMaintenanceWindowExecutions
-> Maybe [MaintenanceWindowFilter]
filters} -> Maybe [MaintenanceWindowFilter]
filters) (\s :: DescribeMaintenanceWindowExecutions
s@DescribeMaintenanceWindowExecutions' {} Maybe [MaintenanceWindowFilter]
a -> DescribeMaintenanceWindowExecutions
s {$sel:filters:DescribeMaintenanceWindowExecutions' :: Maybe [MaintenanceWindowFilter]
filters = Maybe [MaintenanceWindowFilter]
a} :: DescribeMaintenanceWindowExecutions) ((Maybe [MaintenanceWindowFilter]
-> f (Maybe [MaintenanceWindowFilter]))
-> DescribeMaintenanceWindowExecutions
-> f DescribeMaintenanceWindowExecutions)
-> ((Maybe [MaintenanceWindowFilter]
-> f (Maybe [MaintenanceWindowFilter]))
-> Maybe [MaintenanceWindowFilter]
-> f (Maybe [MaintenanceWindowFilter]))
-> (Maybe [MaintenanceWindowFilter]
-> f (Maybe [MaintenanceWindowFilter]))
-> DescribeMaintenanceWindowExecutions
-> f DescribeMaintenanceWindowExecutions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[MaintenanceWindowFilter]
[MaintenanceWindowFilter]
[MaintenanceWindowFilter]
[MaintenanceWindowFilter]
-> Iso
(Maybe [MaintenanceWindowFilter])
(Maybe [MaintenanceWindowFilter])
(Maybe [MaintenanceWindowFilter])
(Maybe [MaintenanceWindowFilter])
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
[MaintenanceWindowFilter]
[MaintenanceWindowFilter]
[MaintenanceWindowFilter]
[MaintenanceWindowFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeMaintenanceWindowExecutions_nextToken :: Lens.Lens' DescribeMaintenanceWindowExecutions (Prelude.Maybe Prelude.Text)
describeMaintenanceWindowExecutions_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMaintenanceWindowExecutions
-> f DescribeMaintenanceWindowExecutions
describeMaintenanceWindowExecutions_nextToken = (DescribeMaintenanceWindowExecutions -> Maybe Text)
-> (DescribeMaintenanceWindowExecutions
-> Maybe Text -> DescribeMaintenanceWindowExecutions)
-> Lens
DescribeMaintenanceWindowExecutions
DescribeMaintenanceWindowExecutions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowExecutions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMaintenanceWindowExecutions' :: DescribeMaintenanceWindowExecutions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMaintenanceWindowExecutions
s@DescribeMaintenanceWindowExecutions' {} Maybe Text
a -> DescribeMaintenanceWindowExecutions
s {$sel:nextToken:DescribeMaintenanceWindowExecutions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMaintenanceWindowExecutions)
describeMaintenanceWindowExecutions_maxResults :: Lens.Lens' DescribeMaintenanceWindowExecutions (Prelude.Maybe Prelude.Natural)
describeMaintenanceWindowExecutions_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeMaintenanceWindowExecutions
-> f DescribeMaintenanceWindowExecutions
describeMaintenanceWindowExecutions_maxResults = (DescribeMaintenanceWindowExecutions -> Maybe Natural)
-> (DescribeMaintenanceWindowExecutions
-> Maybe Natural -> DescribeMaintenanceWindowExecutions)
-> Lens
DescribeMaintenanceWindowExecutions
DescribeMaintenanceWindowExecutions
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowExecutions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeMaintenanceWindowExecutions' :: DescribeMaintenanceWindowExecutions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeMaintenanceWindowExecutions
s@DescribeMaintenanceWindowExecutions' {} Maybe Natural
a -> DescribeMaintenanceWindowExecutions
s {$sel:maxResults:DescribeMaintenanceWindowExecutions' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeMaintenanceWindowExecutions)
describeMaintenanceWindowExecutions_windowId :: Lens.Lens' DescribeMaintenanceWindowExecutions Prelude.Text
describeMaintenanceWindowExecutions_windowId :: (Text -> f Text)
-> DescribeMaintenanceWindowExecutions
-> f DescribeMaintenanceWindowExecutions
describeMaintenanceWindowExecutions_windowId = (DescribeMaintenanceWindowExecutions -> Text)
-> (DescribeMaintenanceWindowExecutions
-> Text -> DescribeMaintenanceWindowExecutions)
-> Lens
DescribeMaintenanceWindowExecutions
DescribeMaintenanceWindowExecutions
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowExecutions' {Text
windowId :: Text
$sel:windowId:DescribeMaintenanceWindowExecutions' :: DescribeMaintenanceWindowExecutions -> Text
windowId} -> Text
windowId) (\s :: DescribeMaintenanceWindowExecutions
s@DescribeMaintenanceWindowExecutions' {} Text
a -> DescribeMaintenanceWindowExecutions
s {$sel:windowId:DescribeMaintenanceWindowExecutions' :: Text
windowId = Text
a} :: DescribeMaintenanceWindowExecutions)
instance
Core.AWSPager
DescribeMaintenanceWindowExecutions
where
page :: DescribeMaintenanceWindowExecutions
-> AWSResponse DescribeMaintenanceWindowExecutions
-> Maybe DescribeMaintenanceWindowExecutions
page DescribeMaintenanceWindowExecutions
rq AWSResponse DescribeMaintenanceWindowExecutions
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeMaintenanceWindowExecutions
DescribeMaintenanceWindowExecutionsResponse
rs
DescribeMaintenanceWindowExecutionsResponse
-> Getting
(First Text) DescribeMaintenanceWindowExecutionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMaintenanceWindowExecutionsResponse
-> Const (First Text) DescribeMaintenanceWindowExecutionsResponse
Lens' DescribeMaintenanceWindowExecutionsResponse (Maybe Text)
describeMaintenanceWindowExecutionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMaintenanceWindowExecutionsResponse
-> Const (First Text) DescribeMaintenanceWindowExecutionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) DescribeMaintenanceWindowExecutionsResponse 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 DescribeMaintenanceWindowExecutions
forall a. Maybe a
Prelude.Nothing
| Maybe [MaintenanceWindowExecution] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeMaintenanceWindowExecutions
DescribeMaintenanceWindowExecutionsResponse
rs
DescribeMaintenanceWindowExecutionsResponse
-> Getting
(First [MaintenanceWindowExecution])
DescribeMaintenanceWindowExecutionsResponse
[MaintenanceWindowExecution]
-> Maybe [MaintenanceWindowExecution]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [MaintenanceWindowExecution]
-> Const
(First [MaintenanceWindowExecution])
(Maybe [MaintenanceWindowExecution]))
-> DescribeMaintenanceWindowExecutionsResponse
-> Const
(First [MaintenanceWindowExecution])
DescribeMaintenanceWindowExecutionsResponse
Lens'
DescribeMaintenanceWindowExecutionsResponse
(Maybe [MaintenanceWindowExecution])
describeMaintenanceWindowExecutionsResponse_windowExecutions
((Maybe [MaintenanceWindowExecution]
-> Const
(First [MaintenanceWindowExecution])
(Maybe [MaintenanceWindowExecution]))
-> DescribeMaintenanceWindowExecutionsResponse
-> Const
(First [MaintenanceWindowExecution])
DescribeMaintenanceWindowExecutionsResponse)
-> (([MaintenanceWindowExecution]
-> Const
(First [MaintenanceWindowExecution]) [MaintenanceWindowExecution])
-> Maybe [MaintenanceWindowExecution]
-> Const
(First [MaintenanceWindowExecution])
(Maybe [MaintenanceWindowExecution]))
-> Getting
(First [MaintenanceWindowExecution])
DescribeMaintenanceWindowExecutionsResponse
[MaintenanceWindowExecution]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MaintenanceWindowExecution]
-> Const
(First [MaintenanceWindowExecution]) [MaintenanceWindowExecution])
-> Maybe [MaintenanceWindowExecution]
-> Const
(First [MaintenanceWindowExecution])
(Maybe [MaintenanceWindowExecution])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeMaintenanceWindowExecutions
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeMaintenanceWindowExecutions
-> Maybe DescribeMaintenanceWindowExecutions
forall a. a -> Maybe a
Prelude.Just (DescribeMaintenanceWindowExecutions
-> Maybe DescribeMaintenanceWindowExecutions)
-> DescribeMaintenanceWindowExecutions
-> Maybe DescribeMaintenanceWindowExecutions
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeMaintenanceWindowExecutions
rq
DescribeMaintenanceWindowExecutions
-> (DescribeMaintenanceWindowExecutions
-> DescribeMaintenanceWindowExecutions)
-> DescribeMaintenanceWindowExecutions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeMaintenanceWindowExecutions
-> Identity DescribeMaintenanceWindowExecutions
Lens
DescribeMaintenanceWindowExecutions
DescribeMaintenanceWindowExecutions
(Maybe Text)
(Maybe Text)
describeMaintenanceWindowExecutions_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeMaintenanceWindowExecutions
-> Identity DescribeMaintenanceWindowExecutions)
-> Maybe Text
-> DescribeMaintenanceWindowExecutions
-> DescribeMaintenanceWindowExecutions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeMaintenanceWindowExecutions
DescribeMaintenanceWindowExecutionsResponse
rs
DescribeMaintenanceWindowExecutionsResponse
-> Getting
(First Text) DescribeMaintenanceWindowExecutionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMaintenanceWindowExecutionsResponse
-> Const (First Text) DescribeMaintenanceWindowExecutionsResponse
Lens' DescribeMaintenanceWindowExecutionsResponse (Maybe Text)
describeMaintenanceWindowExecutionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMaintenanceWindowExecutionsResponse
-> Const (First Text) DescribeMaintenanceWindowExecutionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) DescribeMaintenanceWindowExecutionsResponse 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
DescribeMaintenanceWindowExecutions
where
type
AWSResponse DescribeMaintenanceWindowExecutions =
DescribeMaintenanceWindowExecutionsResponse
request :: DescribeMaintenanceWindowExecutions
-> Request DescribeMaintenanceWindowExecutions
request = Service
-> DescribeMaintenanceWindowExecutions
-> Request DescribeMaintenanceWindowExecutions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeMaintenanceWindowExecutions
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeMaintenanceWindowExecutions)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeMaintenanceWindowExecutions))
-> Logger
-> Service
-> Proxy DescribeMaintenanceWindowExecutions
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeMaintenanceWindowExecutions)))
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 [MaintenanceWindowExecution]
-> Maybe Text -> Int -> DescribeMaintenanceWindowExecutionsResponse
DescribeMaintenanceWindowExecutionsResponse'
(Maybe [MaintenanceWindowExecution]
-> Maybe Text
-> Int
-> DescribeMaintenanceWindowExecutionsResponse)
-> Either String (Maybe [MaintenanceWindowExecution])
-> Either
String
(Maybe Text -> Int -> DescribeMaintenanceWindowExecutionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [MaintenanceWindowExecution]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"WindowExecutions"
Either String (Maybe (Maybe [MaintenanceWindowExecution]))
-> Maybe [MaintenanceWindowExecution]
-> Either String (Maybe [MaintenanceWindowExecution])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MaintenanceWindowExecution]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Maybe Text -> Int -> DescribeMaintenanceWindowExecutionsResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> DescribeMaintenanceWindowExecutionsResponse)
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 -> DescribeMaintenanceWindowExecutionsResponse)
-> Either String Int
-> Either String DescribeMaintenanceWindowExecutionsResponse
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
DescribeMaintenanceWindowExecutions
instance
Prelude.NFData
DescribeMaintenanceWindowExecutions
instance
Core.ToHeaders
DescribeMaintenanceWindowExecutions
where
toHeaders :: DescribeMaintenanceWindowExecutions -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DescribeMaintenanceWindowExecutions -> 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.DescribeMaintenanceWindowExecutions" ::
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
DescribeMaintenanceWindowExecutions
where
toJSON :: DescribeMaintenanceWindowExecutions -> Value
toJSON DescribeMaintenanceWindowExecutions' {Maybe Natural
Maybe [MaintenanceWindowFilter]
Maybe Text
Text
windowId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe [MaintenanceWindowFilter]
$sel:windowId:DescribeMaintenanceWindowExecutions' :: DescribeMaintenanceWindowExecutions -> Text
$sel:maxResults:DescribeMaintenanceWindowExecutions' :: DescribeMaintenanceWindowExecutions -> Maybe Natural
$sel:nextToken:DescribeMaintenanceWindowExecutions' :: DescribeMaintenanceWindowExecutions -> Maybe Text
$sel:filters:DescribeMaintenanceWindowExecutions' :: DescribeMaintenanceWindowExecutions
-> Maybe [MaintenanceWindowFilter]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Filters" Text -> [MaintenanceWindowFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([MaintenanceWindowFilter] -> Pair)
-> Maybe [MaintenanceWindowFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MaintenanceWindowFilter]
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
"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,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WindowId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
windowId)
]
)
instance
Core.ToPath
DescribeMaintenanceWindowExecutions
where
toPath :: DescribeMaintenanceWindowExecutions -> ByteString
toPath = ByteString -> DescribeMaintenanceWindowExecutions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DescribeMaintenanceWindowExecutions
where
toQuery :: DescribeMaintenanceWindowExecutions -> QueryString
toQuery = QueryString -> DescribeMaintenanceWindowExecutions -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeMaintenanceWindowExecutionsResponse = DescribeMaintenanceWindowExecutionsResponse'
{
DescribeMaintenanceWindowExecutionsResponse
-> Maybe [MaintenanceWindowExecution]
windowExecutions :: Prelude.Maybe [MaintenanceWindowExecution],
DescribeMaintenanceWindowExecutionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeMaintenanceWindowExecutionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeMaintenanceWindowExecutionsResponse
-> DescribeMaintenanceWindowExecutionsResponse -> Bool
(DescribeMaintenanceWindowExecutionsResponse
-> DescribeMaintenanceWindowExecutionsResponse -> Bool)
-> (DescribeMaintenanceWindowExecutionsResponse
-> DescribeMaintenanceWindowExecutionsResponse -> Bool)
-> Eq DescribeMaintenanceWindowExecutionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMaintenanceWindowExecutionsResponse
-> DescribeMaintenanceWindowExecutionsResponse -> Bool
$c/= :: DescribeMaintenanceWindowExecutionsResponse
-> DescribeMaintenanceWindowExecutionsResponse -> Bool
== :: DescribeMaintenanceWindowExecutionsResponse
-> DescribeMaintenanceWindowExecutionsResponse -> Bool
$c== :: DescribeMaintenanceWindowExecutionsResponse
-> DescribeMaintenanceWindowExecutionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeMaintenanceWindowExecutionsResponse]
ReadPrec DescribeMaintenanceWindowExecutionsResponse
Int -> ReadS DescribeMaintenanceWindowExecutionsResponse
ReadS [DescribeMaintenanceWindowExecutionsResponse]
(Int -> ReadS DescribeMaintenanceWindowExecutionsResponse)
-> ReadS [DescribeMaintenanceWindowExecutionsResponse]
-> ReadPrec DescribeMaintenanceWindowExecutionsResponse
-> ReadPrec [DescribeMaintenanceWindowExecutionsResponse]
-> Read DescribeMaintenanceWindowExecutionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMaintenanceWindowExecutionsResponse]
$creadListPrec :: ReadPrec [DescribeMaintenanceWindowExecutionsResponse]
readPrec :: ReadPrec DescribeMaintenanceWindowExecutionsResponse
$creadPrec :: ReadPrec DescribeMaintenanceWindowExecutionsResponse
readList :: ReadS [DescribeMaintenanceWindowExecutionsResponse]
$creadList :: ReadS [DescribeMaintenanceWindowExecutionsResponse]
readsPrec :: Int -> ReadS DescribeMaintenanceWindowExecutionsResponse
$creadsPrec :: Int -> ReadS DescribeMaintenanceWindowExecutionsResponse
Prelude.Read, Int -> DescribeMaintenanceWindowExecutionsResponse -> ShowS
[DescribeMaintenanceWindowExecutionsResponse] -> ShowS
DescribeMaintenanceWindowExecutionsResponse -> String
(Int -> DescribeMaintenanceWindowExecutionsResponse -> ShowS)
-> (DescribeMaintenanceWindowExecutionsResponse -> String)
-> ([DescribeMaintenanceWindowExecutionsResponse] -> ShowS)
-> Show DescribeMaintenanceWindowExecutionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMaintenanceWindowExecutionsResponse] -> ShowS
$cshowList :: [DescribeMaintenanceWindowExecutionsResponse] -> ShowS
show :: DescribeMaintenanceWindowExecutionsResponse -> String
$cshow :: DescribeMaintenanceWindowExecutionsResponse -> String
showsPrec :: Int -> DescribeMaintenanceWindowExecutionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeMaintenanceWindowExecutionsResponse -> ShowS
Prelude.Show, (forall x.
DescribeMaintenanceWindowExecutionsResponse
-> Rep DescribeMaintenanceWindowExecutionsResponse x)
-> (forall x.
Rep DescribeMaintenanceWindowExecutionsResponse x
-> DescribeMaintenanceWindowExecutionsResponse)
-> Generic DescribeMaintenanceWindowExecutionsResponse
forall x.
Rep DescribeMaintenanceWindowExecutionsResponse x
-> DescribeMaintenanceWindowExecutionsResponse
forall x.
DescribeMaintenanceWindowExecutionsResponse
-> Rep DescribeMaintenanceWindowExecutionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMaintenanceWindowExecutionsResponse x
-> DescribeMaintenanceWindowExecutionsResponse
$cfrom :: forall x.
DescribeMaintenanceWindowExecutionsResponse
-> Rep DescribeMaintenanceWindowExecutionsResponse x
Prelude.Generic)
newDescribeMaintenanceWindowExecutionsResponse ::
Prelude.Int ->
DescribeMaintenanceWindowExecutionsResponse
newDescribeMaintenanceWindowExecutionsResponse :: Int -> DescribeMaintenanceWindowExecutionsResponse
newDescribeMaintenanceWindowExecutionsResponse
Int
pHttpStatus_ =
DescribeMaintenanceWindowExecutionsResponse' :: Maybe [MaintenanceWindowExecution]
-> Maybe Text -> Int -> DescribeMaintenanceWindowExecutionsResponse
DescribeMaintenanceWindowExecutionsResponse'
{ $sel:windowExecutions:DescribeMaintenanceWindowExecutionsResponse' :: Maybe [MaintenanceWindowExecution]
windowExecutions =
Maybe [MaintenanceWindowExecution]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeMaintenanceWindowExecutionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeMaintenanceWindowExecutionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeMaintenanceWindowExecutionsResponse_windowExecutions :: Lens.Lens' DescribeMaintenanceWindowExecutionsResponse (Prelude.Maybe [MaintenanceWindowExecution])
describeMaintenanceWindowExecutionsResponse_windowExecutions :: (Maybe [MaintenanceWindowExecution]
-> f (Maybe [MaintenanceWindowExecution]))
-> DescribeMaintenanceWindowExecutionsResponse
-> f DescribeMaintenanceWindowExecutionsResponse
describeMaintenanceWindowExecutionsResponse_windowExecutions = (DescribeMaintenanceWindowExecutionsResponse
-> Maybe [MaintenanceWindowExecution])
-> (DescribeMaintenanceWindowExecutionsResponse
-> Maybe [MaintenanceWindowExecution]
-> DescribeMaintenanceWindowExecutionsResponse)
-> Lens'
DescribeMaintenanceWindowExecutionsResponse
(Maybe [MaintenanceWindowExecution])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowExecutionsResponse' {Maybe [MaintenanceWindowExecution]
windowExecutions :: Maybe [MaintenanceWindowExecution]
$sel:windowExecutions:DescribeMaintenanceWindowExecutionsResponse' :: DescribeMaintenanceWindowExecutionsResponse
-> Maybe [MaintenanceWindowExecution]
windowExecutions} -> Maybe [MaintenanceWindowExecution]
windowExecutions) (\s :: DescribeMaintenanceWindowExecutionsResponse
s@DescribeMaintenanceWindowExecutionsResponse' {} Maybe [MaintenanceWindowExecution]
a -> DescribeMaintenanceWindowExecutionsResponse
s {$sel:windowExecutions:DescribeMaintenanceWindowExecutionsResponse' :: Maybe [MaintenanceWindowExecution]
windowExecutions = Maybe [MaintenanceWindowExecution]
a} :: DescribeMaintenanceWindowExecutionsResponse) ((Maybe [MaintenanceWindowExecution]
-> f (Maybe [MaintenanceWindowExecution]))
-> DescribeMaintenanceWindowExecutionsResponse
-> f DescribeMaintenanceWindowExecutionsResponse)
-> ((Maybe [MaintenanceWindowExecution]
-> f (Maybe [MaintenanceWindowExecution]))
-> Maybe [MaintenanceWindowExecution]
-> f (Maybe [MaintenanceWindowExecution]))
-> (Maybe [MaintenanceWindowExecution]
-> f (Maybe [MaintenanceWindowExecution]))
-> DescribeMaintenanceWindowExecutionsResponse
-> f DescribeMaintenanceWindowExecutionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[MaintenanceWindowExecution]
[MaintenanceWindowExecution]
[MaintenanceWindowExecution]
[MaintenanceWindowExecution]
-> Iso
(Maybe [MaintenanceWindowExecution])
(Maybe [MaintenanceWindowExecution])
(Maybe [MaintenanceWindowExecution])
(Maybe [MaintenanceWindowExecution])
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
[MaintenanceWindowExecution]
[MaintenanceWindowExecution]
[MaintenanceWindowExecution]
[MaintenanceWindowExecution]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeMaintenanceWindowExecutionsResponse_nextToken :: Lens.Lens' DescribeMaintenanceWindowExecutionsResponse (Prelude.Maybe Prelude.Text)
describeMaintenanceWindowExecutionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMaintenanceWindowExecutionsResponse
-> f DescribeMaintenanceWindowExecutionsResponse
describeMaintenanceWindowExecutionsResponse_nextToken = (DescribeMaintenanceWindowExecutionsResponse -> Maybe Text)
-> (DescribeMaintenanceWindowExecutionsResponse
-> Maybe Text -> DescribeMaintenanceWindowExecutionsResponse)
-> Lens' DescribeMaintenanceWindowExecutionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowExecutionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMaintenanceWindowExecutionsResponse' :: DescribeMaintenanceWindowExecutionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMaintenanceWindowExecutionsResponse
s@DescribeMaintenanceWindowExecutionsResponse' {} Maybe Text
a -> DescribeMaintenanceWindowExecutionsResponse
s {$sel:nextToken:DescribeMaintenanceWindowExecutionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMaintenanceWindowExecutionsResponse)
describeMaintenanceWindowExecutionsResponse_httpStatus :: Lens.Lens' DescribeMaintenanceWindowExecutionsResponse Prelude.Int
describeMaintenanceWindowExecutionsResponse_httpStatus :: (Int -> f Int)
-> DescribeMaintenanceWindowExecutionsResponse
-> f DescribeMaintenanceWindowExecutionsResponse
describeMaintenanceWindowExecutionsResponse_httpStatus = (DescribeMaintenanceWindowExecutionsResponse -> Int)
-> (DescribeMaintenanceWindowExecutionsResponse
-> Int -> DescribeMaintenanceWindowExecutionsResponse)
-> Lens
DescribeMaintenanceWindowExecutionsResponse
DescribeMaintenanceWindowExecutionsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowExecutionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeMaintenanceWindowExecutionsResponse' :: DescribeMaintenanceWindowExecutionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeMaintenanceWindowExecutionsResponse
s@DescribeMaintenanceWindowExecutionsResponse' {} Int
a -> DescribeMaintenanceWindowExecutionsResponse
s {$sel:httpStatus:DescribeMaintenanceWindowExecutionsResponse' :: Int
httpStatus = Int
a} :: DescribeMaintenanceWindowExecutionsResponse)
instance
Prelude.NFData
DescribeMaintenanceWindowExecutionsResponse