{-# 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.ECS.ListTasks
(
ListTasks (..),
newListTasks,
listTasks_desiredStatus,
listTasks_cluster,
listTasks_family,
listTasks_nextToken,
listTasks_startedBy,
listTasks_serviceName,
listTasks_launchType,
listTasks_containerInstance,
listTasks_maxResults,
ListTasksResponse (..),
newListTasksResponse,
listTasksResponse_nextToken,
listTasksResponse_taskArns,
listTasksResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ECS.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListTasks = ListTasks'
{
ListTasks -> Maybe DesiredStatus
desiredStatus :: Prelude.Maybe DesiredStatus,
ListTasks -> Maybe Text
cluster :: Prelude.Maybe Prelude.Text,
ListTasks -> Maybe Text
family :: Prelude.Maybe Prelude.Text,
ListTasks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTasks -> Maybe Text
startedBy :: Prelude.Maybe Prelude.Text,
ListTasks -> Maybe Text
serviceName :: Prelude.Maybe Prelude.Text,
ListTasks -> Maybe LaunchType
launchType :: Prelude.Maybe LaunchType,
ListTasks -> Maybe Text
containerInstance :: Prelude.Maybe Prelude.Text,
ListTasks -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
}
deriving (ListTasks -> ListTasks -> Bool
(ListTasks -> ListTasks -> Bool)
-> (ListTasks -> ListTasks -> Bool) -> Eq ListTasks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTasks -> ListTasks -> Bool
$c/= :: ListTasks -> ListTasks -> Bool
== :: ListTasks -> ListTasks -> Bool
$c== :: ListTasks -> ListTasks -> Bool
Prelude.Eq, ReadPrec [ListTasks]
ReadPrec ListTasks
Int -> ReadS ListTasks
ReadS [ListTasks]
(Int -> ReadS ListTasks)
-> ReadS [ListTasks]
-> ReadPrec ListTasks
-> ReadPrec [ListTasks]
-> Read ListTasks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTasks]
$creadListPrec :: ReadPrec [ListTasks]
readPrec :: ReadPrec ListTasks
$creadPrec :: ReadPrec ListTasks
readList :: ReadS [ListTasks]
$creadList :: ReadS [ListTasks]
readsPrec :: Int -> ReadS ListTasks
$creadsPrec :: Int -> ReadS ListTasks
Prelude.Read, Int -> ListTasks -> ShowS
[ListTasks] -> ShowS
ListTasks -> String
(Int -> ListTasks -> ShowS)
-> (ListTasks -> String)
-> ([ListTasks] -> ShowS)
-> Show ListTasks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTasks] -> ShowS
$cshowList :: [ListTasks] -> ShowS
show :: ListTasks -> String
$cshow :: ListTasks -> String
showsPrec :: Int -> ListTasks -> ShowS
$cshowsPrec :: Int -> ListTasks -> ShowS
Prelude.Show, (forall x. ListTasks -> Rep ListTasks x)
-> (forall x. Rep ListTasks x -> ListTasks) -> Generic ListTasks
forall x. Rep ListTasks x -> ListTasks
forall x. ListTasks -> Rep ListTasks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTasks x -> ListTasks
$cfrom :: forall x. ListTasks -> Rep ListTasks x
Prelude.Generic)
newListTasks ::
ListTasks
newListTasks :: ListTasks
newListTasks =
ListTasks' :: Maybe DesiredStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LaunchType
-> Maybe Text
-> Maybe Int
-> ListTasks
ListTasks'
{ $sel:desiredStatus:ListTasks' :: Maybe DesiredStatus
desiredStatus = Maybe DesiredStatus
forall a. Maybe a
Prelude.Nothing,
$sel:cluster:ListTasks' :: Maybe Text
cluster = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:family:ListTasks' :: Maybe Text
family = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListTasks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startedBy:ListTasks' :: Maybe Text
startedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceName:ListTasks' :: Maybe Text
serviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:launchType:ListTasks' :: Maybe LaunchType
launchType = Maybe LaunchType
forall a. Maybe a
Prelude.Nothing,
$sel:containerInstance:ListTasks' :: Maybe Text
containerInstance = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListTasks' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
listTasks_desiredStatus :: Lens.Lens' ListTasks (Prelude.Maybe DesiredStatus)
listTasks_desiredStatus :: (Maybe DesiredStatus -> f (Maybe DesiredStatus))
-> ListTasks -> f ListTasks
listTasks_desiredStatus = (ListTasks -> Maybe DesiredStatus)
-> (ListTasks -> Maybe DesiredStatus -> ListTasks)
-> Lens
ListTasks ListTasks (Maybe DesiredStatus) (Maybe DesiredStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasks' {Maybe DesiredStatus
desiredStatus :: Maybe DesiredStatus
$sel:desiredStatus:ListTasks' :: ListTasks -> Maybe DesiredStatus
desiredStatus} -> Maybe DesiredStatus
desiredStatus) (\s :: ListTasks
s@ListTasks' {} Maybe DesiredStatus
a -> ListTasks
s {$sel:desiredStatus:ListTasks' :: Maybe DesiredStatus
desiredStatus = Maybe DesiredStatus
a} :: ListTasks)
listTasks_cluster :: Lens.Lens' ListTasks (Prelude.Maybe Prelude.Text)
listTasks_cluster :: (Maybe Text -> f (Maybe Text)) -> ListTasks -> f ListTasks
listTasks_cluster = (ListTasks -> Maybe Text)
-> (ListTasks -> Maybe Text -> ListTasks)
-> Lens ListTasks ListTasks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasks' {Maybe Text
cluster :: Maybe Text
$sel:cluster:ListTasks' :: ListTasks -> Maybe Text
cluster} -> Maybe Text
cluster) (\s :: ListTasks
s@ListTasks' {} Maybe Text
a -> ListTasks
s {$sel:cluster:ListTasks' :: Maybe Text
cluster = Maybe Text
a} :: ListTasks)
listTasks_family :: Lens.Lens' ListTasks (Prelude.Maybe Prelude.Text)
listTasks_family :: (Maybe Text -> f (Maybe Text)) -> ListTasks -> f ListTasks
listTasks_family = (ListTasks -> Maybe Text)
-> (ListTasks -> Maybe Text -> ListTasks)
-> Lens ListTasks ListTasks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasks' {Maybe Text
family :: Maybe Text
$sel:family:ListTasks' :: ListTasks -> Maybe Text
family} -> Maybe Text
family) (\s :: ListTasks
s@ListTasks' {} Maybe Text
a -> ListTasks
s {$sel:family:ListTasks' :: Maybe Text
family = Maybe Text
a} :: ListTasks)
listTasks_nextToken :: Lens.Lens' ListTasks (Prelude.Maybe Prelude.Text)
listTasks_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListTasks -> f ListTasks
listTasks_nextToken = (ListTasks -> Maybe Text)
-> (ListTasks -> Maybe Text -> ListTasks)
-> Lens ListTasks ListTasks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTasks' :: ListTasks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTasks
s@ListTasks' {} Maybe Text
a -> ListTasks
s {$sel:nextToken:ListTasks' :: Maybe Text
nextToken = Maybe Text
a} :: ListTasks)
listTasks_startedBy :: Lens.Lens' ListTasks (Prelude.Maybe Prelude.Text)
listTasks_startedBy :: (Maybe Text -> f (Maybe Text)) -> ListTasks -> f ListTasks
listTasks_startedBy = (ListTasks -> Maybe Text)
-> (ListTasks -> Maybe Text -> ListTasks)
-> Lens ListTasks ListTasks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasks' {Maybe Text
startedBy :: Maybe Text
$sel:startedBy:ListTasks' :: ListTasks -> Maybe Text
startedBy} -> Maybe Text
startedBy) (\s :: ListTasks
s@ListTasks' {} Maybe Text
a -> ListTasks
s {$sel:startedBy:ListTasks' :: Maybe Text
startedBy = Maybe Text
a} :: ListTasks)
listTasks_serviceName :: Lens.Lens' ListTasks (Prelude.Maybe Prelude.Text)
listTasks_serviceName :: (Maybe Text -> f (Maybe Text)) -> ListTasks -> f ListTasks
listTasks_serviceName = (ListTasks -> Maybe Text)
-> (ListTasks -> Maybe Text -> ListTasks)
-> Lens ListTasks ListTasks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasks' {Maybe Text
serviceName :: Maybe Text
$sel:serviceName:ListTasks' :: ListTasks -> Maybe Text
serviceName} -> Maybe Text
serviceName) (\s :: ListTasks
s@ListTasks' {} Maybe Text
a -> ListTasks
s {$sel:serviceName:ListTasks' :: Maybe Text
serviceName = Maybe Text
a} :: ListTasks)
listTasks_launchType :: Lens.Lens' ListTasks (Prelude.Maybe LaunchType)
listTasks_launchType :: (Maybe LaunchType -> f (Maybe LaunchType))
-> ListTasks -> f ListTasks
listTasks_launchType = (ListTasks -> Maybe LaunchType)
-> (ListTasks -> Maybe LaunchType -> ListTasks)
-> Lens ListTasks ListTasks (Maybe LaunchType) (Maybe LaunchType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasks' {Maybe LaunchType
launchType :: Maybe LaunchType
$sel:launchType:ListTasks' :: ListTasks -> Maybe LaunchType
launchType} -> Maybe LaunchType
launchType) (\s :: ListTasks
s@ListTasks' {} Maybe LaunchType
a -> ListTasks
s {$sel:launchType:ListTasks' :: Maybe LaunchType
launchType = Maybe LaunchType
a} :: ListTasks)
listTasks_containerInstance :: Lens.Lens' ListTasks (Prelude.Maybe Prelude.Text)
listTasks_containerInstance :: (Maybe Text -> f (Maybe Text)) -> ListTasks -> f ListTasks
listTasks_containerInstance = (ListTasks -> Maybe Text)
-> (ListTasks -> Maybe Text -> ListTasks)
-> Lens ListTasks ListTasks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasks' {Maybe Text
containerInstance :: Maybe Text
$sel:containerInstance:ListTasks' :: ListTasks -> Maybe Text
containerInstance} -> Maybe Text
containerInstance) (\s :: ListTasks
s@ListTasks' {} Maybe Text
a -> ListTasks
s {$sel:containerInstance:ListTasks' :: Maybe Text
containerInstance = Maybe Text
a} :: ListTasks)
listTasks_maxResults :: Lens.Lens' ListTasks (Prelude.Maybe Prelude.Int)
listTasks_maxResults :: (Maybe Int -> f (Maybe Int)) -> ListTasks -> f ListTasks
listTasks_maxResults = (ListTasks -> Maybe Int)
-> (ListTasks -> Maybe Int -> ListTasks)
-> Lens ListTasks ListTasks (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasks' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListTasks' :: ListTasks -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListTasks
s@ListTasks' {} Maybe Int
a -> ListTasks
s {$sel:maxResults:ListTasks' :: Maybe Int
maxResults = Maybe Int
a} :: ListTasks)
instance Core.AWSPager ListTasks where
page :: ListTasks -> AWSResponse ListTasks -> Maybe ListTasks
page ListTasks
rq AWSResponse ListTasks
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTasks
ListTasksResponse
rs
ListTasksResponse
-> Getting (First Text) ListTasksResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTasksResponse -> Const (First Text) ListTasksResponse
Lens' ListTasksResponse (Maybe Text)
listTasksResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTasksResponse -> Const (First Text) ListTasksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTasksResponse 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 ListTasks
forall a. Maybe a
Prelude.Nothing
| Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTasks
ListTasksResponse
rs
ListTasksResponse
-> Getting (First [Text]) ListTasksResponse [Text] -> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListTasksResponse -> Const (First [Text]) ListTasksResponse
Lens' ListTasksResponse (Maybe [Text])
listTasksResponse_taskArns ((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListTasksResponse -> Const (First [Text]) ListTasksResponse)
-> (([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting (First [Text]) ListTasksResponse [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 ListTasks
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListTasks -> Maybe ListTasks
forall a. a -> Maybe a
Prelude.Just (ListTasks -> Maybe ListTasks) -> ListTasks -> Maybe ListTasks
forall a b. (a -> b) -> a -> b
Prelude.$
ListTasks
rq
ListTasks -> (ListTasks -> ListTasks) -> ListTasks
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListTasks -> Identity ListTasks
Lens ListTasks ListTasks (Maybe Text) (Maybe Text)
listTasks_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListTasks -> Identity ListTasks)
-> Maybe Text -> ListTasks -> ListTasks
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTasks
ListTasksResponse
rs
ListTasksResponse
-> Getting (First Text) ListTasksResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTasksResponse -> Const (First Text) ListTasksResponse
Lens' ListTasksResponse (Maybe Text)
listTasksResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTasksResponse -> Const (First Text) ListTasksResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTasksResponse 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 ListTasks where
type AWSResponse ListTasks = ListTasksResponse
request :: ListTasks -> Request ListTasks
request = Service -> ListTasks -> Request ListTasks
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListTasks
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListTasks)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListTasks))
-> Logger
-> Service
-> Proxy ListTasks
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListTasks)))
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 Text -> Maybe [Text] -> Int -> ListTasksResponse
ListTasksResponse'
(Maybe Text -> Maybe [Text] -> Int -> ListTasksResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Text] -> Int -> ListTasksResponse)
forall (f :: * -> *) a b. Functor 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 (Maybe [Text] -> Int -> ListTasksResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> ListTasksResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"taskArns" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListTasksResponse)
-> Either String Int -> Either String ListTasksResponse
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 ListTasks
instance Prelude.NFData ListTasks
instance Core.ToHeaders ListTasks where
toHeaders :: ListTasks -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListTasks -> 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
"AmazonEC2ContainerServiceV20141113.ListTasks" ::
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 ListTasks where
toJSON :: ListTasks -> Value
toJSON ListTasks' {Maybe Int
Maybe Text
Maybe DesiredStatus
Maybe LaunchType
maxResults :: Maybe Int
containerInstance :: Maybe Text
launchType :: Maybe LaunchType
serviceName :: Maybe Text
startedBy :: Maybe Text
nextToken :: Maybe Text
family :: Maybe Text
cluster :: Maybe Text
desiredStatus :: Maybe DesiredStatus
$sel:maxResults:ListTasks' :: ListTasks -> Maybe Int
$sel:containerInstance:ListTasks' :: ListTasks -> Maybe Text
$sel:launchType:ListTasks' :: ListTasks -> Maybe LaunchType
$sel:serviceName:ListTasks' :: ListTasks -> Maybe Text
$sel:startedBy:ListTasks' :: ListTasks -> Maybe Text
$sel:nextToken:ListTasks' :: ListTasks -> Maybe Text
$sel:family:ListTasks' :: ListTasks -> Maybe Text
$sel:cluster:ListTasks' :: ListTasks -> Maybe Text
$sel:desiredStatus:ListTasks' :: ListTasks -> Maybe DesiredStatus
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"desiredStatus" Text -> DesiredStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DesiredStatus -> Pair) -> Maybe DesiredStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DesiredStatus
desiredStatus,
(Text
"cluster" 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
cluster,
(Text
"family" 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
family,
(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
"startedBy" 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
startedBy,
(Text
"serviceName" 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
serviceName,
(Text
"launchType" Text -> LaunchType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LaunchType -> Pair) -> Maybe LaunchType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LaunchType
launchType,
(Text
"containerInstance" 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
containerInstance,
(Text
"maxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
]
)
instance Core.ToPath ListTasks where
toPath :: ListTasks -> ByteString
toPath = ByteString -> ListTasks -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListTasks where
toQuery :: ListTasks -> QueryString
toQuery = QueryString -> ListTasks -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListTasksResponse = ListTasksResponse'
{
ListTasksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTasksResponse -> Maybe [Text]
taskArns :: Prelude.Maybe [Prelude.Text],
ListTasksResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListTasksResponse -> ListTasksResponse -> Bool
(ListTasksResponse -> ListTasksResponse -> Bool)
-> (ListTasksResponse -> ListTasksResponse -> Bool)
-> Eq ListTasksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTasksResponse -> ListTasksResponse -> Bool
$c/= :: ListTasksResponse -> ListTasksResponse -> Bool
== :: ListTasksResponse -> ListTasksResponse -> Bool
$c== :: ListTasksResponse -> ListTasksResponse -> Bool
Prelude.Eq, ReadPrec [ListTasksResponse]
ReadPrec ListTasksResponse
Int -> ReadS ListTasksResponse
ReadS [ListTasksResponse]
(Int -> ReadS ListTasksResponse)
-> ReadS [ListTasksResponse]
-> ReadPrec ListTasksResponse
-> ReadPrec [ListTasksResponse]
-> Read ListTasksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTasksResponse]
$creadListPrec :: ReadPrec [ListTasksResponse]
readPrec :: ReadPrec ListTasksResponse
$creadPrec :: ReadPrec ListTasksResponse
readList :: ReadS [ListTasksResponse]
$creadList :: ReadS [ListTasksResponse]
readsPrec :: Int -> ReadS ListTasksResponse
$creadsPrec :: Int -> ReadS ListTasksResponse
Prelude.Read, Int -> ListTasksResponse -> ShowS
[ListTasksResponse] -> ShowS
ListTasksResponse -> String
(Int -> ListTasksResponse -> ShowS)
-> (ListTasksResponse -> String)
-> ([ListTasksResponse] -> ShowS)
-> Show ListTasksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTasksResponse] -> ShowS
$cshowList :: [ListTasksResponse] -> ShowS
show :: ListTasksResponse -> String
$cshow :: ListTasksResponse -> String
showsPrec :: Int -> ListTasksResponse -> ShowS
$cshowsPrec :: Int -> ListTasksResponse -> ShowS
Prelude.Show, (forall x. ListTasksResponse -> Rep ListTasksResponse x)
-> (forall x. Rep ListTasksResponse x -> ListTasksResponse)
-> Generic ListTasksResponse
forall x. Rep ListTasksResponse x -> ListTasksResponse
forall x. ListTasksResponse -> Rep ListTasksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTasksResponse x -> ListTasksResponse
$cfrom :: forall x. ListTasksResponse -> Rep ListTasksResponse x
Prelude.Generic)
newListTasksResponse ::
Prelude.Int ->
ListTasksResponse
newListTasksResponse :: Int -> ListTasksResponse
newListTasksResponse Int
pHttpStatus_ =
ListTasksResponse' :: Maybe Text -> Maybe [Text] -> Int -> ListTasksResponse
ListTasksResponse'
{ $sel:nextToken:ListTasksResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:taskArns:ListTasksResponse' :: Maybe [Text]
taskArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListTasksResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listTasksResponse_nextToken :: Lens.Lens' ListTasksResponse (Prelude.Maybe Prelude.Text)
listTasksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTasksResponse -> f ListTasksResponse
listTasksResponse_nextToken = (ListTasksResponse -> Maybe Text)
-> (ListTasksResponse -> Maybe Text -> ListTasksResponse)
-> Lens' ListTasksResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTasksResponse' :: ListTasksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTasksResponse
s@ListTasksResponse' {} Maybe Text
a -> ListTasksResponse
s {$sel:nextToken:ListTasksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTasksResponse)
listTasksResponse_taskArns :: Lens.Lens' ListTasksResponse (Prelude.Maybe [Prelude.Text])
listTasksResponse_taskArns :: (Maybe [Text] -> f (Maybe [Text]))
-> ListTasksResponse -> f ListTasksResponse
listTasksResponse_taskArns = (ListTasksResponse -> Maybe [Text])
-> (ListTasksResponse -> Maybe [Text] -> ListTasksResponse)
-> Lens' ListTasksResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasksResponse' {Maybe [Text]
taskArns :: Maybe [Text]
$sel:taskArns:ListTasksResponse' :: ListTasksResponse -> Maybe [Text]
taskArns} -> Maybe [Text]
taskArns) (\s :: ListTasksResponse
s@ListTasksResponse' {} Maybe [Text]
a -> ListTasksResponse
s {$sel:taskArns:ListTasksResponse' :: Maybe [Text]
taskArns = Maybe [Text]
a} :: ListTasksResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> ListTasksResponse -> f ListTasksResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListTasksResponse
-> f ListTasksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listTasksResponse_httpStatus :: Lens.Lens' ListTasksResponse Prelude.Int
listTasksResponse_httpStatus :: (Int -> f Int) -> ListTasksResponse -> f ListTasksResponse
listTasksResponse_httpStatus = (ListTasksResponse -> Int)
-> (ListTasksResponse -> Int -> ListTasksResponse)
-> Lens ListTasksResponse ListTasksResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTasksResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListTasksResponse' :: ListTasksResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListTasksResponse
s@ListTasksResponse' {} Int
a -> ListTasksResponse
s {$sel:httpStatus:ListTasksResponse' :: Int
httpStatus = Int
a} :: ListTasksResponse)
instance Prelude.NFData ListTasksResponse