{-# 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.DescribeMaintenanceWindowTasks
(
DescribeMaintenanceWindowTasks (..),
newDescribeMaintenanceWindowTasks,
describeMaintenanceWindowTasks_filters,
describeMaintenanceWindowTasks_nextToken,
describeMaintenanceWindowTasks_maxResults,
describeMaintenanceWindowTasks_windowId,
DescribeMaintenanceWindowTasksResponse (..),
newDescribeMaintenanceWindowTasksResponse,
describeMaintenanceWindowTasksResponse_tasks,
describeMaintenanceWindowTasksResponse_nextToken,
describeMaintenanceWindowTasksResponse_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 DescribeMaintenanceWindowTasks = DescribeMaintenanceWindowTasks'
{
DescribeMaintenanceWindowTasks -> Maybe [MaintenanceWindowFilter]
filters :: Prelude.Maybe [MaintenanceWindowFilter],
DescribeMaintenanceWindowTasks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeMaintenanceWindowTasks -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeMaintenanceWindowTasks -> Text
windowId :: Prelude.Text
}
deriving (DescribeMaintenanceWindowTasks
-> DescribeMaintenanceWindowTasks -> Bool
(DescribeMaintenanceWindowTasks
-> DescribeMaintenanceWindowTasks -> Bool)
-> (DescribeMaintenanceWindowTasks
-> DescribeMaintenanceWindowTasks -> Bool)
-> Eq DescribeMaintenanceWindowTasks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMaintenanceWindowTasks
-> DescribeMaintenanceWindowTasks -> Bool
$c/= :: DescribeMaintenanceWindowTasks
-> DescribeMaintenanceWindowTasks -> Bool
== :: DescribeMaintenanceWindowTasks
-> DescribeMaintenanceWindowTasks -> Bool
$c== :: DescribeMaintenanceWindowTasks
-> DescribeMaintenanceWindowTasks -> Bool
Prelude.Eq, ReadPrec [DescribeMaintenanceWindowTasks]
ReadPrec DescribeMaintenanceWindowTasks
Int -> ReadS DescribeMaintenanceWindowTasks
ReadS [DescribeMaintenanceWindowTasks]
(Int -> ReadS DescribeMaintenanceWindowTasks)
-> ReadS [DescribeMaintenanceWindowTasks]
-> ReadPrec DescribeMaintenanceWindowTasks
-> ReadPrec [DescribeMaintenanceWindowTasks]
-> Read DescribeMaintenanceWindowTasks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMaintenanceWindowTasks]
$creadListPrec :: ReadPrec [DescribeMaintenanceWindowTasks]
readPrec :: ReadPrec DescribeMaintenanceWindowTasks
$creadPrec :: ReadPrec DescribeMaintenanceWindowTasks
readList :: ReadS [DescribeMaintenanceWindowTasks]
$creadList :: ReadS [DescribeMaintenanceWindowTasks]
readsPrec :: Int -> ReadS DescribeMaintenanceWindowTasks
$creadsPrec :: Int -> ReadS DescribeMaintenanceWindowTasks
Prelude.Read, Int -> DescribeMaintenanceWindowTasks -> ShowS
[DescribeMaintenanceWindowTasks] -> ShowS
DescribeMaintenanceWindowTasks -> String
(Int -> DescribeMaintenanceWindowTasks -> ShowS)
-> (DescribeMaintenanceWindowTasks -> String)
-> ([DescribeMaintenanceWindowTasks] -> ShowS)
-> Show DescribeMaintenanceWindowTasks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMaintenanceWindowTasks] -> ShowS
$cshowList :: [DescribeMaintenanceWindowTasks] -> ShowS
show :: DescribeMaintenanceWindowTasks -> String
$cshow :: DescribeMaintenanceWindowTasks -> String
showsPrec :: Int -> DescribeMaintenanceWindowTasks -> ShowS
$cshowsPrec :: Int -> DescribeMaintenanceWindowTasks -> ShowS
Prelude.Show, (forall x.
DescribeMaintenanceWindowTasks
-> Rep DescribeMaintenanceWindowTasks x)
-> (forall x.
Rep DescribeMaintenanceWindowTasks x
-> DescribeMaintenanceWindowTasks)
-> Generic DescribeMaintenanceWindowTasks
forall x.
Rep DescribeMaintenanceWindowTasks x
-> DescribeMaintenanceWindowTasks
forall x.
DescribeMaintenanceWindowTasks
-> Rep DescribeMaintenanceWindowTasks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMaintenanceWindowTasks x
-> DescribeMaintenanceWindowTasks
$cfrom :: forall x.
DescribeMaintenanceWindowTasks
-> Rep DescribeMaintenanceWindowTasks x
Prelude.Generic)
newDescribeMaintenanceWindowTasks ::
Prelude.Text ->
DescribeMaintenanceWindowTasks
newDescribeMaintenanceWindowTasks :: Text -> DescribeMaintenanceWindowTasks
newDescribeMaintenanceWindowTasks Text
pWindowId_ =
DescribeMaintenanceWindowTasks' :: Maybe [MaintenanceWindowFilter]
-> Maybe Text
-> Maybe Natural
-> Text
-> DescribeMaintenanceWindowTasks
DescribeMaintenanceWindowTasks'
{ $sel:filters:DescribeMaintenanceWindowTasks' :: Maybe [MaintenanceWindowFilter]
filters =
Maybe [MaintenanceWindowFilter]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeMaintenanceWindowTasks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeMaintenanceWindowTasks' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:windowId:DescribeMaintenanceWindowTasks' :: Text
windowId = Text
pWindowId_
}
describeMaintenanceWindowTasks_filters :: Lens.Lens' DescribeMaintenanceWindowTasks (Prelude.Maybe [MaintenanceWindowFilter])
describeMaintenanceWindowTasks_filters :: (Maybe [MaintenanceWindowFilter]
-> f (Maybe [MaintenanceWindowFilter]))
-> DescribeMaintenanceWindowTasks
-> f DescribeMaintenanceWindowTasks
describeMaintenanceWindowTasks_filters = (DescribeMaintenanceWindowTasks -> Maybe [MaintenanceWindowFilter])
-> (DescribeMaintenanceWindowTasks
-> Maybe [MaintenanceWindowFilter]
-> DescribeMaintenanceWindowTasks)
-> Lens
DescribeMaintenanceWindowTasks
DescribeMaintenanceWindowTasks
(Maybe [MaintenanceWindowFilter])
(Maybe [MaintenanceWindowFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowTasks' {Maybe [MaintenanceWindowFilter]
filters :: Maybe [MaintenanceWindowFilter]
$sel:filters:DescribeMaintenanceWindowTasks' :: DescribeMaintenanceWindowTasks -> Maybe [MaintenanceWindowFilter]
filters} -> Maybe [MaintenanceWindowFilter]
filters) (\s :: DescribeMaintenanceWindowTasks
s@DescribeMaintenanceWindowTasks' {} Maybe [MaintenanceWindowFilter]
a -> DescribeMaintenanceWindowTasks
s {$sel:filters:DescribeMaintenanceWindowTasks' :: Maybe [MaintenanceWindowFilter]
filters = Maybe [MaintenanceWindowFilter]
a} :: DescribeMaintenanceWindowTasks) ((Maybe [MaintenanceWindowFilter]
-> f (Maybe [MaintenanceWindowFilter]))
-> DescribeMaintenanceWindowTasks
-> f DescribeMaintenanceWindowTasks)
-> ((Maybe [MaintenanceWindowFilter]
-> f (Maybe [MaintenanceWindowFilter]))
-> Maybe [MaintenanceWindowFilter]
-> f (Maybe [MaintenanceWindowFilter]))
-> (Maybe [MaintenanceWindowFilter]
-> f (Maybe [MaintenanceWindowFilter]))
-> DescribeMaintenanceWindowTasks
-> f DescribeMaintenanceWindowTasks
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
describeMaintenanceWindowTasks_nextToken :: Lens.Lens' DescribeMaintenanceWindowTasks (Prelude.Maybe Prelude.Text)
describeMaintenanceWindowTasks_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMaintenanceWindowTasks
-> f DescribeMaintenanceWindowTasks
describeMaintenanceWindowTasks_nextToken = (DescribeMaintenanceWindowTasks -> Maybe Text)
-> (DescribeMaintenanceWindowTasks
-> Maybe Text -> DescribeMaintenanceWindowTasks)
-> Lens
DescribeMaintenanceWindowTasks
DescribeMaintenanceWindowTasks
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowTasks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMaintenanceWindowTasks' :: DescribeMaintenanceWindowTasks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMaintenanceWindowTasks
s@DescribeMaintenanceWindowTasks' {} Maybe Text
a -> DescribeMaintenanceWindowTasks
s {$sel:nextToken:DescribeMaintenanceWindowTasks' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMaintenanceWindowTasks)
describeMaintenanceWindowTasks_maxResults :: Lens.Lens' DescribeMaintenanceWindowTasks (Prelude.Maybe Prelude.Natural)
describeMaintenanceWindowTasks_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeMaintenanceWindowTasks
-> f DescribeMaintenanceWindowTasks
describeMaintenanceWindowTasks_maxResults = (DescribeMaintenanceWindowTasks -> Maybe Natural)
-> (DescribeMaintenanceWindowTasks
-> Maybe Natural -> DescribeMaintenanceWindowTasks)
-> Lens
DescribeMaintenanceWindowTasks
DescribeMaintenanceWindowTasks
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowTasks' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeMaintenanceWindowTasks' :: DescribeMaintenanceWindowTasks -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeMaintenanceWindowTasks
s@DescribeMaintenanceWindowTasks' {} Maybe Natural
a -> DescribeMaintenanceWindowTasks
s {$sel:maxResults:DescribeMaintenanceWindowTasks' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeMaintenanceWindowTasks)
describeMaintenanceWindowTasks_windowId :: Lens.Lens' DescribeMaintenanceWindowTasks Prelude.Text
describeMaintenanceWindowTasks_windowId :: (Text -> f Text)
-> DescribeMaintenanceWindowTasks
-> f DescribeMaintenanceWindowTasks
describeMaintenanceWindowTasks_windowId = (DescribeMaintenanceWindowTasks -> Text)
-> (DescribeMaintenanceWindowTasks
-> Text -> DescribeMaintenanceWindowTasks)
-> Lens
DescribeMaintenanceWindowTasks
DescribeMaintenanceWindowTasks
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowTasks' {Text
windowId :: Text
$sel:windowId:DescribeMaintenanceWindowTasks' :: DescribeMaintenanceWindowTasks -> Text
windowId} -> Text
windowId) (\s :: DescribeMaintenanceWindowTasks
s@DescribeMaintenanceWindowTasks' {} Text
a -> DescribeMaintenanceWindowTasks
s {$sel:windowId:DescribeMaintenanceWindowTasks' :: Text
windowId = Text
a} :: DescribeMaintenanceWindowTasks)
instance Core.AWSPager DescribeMaintenanceWindowTasks where
page :: DescribeMaintenanceWindowTasks
-> AWSResponse DescribeMaintenanceWindowTasks
-> Maybe DescribeMaintenanceWindowTasks
page DescribeMaintenanceWindowTasks
rq AWSResponse DescribeMaintenanceWindowTasks
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeMaintenanceWindowTasks
DescribeMaintenanceWindowTasksResponse
rs
DescribeMaintenanceWindowTasksResponse
-> Getting (First Text) DescribeMaintenanceWindowTasksResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMaintenanceWindowTasksResponse
-> Const (First Text) DescribeMaintenanceWindowTasksResponse
Lens' DescribeMaintenanceWindowTasksResponse (Maybe Text)
describeMaintenanceWindowTasksResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMaintenanceWindowTasksResponse
-> Const (First Text) DescribeMaintenanceWindowTasksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeMaintenanceWindowTasksResponse 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 DescribeMaintenanceWindowTasks
forall a. Maybe a
Prelude.Nothing
| Maybe [MaintenanceWindowTask] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeMaintenanceWindowTasks
DescribeMaintenanceWindowTasksResponse
rs
DescribeMaintenanceWindowTasksResponse
-> Getting
(First [MaintenanceWindowTask])
DescribeMaintenanceWindowTasksResponse
[MaintenanceWindowTask]
-> Maybe [MaintenanceWindowTask]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [MaintenanceWindowTask]
-> Const
(First [MaintenanceWindowTask]) (Maybe [MaintenanceWindowTask]))
-> DescribeMaintenanceWindowTasksResponse
-> Const
(First [MaintenanceWindowTask])
DescribeMaintenanceWindowTasksResponse
Lens'
DescribeMaintenanceWindowTasksResponse
(Maybe [MaintenanceWindowTask])
describeMaintenanceWindowTasksResponse_tasks
((Maybe [MaintenanceWindowTask]
-> Const
(First [MaintenanceWindowTask]) (Maybe [MaintenanceWindowTask]))
-> DescribeMaintenanceWindowTasksResponse
-> Const
(First [MaintenanceWindowTask])
DescribeMaintenanceWindowTasksResponse)
-> (([MaintenanceWindowTask]
-> Const (First [MaintenanceWindowTask]) [MaintenanceWindowTask])
-> Maybe [MaintenanceWindowTask]
-> Const
(First [MaintenanceWindowTask]) (Maybe [MaintenanceWindowTask]))
-> Getting
(First [MaintenanceWindowTask])
DescribeMaintenanceWindowTasksResponse
[MaintenanceWindowTask]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MaintenanceWindowTask]
-> Const (First [MaintenanceWindowTask]) [MaintenanceWindowTask])
-> Maybe [MaintenanceWindowTask]
-> Const
(First [MaintenanceWindowTask]) (Maybe [MaintenanceWindowTask])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeMaintenanceWindowTasks
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeMaintenanceWindowTasks
-> Maybe DescribeMaintenanceWindowTasks
forall a. a -> Maybe a
Prelude.Just (DescribeMaintenanceWindowTasks
-> Maybe DescribeMaintenanceWindowTasks)
-> DescribeMaintenanceWindowTasks
-> Maybe DescribeMaintenanceWindowTasks
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeMaintenanceWindowTasks
rq
DescribeMaintenanceWindowTasks
-> (DescribeMaintenanceWindowTasks
-> DescribeMaintenanceWindowTasks)
-> DescribeMaintenanceWindowTasks
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeMaintenanceWindowTasks
-> Identity DescribeMaintenanceWindowTasks
Lens
DescribeMaintenanceWindowTasks
DescribeMaintenanceWindowTasks
(Maybe Text)
(Maybe Text)
describeMaintenanceWindowTasks_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeMaintenanceWindowTasks
-> Identity DescribeMaintenanceWindowTasks)
-> Maybe Text
-> DescribeMaintenanceWindowTasks
-> DescribeMaintenanceWindowTasks
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeMaintenanceWindowTasks
DescribeMaintenanceWindowTasksResponse
rs
DescribeMaintenanceWindowTasksResponse
-> Getting (First Text) DescribeMaintenanceWindowTasksResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMaintenanceWindowTasksResponse
-> Const (First Text) DescribeMaintenanceWindowTasksResponse
Lens' DescribeMaintenanceWindowTasksResponse (Maybe Text)
describeMaintenanceWindowTasksResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMaintenanceWindowTasksResponse
-> Const (First Text) DescribeMaintenanceWindowTasksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeMaintenanceWindowTasksResponse 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
DescribeMaintenanceWindowTasks
where
type
AWSResponse DescribeMaintenanceWindowTasks =
DescribeMaintenanceWindowTasksResponse
request :: DescribeMaintenanceWindowTasks
-> Request DescribeMaintenanceWindowTasks
request = Service
-> DescribeMaintenanceWindowTasks
-> Request DescribeMaintenanceWindowTasks
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeMaintenanceWindowTasks
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeMaintenanceWindowTasks)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeMaintenanceWindowTasks))
-> Logger
-> Service
-> Proxy DescribeMaintenanceWindowTasks
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeMaintenanceWindowTasks)))
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 [MaintenanceWindowTask]
-> Maybe Text -> Int -> DescribeMaintenanceWindowTasksResponse
DescribeMaintenanceWindowTasksResponse'
(Maybe [MaintenanceWindowTask]
-> Maybe Text -> Int -> DescribeMaintenanceWindowTasksResponse)
-> Either String (Maybe [MaintenanceWindowTask])
-> Either
String
(Maybe Text -> Int -> DescribeMaintenanceWindowTasksResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (Maybe [MaintenanceWindowTask]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tasks" Either String (Maybe (Maybe [MaintenanceWindowTask]))
-> Maybe [MaintenanceWindowTask]
-> Either String (Maybe [MaintenanceWindowTask])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MaintenanceWindowTask]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text -> Int -> DescribeMaintenanceWindowTasksResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeMaintenanceWindowTasksResponse)
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 -> DescribeMaintenanceWindowTasksResponse)
-> Either String Int
-> Either String DescribeMaintenanceWindowTasksResponse
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
DescribeMaintenanceWindowTasks
instance
Prelude.NFData
DescribeMaintenanceWindowTasks
instance
Core.ToHeaders
DescribeMaintenanceWindowTasks
where
toHeaders :: DescribeMaintenanceWindowTasks -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DescribeMaintenanceWindowTasks -> 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.DescribeMaintenanceWindowTasks" ::
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 DescribeMaintenanceWindowTasks where
toJSON :: DescribeMaintenanceWindowTasks -> Value
toJSON DescribeMaintenanceWindowTasks' {Maybe Natural
Maybe [MaintenanceWindowFilter]
Maybe Text
Text
windowId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe [MaintenanceWindowFilter]
$sel:windowId:DescribeMaintenanceWindowTasks' :: DescribeMaintenanceWindowTasks -> Text
$sel:maxResults:DescribeMaintenanceWindowTasks' :: DescribeMaintenanceWindowTasks -> Maybe Natural
$sel:nextToken:DescribeMaintenanceWindowTasks' :: DescribeMaintenanceWindowTasks -> Maybe Text
$sel:filters:DescribeMaintenanceWindowTasks' :: DescribeMaintenanceWindowTasks -> 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 DescribeMaintenanceWindowTasks where
toPath :: DescribeMaintenanceWindowTasks -> ByteString
toPath = ByteString -> DescribeMaintenanceWindowTasks -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeMaintenanceWindowTasks where
toQuery :: DescribeMaintenanceWindowTasks -> QueryString
toQuery = QueryString -> DescribeMaintenanceWindowTasks -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeMaintenanceWindowTasksResponse = DescribeMaintenanceWindowTasksResponse'
{
DescribeMaintenanceWindowTasksResponse
-> Maybe [MaintenanceWindowTask]
tasks :: Prelude.Maybe [MaintenanceWindowTask],
DescribeMaintenanceWindowTasksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeMaintenanceWindowTasksResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeMaintenanceWindowTasksResponse
-> DescribeMaintenanceWindowTasksResponse -> Bool
(DescribeMaintenanceWindowTasksResponse
-> DescribeMaintenanceWindowTasksResponse -> Bool)
-> (DescribeMaintenanceWindowTasksResponse
-> DescribeMaintenanceWindowTasksResponse -> Bool)
-> Eq DescribeMaintenanceWindowTasksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMaintenanceWindowTasksResponse
-> DescribeMaintenanceWindowTasksResponse -> Bool
$c/= :: DescribeMaintenanceWindowTasksResponse
-> DescribeMaintenanceWindowTasksResponse -> Bool
== :: DescribeMaintenanceWindowTasksResponse
-> DescribeMaintenanceWindowTasksResponse -> Bool
$c== :: DescribeMaintenanceWindowTasksResponse
-> DescribeMaintenanceWindowTasksResponse -> Bool
Prelude.Eq, Int -> DescribeMaintenanceWindowTasksResponse -> ShowS
[DescribeMaintenanceWindowTasksResponse] -> ShowS
DescribeMaintenanceWindowTasksResponse -> String
(Int -> DescribeMaintenanceWindowTasksResponse -> ShowS)
-> (DescribeMaintenanceWindowTasksResponse -> String)
-> ([DescribeMaintenanceWindowTasksResponse] -> ShowS)
-> Show DescribeMaintenanceWindowTasksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMaintenanceWindowTasksResponse] -> ShowS
$cshowList :: [DescribeMaintenanceWindowTasksResponse] -> ShowS
show :: DescribeMaintenanceWindowTasksResponse -> String
$cshow :: DescribeMaintenanceWindowTasksResponse -> String
showsPrec :: Int -> DescribeMaintenanceWindowTasksResponse -> ShowS
$cshowsPrec :: Int -> DescribeMaintenanceWindowTasksResponse -> ShowS
Prelude.Show, (forall x.
DescribeMaintenanceWindowTasksResponse
-> Rep DescribeMaintenanceWindowTasksResponse x)
-> (forall x.
Rep DescribeMaintenanceWindowTasksResponse x
-> DescribeMaintenanceWindowTasksResponse)
-> Generic DescribeMaintenanceWindowTasksResponse
forall x.
Rep DescribeMaintenanceWindowTasksResponse x
-> DescribeMaintenanceWindowTasksResponse
forall x.
DescribeMaintenanceWindowTasksResponse
-> Rep DescribeMaintenanceWindowTasksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMaintenanceWindowTasksResponse x
-> DescribeMaintenanceWindowTasksResponse
$cfrom :: forall x.
DescribeMaintenanceWindowTasksResponse
-> Rep DescribeMaintenanceWindowTasksResponse x
Prelude.Generic)
newDescribeMaintenanceWindowTasksResponse ::
Prelude.Int ->
DescribeMaintenanceWindowTasksResponse
newDescribeMaintenanceWindowTasksResponse :: Int -> DescribeMaintenanceWindowTasksResponse
newDescribeMaintenanceWindowTasksResponse
Int
pHttpStatus_ =
DescribeMaintenanceWindowTasksResponse' :: Maybe [MaintenanceWindowTask]
-> Maybe Text -> Int -> DescribeMaintenanceWindowTasksResponse
DescribeMaintenanceWindowTasksResponse'
{ $sel:tasks:DescribeMaintenanceWindowTasksResponse' :: Maybe [MaintenanceWindowTask]
tasks =
Maybe [MaintenanceWindowTask]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeMaintenanceWindowTasksResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeMaintenanceWindowTasksResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeMaintenanceWindowTasksResponse_tasks :: Lens.Lens' DescribeMaintenanceWindowTasksResponse (Prelude.Maybe [MaintenanceWindowTask])
describeMaintenanceWindowTasksResponse_tasks :: (Maybe [MaintenanceWindowTask]
-> f (Maybe [MaintenanceWindowTask]))
-> DescribeMaintenanceWindowTasksResponse
-> f DescribeMaintenanceWindowTasksResponse
describeMaintenanceWindowTasksResponse_tasks = (DescribeMaintenanceWindowTasksResponse
-> Maybe [MaintenanceWindowTask])
-> (DescribeMaintenanceWindowTasksResponse
-> Maybe [MaintenanceWindowTask]
-> DescribeMaintenanceWindowTasksResponse)
-> Lens'
DescribeMaintenanceWindowTasksResponse
(Maybe [MaintenanceWindowTask])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowTasksResponse' {Maybe [MaintenanceWindowTask]
tasks :: Maybe [MaintenanceWindowTask]
$sel:tasks:DescribeMaintenanceWindowTasksResponse' :: DescribeMaintenanceWindowTasksResponse
-> Maybe [MaintenanceWindowTask]
tasks} -> Maybe [MaintenanceWindowTask]
tasks) (\s :: DescribeMaintenanceWindowTasksResponse
s@DescribeMaintenanceWindowTasksResponse' {} Maybe [MaintenanceWindowTask]
a -> DescribeMaintenanceWindowTasksResponse
s {$sel:tasks:DescribeMaintenanceWindowTasksResponse' :: Maybe [MaintenanceWindowTask]
tasks = Maybe [MaintenanceWindowTask]
a} :: DescribeMaintenanceWindowTasksResponse) ((Maybe [MaintenanceWindowTask]
-> f (Maybe [MaintenanceWindowTask]))
-> DescribeMaintenanceWindowTasksResponse
-> f DescribeMaintenanceWindowTasksResponse)
-> ((Maybe [MaintenanceWindowTask]
-> f (Maybe [MaintenanceWindowTask]))
-> Maybe [MaintenanceWindowTask]
-> f (Maybe [MaintenanceWindowTask]))
-> (Maybe [MaintenanceWindowTask]
-> f (Maybe [MaintenanceWindowTask]))
-> DescribeMaintenanceWindowTasksResponse
-> f DescribeMaintenanceWindowTasksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[MaintenanceWindowTask]
[MaintenanceWindowTask]
[MaintenanceWindowTask]
[MaintenanceWindowTask]
-> Iso
(Maybe [MaintenanceWindowTask])
(Maybe [MaintenanceWindowTask])
(Maybe [MaintenanceWindowTask])
(Maybe [MaintenanceWindowTask])
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
[MaintenanceWindowTask]
[MaintenanceWindowTask]
[MaintenanceWindowTask]
[MaintenanceWindowTask]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeMaintenanceWindowTasksResponse_nextToken :: Lens.Lens' DescribeMaintenanceWindowTasksResponse (Prelude.Maybe Prelude.Text)
describeMaintenanceWindowTasksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMaintenanceWindowTasksResponse
-> f DescribeMaintenanceWindowTasksResponse
describeMaintenanceWindowTasksResponse_nextToken = (DescribeMaintenanceWindowTasksResponse -> Maybe Text)
-> (DescribeMaintenanceWindowTasksResponse
-> Maybe Text -> DescribeMaintenanceWindowTasksResponse)
-> Lens' DescribeMaintenanceWindowTasksResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowTasksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMaintenanceWindowTasksResponse' :: DescribeMaintenanceWindowTasksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMaintenanceWindowTasksResponse
s@DescribeMaintenanceWindowTasksResponse' {} Maybe Text
a -> DescribeMaintenanceWindowTasksResponse
s {$sel:nextToken:DescribeMaintenanceWindowTasksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMaintenanceWindowTasksResponse)
describeMaintenanceWindowTasksResponse_httpStatus :: Lens.Lens' DescribeMaintenanceWindowTasksResponse Prelude.Int
describeMaintenanceWindowTasksResponse_httpStatus :: (Int -> f Int)
-> DescribeMaintenanceWindowTasksResponse
-> f DescribeMaintenanceWindowTasksResponse
describeMaintenanceWindowTasksResponse_httpStatus = (DescribeMaintenanceWindowTasksResponse -> Int)
-> (DescribeMaintenanceWindowTasksResponse
-> Int -> DescribeMaintenanceWindowTasksResponse)
-> Lens
DescribeMaintenanceWindowTasksResponse
DescribeMaintenanceWindowTasksResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMaintenanceWindowTasksResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeMaintenanceWindowTasksResponse' :: DescribeMaintenanceWindowTasksResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeMaintenanceWindowTasksResponse
s@DescribeMaintenanceWindowTasksResponse' {} Int
a -> DescribeMaintenanceWindowTasksResponse
s {$sel:httpStatus:DescribeMaintenanceWindowTasksResponse' :: Int
httpStatus = Int
a} :: DescribeMaintenanceWindowTasksResponse)
instance
Prelude.NFData
DescribeMaintenanceWindowTasksResponse