{-# 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.MigrationHub.ListMigrationTasks
(
ListMigrationTasks (..),
newListMigrationTasks,
listMigrationTasks_resourceName,
listMigrationTasks_nextToken,
listMigrationTasks_maxResults,
ListMigrationTasksResponse (..),
newListMigrationTasksResponse,
listMigrationTasksResponse_migrationTaskSummaryList,
listMigrationTasksResponse_nextToken,
listMigrationTasksResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MigrationHub.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListMigrationTasks = ListMigrationTasks'
{
ListMigrationTasks -> Maybe Text
resourceName :: Prelude.Maybe Prelude.Text,
ListMigrationTasks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListMigrationTasks -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListMigrationTasks -> ListMigrationTasks -> Bool
(ListMigrationTasks -> ListMigrationTasks -> Bool)
-> (ListMigrationTasks -> ListMigrationTasks -> Bool)
-> Eq ListMigrationTasks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMigrationTasks -> ListMigrationTasks -> Bool
$c/= :: ListMigrationTasks -> ListMigrationTasks -> Bool
== :: ListMigrationTasks -> ListMigrationTasks -> Bool
$c== :: ListMigrationTasks -> ListMigrationTasks -> Bool
Prelude.Eq, ReadPrec [ListMigrationTasks]
ReadPrec ListMigrationTasks
Int -> ReadS ListMigrationTasks
ReadS [ListMigrationTasks]
(Int -> ReadS ListMigrationTasks)
-> ReadS [ListMigrationTasks]
-> ReadPrec ListMigrationTasks
-> ReadPrec [ListMigrationTasks]
-> Read ListMigrationTasks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMigrationTasks]
$creadListPrec :: ReadPrec [ListMigrationTasks]
readPrec :: ReadPrec ListMigrationTasks
$creadPrec :: ReadPrec ListMigrationTasks
readList :: ReadS [ListMigrationTasks]
$creadList :: ReadS [ListMigrationTasks]
readsPrec :: Int -> ReadS ListMigrationTasks
$creadsPrec :: Int -> ReadS ListMigrationTasks
Prelude.Read, Int -> ListMigrationTasks -> ShowS
[ListMigrationTasks] -> ShowS
ListMigrationTasks -> String
(Int -> ListMigrationTasks -> ShowS)
-> (ListMigrationTasks -> String)
-> ([ListMigrationTasks] -> ShowS)
-> Show ListMigrationTasks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMigrationTasks] -> ShowS
$cshowList :: [ListMigrationTasks] -> ShowS
show :: ListMigrationTasks -> String
$cshow :: ListMigrationTasks -> String
showsPrec :: Int -> ListMigrationTasks -> ShowS
$cshowsPrec :: Int -> ListMigrationTasks -> ShowS
Prelude.Show, (forall x. ListMigrationTasks -> Rep ListMigrationTasks x)
-> (forall x. Rep ListMigrationTasks x -> ListMigrationTasks)
-> Generic ListMigrationTasks
forall x. Rep ListMigrationTasks x -> ListMigrationTasks
forall x. ListMigrationTasks -> Rep ListMigrationTasks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMigrationTasks x -> ListMigrationTasks
$cfrom :: forall x. ListMigrationTasks -> Rep ListMigrationTasks x
Prelude.Generic)
newListMigrationTasks ::
ListMigrationTasks
newListMigrationTasks :: ListMigrationTasks
newListMigrationTasks =
ListMigrationTasks' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListMigrationTasks
ListMigrationTasks'
{ $sel:resourceName:ListMigrationTasks' :: Maybe Text
resourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListMigrationTasks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListMigrationTasks' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listMigrationTasks_resourceName :: Lens.Lens' ListMigrationTasks (Prelude.Maybe Prelude.Text)
listMigrationTasks_resourceName :: (Maybe Text -> f (Maybe Text))
-> ListMigrationTasks -> f ListMigrationTasks
listMigrationTasks_resourceName = (ListMigrationTasks -> Maybe Text)
-> (ListMigrationTasks -> Maybe Text -> ListMigrationTasks)
-> Lens
ListMigrationTasks ListMigrationTasks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMigrationTasks' {Maybe Text
resourceName :: Maybe Text
$sel:resourceName:ListMigrationTasks' :: ListMigrationTasks -> Maybe Text
resourceName} -> Maybe Text
resourceName) (\s :: ListMigrationTasks
s@ListMigrationTasks' {} Maybe Text
a -> ListMigrationTasks
s {$sel:resourceName:ListMigrationTasks' :: Maybe Text
resourceName = Maybe Text
a} :: ListMigrationTasks)
listMigrationTasks_nextToken :: Lens.Lens' ListMigrationTasks (Prelude.Maybe Prelude.Text)
listMigrationTasks_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMigrationTasks -> f ListMigrationTasks
listMigrationTasks_nextToken = (ListMigrationTasks -> Maybe Text)
-> (ListMigrationTasks -> Maybe Text -> ListMigrationTasks)
-> Lens
ListMigrationTasks ListMigrationTasks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMigrationTasks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMigrationTasks' :: ListMigrationTasks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMigrationTasks
s@ListMigrationTasks' {} Maybe Text
a -> ListMigrationTasks
s {$sel:nextToken:ListMigrationTasks' :: Maybe Text
nextToken = Maybe Text
a} :: ListMigrationTasks)
listMigrationTasks_maxResults :: Lens.Lens' ListMigrationTasks (Prelude.Maybe Prelude.Natural)
listMigrationTasks_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListMigrationTasks -> f ListMigrationTasks
listMigrationTasks_maxResults = (ListMigrationTasks -> Maybe Natural)
-> (ListMigrationTasks -> Maybe Natural -> ListMigrationTasks)
-> Lens
ListMigrationTasks
ListMigrationTasks
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMigrationTasks' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMigrationTasks' :: ListMigrationTasks -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMigrationTasks
s@ListMigrationTasks' {} Maybe Natural
a -> ListMigrationTasks
s {$sel:maxResults:ListMigrationTasks' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMigrationTasks)
instance Core.AWSPager ListMigrationTasks where
page :: ListMigrationTasks
-> AWSResponse ListMigrationTasks -> Maybe ListMigrationTasks
page ListMigrationTasks
rq AWSResponse ListMigrationTasks
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListMigrationTasks
ListMigrationTasksResponse
rs
ListMigrationTasksResponse
-> Getting (First Text) ListMigrationTasksResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListMigrationTasksResponse
-> Const (First Text) ListMigrationTasksResponse
Lens' ListMigrationTasksResponse (Maybe Text)
listMigrationTasksResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListMigrationTasksResponse
-> Const (First Text) ListMigrationTasksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListMigrationTasksResponse 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 ListMigrationTasks
forall a. Maybe a
Prelude.Nothing
| Maybe [MigrationTaskSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListMigrationTasks
ListMigrationTasksResponse
rs
ListMigrationTasksResponse
-> Getting
(First [MigrationTaskSummary])
ListMigrationTasksResponse
[MigrationTaskSummary]
-> Maybe [MigrationTaskSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [MigrationTaskSummary]
-> Const
(First [MigrationTaskSummary]) (Maybe [MigrationTaskSummary]))
-> ListMigrationTasksResponse
-> Const (First [MigrationTaskSummary]) ListMigrationTasksResponse
Lens' ListMigrationTasksResponse (Maybe [MigrationTaskSummary])
listMigrationTasksResponse_migrationTaskSummaryList
((Maybe [MigrationTaskSummary]
-> Const
(First [MigrationTaskSummary]) (Maybe [MigrationTaskSummary]))
-> ListMigrationTasksResponse
-> Const (First [MigrationTaskSummary]) ListMigrationTasksResponse)
-> (([MigrationTaskSummary]
-> Const (First [MigrationTaskSummary]) [MigrationTaskSummary])
-> Maybe [MigrationTaskSummary]
-> Const
(First [MigrationTaskSummary]) (Maybe [MigrationTaskSummary]))
-> Getting
(First [MigrationTaskSummary])
ListMigrationTasksResponse
[MigrationTaskSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MigrationTaskSummary]
-> Const (First [MigrationTaskSummary]) [MigrationTaskSummary])
-> Maybe [MigrationTaskSummary]
-> Const
(First [MigrationTaskSummary]) (Maybe [MigrationTaskSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListMigrationTasks
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListMigrationTasks -> Maybe ListMigrationTasks
forall a. a -> Maybe a
Prelude.Just (ListMigrationTasks -> Maybe ListMigrationTasks)
-> ListMigrationTasks -> Maybe ListMigrationTasks
forall a b. (a -> b) -> a -> b
Prelude.$
ListMigrationTasks
rq
ListMigrationTasks
-> (ListMigrationTasks -> ListMigrationTasks) -> ListMigrationTasks
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListMigrationTasks -> Identity ListMigrationTasks
Lens
ListMigrationTasks ListMigrationTasks (Maybe Text) (Maybe Text)
listMigrationTasks_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListMigrationTasks -> Identity ListMigrationTasks)
-> Maybe Text -> ListMigrationTasks -> ListMigrationTasks
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListMigrationTasks
ListMigrationTasksResponse
rs
ListMigrationTasksResponse
-> Getting (First Text) ListMigrationTasksResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListMigrationTasksResponse
-> Const (First Text) ListMigrationTasksResponse
Lens' ListMigrationTasksResponse (Maybe Text)
listMigrationTasksResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListMigrationTasksResponse
-> Const (First Text) ListMigrationTasksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListMigrationTasksResponse 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 ListMigrationTasks where
type
AWSResponse ListMigrationTasks =
ListMigrationTasksResponse
request :: ListMigrationTasks -> Request ListMigrationTasks
request = Service -> ListMigrationTasks -> Request ListMigrationTasks
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListMigrationTasks
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListMigrationTasks)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListMigrationTasks))
-> Logger
-> Service
-> Proxy ListMigrationTasks
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListMigrationTasks)))
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 [MigrationTaskSummary]
-> Maybe Text -> Int -> ListMigrationTasksResponse
ListMigrationTasksResponse'
(Maybe [MigrationTaskSummary]
-> Maybe Text -> Int -> ListMigrationTasksResponse)
-> Either String (Maybe [MigrationTaskSummary])
-> Either String (Maybe Text -> Int -> ListMigrationTasksResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [MigrationTaskSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MigrationTaskSummaryList"
Either String (Maybe (Maybe [MigrationTaskSummary]))
-> Maybe [MigrationTaskSummary]
-> Either String (Maybe [MigrationTaskSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MigrationTaskSummary]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Maybe Text -> Int -> ListMigrationTasksResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListMigrationTasksResponse)
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 -> ListMigrationTasksResponse)
-> Either String Int -> Either String ListMigrationTasksResponse
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 ListMigrationTasks
instance Prelude.NFData ListMigrationTasks
instance Core.ToHeaders ListMigrationTasks where
toHeaders :: ListMigrationTasks -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListMigrationTasks -> 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
"AWSMigrationHub.ListMigrationTasks" ::
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 ListMigrationTasks where
toJSON :: ListMigrationTasks -> Value
toJSON ListMigrationTasks' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
resourceName :: Maybe Text
$sel:maxResults:ListMigrationTasks' :: ListMigrationTasks -> Maybe Natural
$sel:nextToken:ListMigrationTasks' :: ListMigrationTasks -> Maybe Text
$sel:resourceName:ListMigrationTasks' :: ListMigrationTasks -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ResourceName" 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
resourceName,
(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
]
)
instance Core.ToPath ListMigrationTasks where
toPath :: ListMigrationTasks -> ByteString
toPath = ByteString -> ListMigrationTasks -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListMigrationTasks where
toQuery :: ListMigrationTasks -> QueryString
toQuery = QueryString -> ListMigrationTasks -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListMigrationTasksResponse = ListMigrationTasksResponse'
{
ListMigrationTasksResponse -> Maybe [MigrationTaskSummary]
migrationTaskSummaryList :: Prelude.Maybe [MigrationTaskSummary],
ListMigrationTasksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListMigrationTasksResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListMigrationTasksResponse -> ListMigrationTasksResponse -> Bool
(ListMigrationTasksResponse -> ListMigrationTasksResponse -> Bool)
-> (ListMigrationTasksResponse
-> ListMigrationTasksResponse -> Bool)
-> Eq ListMigrationTasksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMigrationTasksResponse -> ListMigrationTasksResponse -> Bool
$c/= :: ListMigrationTasksResponse -> ListMigrationTasksResponse -> Bool
== :: ListMigrationTasksResponse -> ListMigrationTasksResponse -> Bool
$c== :: ListMigrationTasksResponse -> ListMigrationTasksResponse -> Bool
Prelude.Eq, ReadPrec [ListMigrationTasksResponse]
ReadPrec ListMigrationTasksResponse
Int -> ReadS ListMigrationTasksResponse
ReadS [ListMigrationTasksResponse]
(Int -> ReadS ListMigrationTasksResponse)
-> ReadS [ListMigrationTasksResponse]
-> ReadPrec ListMigrationTasksResponse
-> ReadPrec [ListMigrationTasksResponse]
-> Read ListMigrationTasksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMigrationTasksResponse]
$creadListPrec :: ReadPrec [ListMigrationTasksResponse]
readPrec :: ReadPrec ListMigrationTasksResponse
$creadPrec :: ReadPrec ListMigrationTasksResponse
readList :: ReadS [ListMigrationTasksResponse]
$creadList :: ReadS [ListMigrationTasksResponse]
readsPrec :: Int -> ReadS ListMigrationTasksResponse
$creadsPrec :: Int -> ReadS ListMigrationTasksResponse
Prelude.Read, Int -> ListMigrationTasksResponse -> ShowS
[ListMigrationTasksResponse] -> ShowS
ListMigrationTasksResponse -> String
(Int -> ListMigrationTasksResponse -> ShowS)
-> (ListMigrationTasksResponse -> String)
-> ([ListMigrationTasksResponse] -> ShowS)
-> Show ListMigrationTasksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMigrationTasksResponse] -> ShowS
$cshowList :: [ListMigrationTasksResponse] -> ShowS
show :: ListMigrationTasksResponse -> String
$cshow :: ListMigrationTasksResponse -> String
showsPrec :: Int -> ListMigrationTasksResponse -> ShowS
$cshowsPrec :: Int -> ListMigrationTasksResponse -> ShowS
Prelude.Show, (forall x.
ListMigrationTasksResponse -> Rep ListMigrationTasksResponse x)
-> (forall x.
Rep ListMigrationTasksResponse x -> ListMigrationTasksResponse)
-> Generic ListMigrationTasksResponse
forall x.
Rep ListMigrationTasksResponse x -> ListMigrationTasksResponse
forall x.
ListMigrationTasksResponse -> Rep ListMigrationTasksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMigrationTasksResponse x -> ListMigrationTasksResponse
$cfrom :: forall x.
ListMigrationTasksResponse -> Rep ListMigrationTasksResponse x
Prelude.Generic)
newListMigrationTasksResponse ::
Prelude.Int ->
ListMigrationTasksResponse
newListMigrationTasksResponse :: Int -> ListMigrationTasksResponse
newListMigrationTasksResponse Int
pHttpStatus_ =
ListMigrationTasksResponse' :: Maybe [MigrationTaskSummary]
-> Maybe Text -> Int -> ListMigrationTasksResponse
ListMigrationTasksResponse'
{ $sel:migrationTaskSummaryList:ListMigrationTasksResponse' :: Maybe [MigrationTaskSummary]
migrationTaskSummaryList =
Maybe [MigrationTaskSummary]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListMigrationTasksResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListMigrationTasksResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listMigrationTasksResponse_migrationTaskSummaryList :: Lens.Lens' ListMigrationTasksResponse (Prelude.Maybe [MigrationTaskSummary])
listMigrationTasksResponse_migrationTaskSummaryList :: (Maybe [MigrationTaskSummary] -> f (Maybe [MigrationTaskSummary]))
-> ListMigrationTasksResponse -> f ListMigrationTasksResponse
listMigrationTasksResponse_migrationTaskSummaryList = (ListMigrationTasksResponse -> Maybe [MigrationTaskSummary])
-> (ListMigrationTasksResponse
-> Maybe [MigrationTaskSummary] -> ListMigrationTasksResponse)
-> Lens' ListMigrationTasksResponse (Maybe [MigrationTaskSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMigrationTasksResponse' {Maybe [MigrationTaskSummary]
migrationTaskSummaryList :: Maybe [MigrationTaskSummary]
$sel:migrationTaskSummaryList:ListMigrationTasksResponse' :: ListMigrationTasksResponse -> Maybe [MigrationTaskSummary]
migrationTaskSummaryList} -> Maybe [MigrationTaskSummary]
migrationTaskSummaryList) (\s :: ListMigrationTasksResponse
s@ListMigrationTasksResponse' {} Maybe [MigrationTaskSummary]
a -> ListMigrationTasksResponse
s {$sel:migrationTaskSummaryList:ListMigrationTasksResponse' :: Maybe [MigrationTaskSummary]
migrationTaskSummaryList = Maybe [MigrationTaskSummary]
a} :: ListMigrationTasksResponse) ((Maybe [MigrationTaskSummary] -> f (Maybe [MigrationTaskSummary]))
-> ListMigrationTasksResponse -> f ListMigrationTasksResponse)
-> ((Maybe [MigrationTaskSummary]
-> f (Maybe [MigrationTaskSummary]))
-> Maybe [MigrationTaskSummary]
-> f (Maybe [MigrationTaskSummary]))
-> (Maybe [MigrationTaskSummary]
-> f (Maybe [MigrationTaskSummary]))
-> ListMigrationTasksResponse
-> f ListMigrationTasksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[MigrationTaskSummary]
[MigrationTaskSummary]
[MigrationTaskSummary]
[MigrationTaskSummary]
-> Iso
(Maybe [MigrationTaskSummary])
(Maybe [MigrationTaskSummary])
(Maybe [MigrationTaskSummary])
(Maybe [MigrationTaskSummary])
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
[MigrationTaskSummary]
[MigrationTaskSummary]
[MigrationTaskSummary]
[MigrationTaskSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listMigrationTasksResponse_nextToken :: Lens.Lens' ListMigrationTasksResponse (Prelude.Maybe Prelude.Text)
listMigrationTasksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMigrationTasksResponse -> f ListMigrationTasksResponse
listMigrationTasksResponse_nextToken = (ListMigrationTasksResponse -> Maybe Text)
-> (ListMigrationTasksResponse
-> Maybe Text -> ListMigrationTasksResponse)
-> Lens' ListMigrationTasksResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMigrationTasksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMigrationTasksResponse' :: ListMigrationTasksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMigrationTasksResponse
s@ListMigrationTasksResponse' {} Maybe Text
a -> ListMigrationTasksResponse
s {$sel:nextToken:ListMigrationTasksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMigrationTasksResponse)
listMigrationTasksResponse_httpStatus :: Lens.Lens' ListMigrationTasksResponse Prelude.Int
listMigrationTasksResponse_httpStatus :: (Int -> f Int)
-> ListMigrationTasksResponse -> f ListMigrationTasksResponse
listMigrationTasksResponse_httpStatus = (ListMigrationTasksResponse -> Int)
-> (ListMigrationTasksResponse
-> Int -> ListMigrationTasksResponse)
-> Lens
ListMigrationTasksResponse ListMigrationTasksResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMigrationTasksResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListMigrationTasksResponse' :: ListMigrationTasksResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListMigrationTasksResponse
s@ListMigrationTasksResponse' {} Int
a -> ListMigrationTasksResponse
s {$sel:httpStatus:ListMigrationTasksResponse' :: Int
httpStatus = Int
a} :: ListMigrationTasksResponse)
instance Prelude.NFData ListMigrationTasksResponse