{-# 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.ListTaskDefinitions
(
ListTaskDefinitions (..),
newListTaskDefinitions,
listTaskDefinitions_status,
listTaskDefinitions_familyPrefix,
listTaskDefinitions_nextToken,
listTaskDefinitions_sort,
listTaskDefinitions_maxResults,
ListTaskDefinitionsResponse (..),
newListTaskDefinitionsResponse,
listTaskDefinitionsResponse_taskDefinitionArns,
listTaskDefinitionsResponse_nextToken,
listTaskDefinitionsResponse_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 ListTaskDefinitions = ListTaskDefinitions'
{
ListTaskDefinitions -> Maybe TaskDefinitionStatus
status :: Prelude.Maybe TaskDefinitionStatus,
ListTaskDefinitions -> Maybe Text
familyPrefix :: Prelude.Maybe Prelude.Text,
ListTaskDefinitions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTaskDefinitions -> Maybe SortOrder
sort :: Prelude.Maybe SortOrder,
ListTaskDefinitions -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
}
deriving (ListTaskDefinitions -> ListTaskDefinitions -> Bool
(ListTaskDefinitions -> ListTaskDefinitions -> Bool)
-> (ListTaskDefinitions -> ListTaskDefinitions -> Bool)
-> Eq ListTaskDefinitions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTaskDefinitions -> ListTaskDefinitions -> Bool
$c/= :: ListTaskDefinitions -> ListTaskDefinitions -> Bool
== :: ListTaskDefinitions -> ListTaskDefinitions -> Bool
$c== :: ListTaskDefinitions -> ListTaskDefinitions -> Bool
Prelude.Eq, ReadPrec [ListTaskDefinitions]
ReadPrec ListTaskDefinitions
Int -> ReadS ListTaskDefinitions
ReadS [ListTaskDefinitions]
(Int -> ReadS ListTaskDefinitions)
-> ReadS [ListTaskDefinitions]
-> ReadPrec ListTaskDefinitions
-> ReadPrec [ListTaskDefinitions]
-> Read ListTaskDefinitions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTaskDefinitions]
$creadListPrec :: ReadPrec [ListTaskDefinitions]
readPrec :: ReadPrec ListTaskDefinitions
$creadPrec :: ReadPrec ListTaskDefinitions
readList :: ReadS [ListTaskDefinitions]
$creadList :: ReadS [ListTaskDefinitions]
readsPrec :: Int -> ReadS ListTaskDefinitions
$creadsPrec :: Int -> ReadS ListTaskDefinitions
Prelude.Read, Int -> ListTaskDefinitions -> ShowS
[ListTaskDefinitions] -> ShowS
ListTaskDefinitions -> String
(Int -> ListTaskDefinitions -> ShowS)
-> (ListTaskDefinitions -> String)
-> ([ListTaskDefinitions] -> ShowS)
-> Show ListTaskDefinitions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTaskDefinitions] -> ShowS
$cshowList :: [ListTaskDefinitions] -> ShowS
show :: ListTaskDefinitions -> String
$cshow :: ListTaskDefinitions -> String
showsPrec :: Int -> ListTaskDefinitions -> ShowS
$cshowsPrec :: Int -> ListTaskDefinitions -> ShowS
Prelude.Show, (forall x. ListTaskDefinitions -> Rep ListTaskDefinitions x)
-> (forall x. Rep ListTaskDefinitions x -> ListTaskDefinitions)
-> Generic ListTaskDefinitions
forall x. Rep ListTaskDefinitions x -> ListTaskDefinitions
forall x. ListTaskDefinitions -> Rep ListTaskDefinitions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTaskDefinitions x -> ListTaskDefinitions
$cfrom :: forall x. ListTaskDefinitions -> Rep ListTaskDefinitions x
Prelude.Generic)
newListTaskDefinitions ::
ListTaskDefinitions
newListTaskDefinitions :: ListTaskDefinitions
newListTaskDefinitions =
ListTaskDefinitions' :: Maybe TaskDefinitionStatus
-> Maybe Text
-> Maybe Text
-> Maybe SortOrder
-> Maybe Int
-> ListTaskDefinitions
ListTaskDefinitions'
{ $sel:status:ListTaskDefinitions' :: Maybe TaskDefinitionStatus
status = Maybe TaskDefinitionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:familyPrefix:ListTaskDefinitions' :: Maybe Text
familyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListTaskDefinitions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sort:ListTaskDefinitions' :: Maybe SortOrder
sort = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListTaskDefinitions' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
listTaskDefinitions_status :: Lens.Lens' ListTaskDefinitions (Prelude.Maybe TaskDefinitionStatus)
listTaskDefinitions_status :: (Maybe TaskDefinitionStatus -> f (Maybe TaskDefinitionStatus))
-> ListTaskDefinitions -> f ListTaskDefinitions
listTaskDefinitions_status = (ListTaskDefinitions -> Maybe TaskDefinitionStatus)
-> (ListTaskDefinitions
-> Maybe TaskDefinitionStatus -> ListTaskDefinitions)
-> Lens
ListTaskDefinitions
ListTaskDefinitions
(Maybe TaskDefinitionStatus)
(Maybe TaskDefinitionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTaskDefinitions' {Maybe TaskDefinitionStatus
status :: Maybe TaskDefinitionStatus
$sel:status:ListTaskDefinitions' :: ListTaskDefinitions -> Maybe TaskDefinitionStatus
status} -> Maybe TaskDefinitionStatus
status) (\s :: ListTaskDefinitions
s@ListTaskDefinitions' {} Maybe TaskDefinitionStatus
a -> ListTaskDefinitions
s {$sel:status:ListTaskDefinitions' :: Maybe TaskDefinitionStatus
status = Maybe TaskDefinitionStatus
a} :: ListTaskDefinitions)
listTaskDefinitions_familyPrefix :: Lens.Lens' ListTaskDefinitions (Prelude.Maybe Prelude.Text)
listTaskDefinitions_familyPrefix :: (Maybe Text -> f (Maybe Text))
-> ListTaskDefinitions -> f ListTaskDefinitions
listTaskDefinitions_familyPrefix = (ListTaskDefinitions -> Maybe Text)
-> (ListTaskDefinitions -> Maybe Text -> ListTaskDefinitions)
-> Lens
ListTaskDefinitions ListTaskDefinitions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTaskDefinitions' {Maybe Text
familyPrefix :: Maybe Text
$sel:familyPrefix:ListTaskDefinitions' :: ListTaskDefinitions -> Maybe Text
familyPrefix} -> Maybe Text
familyPrefix) (\s :: ListTaskDefinitions
s@ListTaskDefinitions' {} Maybe Text
a -> ListTaskDefinitions
s {$sel:familyPrefix:ListTaskDefinitions' :: Maybe Text
familyPrefix = Maybe Text
a} :: ListTaskDefinitions)
listTaskDefinitions_nextToken :: Lens.Lens' ListTaskDefinitions (Prelude.Maybe Prelude.Text)
listTaskDefinitions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTaskDefinitions -> f ListTaskDefinitions
listTaskDefinitions_nextToken = (ListTaskDefinitions -> Maybe Text)
-> (ListTaskDefinitions -> Maybe Text -> ListTaskDefinitions)
-> Lens
ListTaskDefinitions ListTaskDefinitions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTaskDefinitions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTaskDefinitions' :: ListTaskDefinitions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTaskDefinitions
s@ListTaskDefinitions' {} Maybe Text
a -> ListTaskDefinitions
s {$sel:nextToken:ListTaskDefinitions' :: Maybe Text
nextToken = Maybe Text
a} :: ListTaskDefinitions)
listTaskDefinitions_sort :: Lens.Lens' ListTaskDefinitions (Prelude.Maybe SortOrder)
listTaskDefinitions_sort :: (Maybe SortOrder -> f (Maybe SortOrder))
-> ListTaskDefinitions -> f ListTaskDefinitions
listTaskDefinitions_sort = (ListTaskDefinitions -> Maybe SortOrder)
-> (ListTaskDefinitions -> Maybe SortOrder -> ListTaskDefinitions)
-> Lens
ListTaskDefinitions
ListTaskDefinitions
(Maybe SortOrder)
(Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTaskDefinitions' {Maybe SortOrder
sort :: Maybe SortOrder
$sel:sort:ListTaskDefinitions' :: ListTaskDefinitions -> Maybe SortOrder
sort} -> Maybe SortOrder
sort) (\s :: ListTaskDefinitions
s@ListTaskDefinitions' {} Maybe SortOrder
a -> ListTaskDefinitions
s {$sel:sort:ListTaskDefinitions' :: Maybe SortOrder
sort = Maybe SortOrder
a} :: ListTaskDefinitions)
listTaskDefinitions_maxResults :: Lens.Lens' ListTaskDefinitions (Prelude.Maybe Prelude.Int)
listTaskDefinitions_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListTaskDefinitions -> f ListTaskDefinitions
listTaskDefinitions_maxResults = (ListTaskDefinitions -> Maybe Int)
-> (ListTaskDefinitions -> Maybe Int -> ListTaskDefinitions)
-> Lens
ListTaskDefinitions ListTaskDefinitions (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTaskDefinitions' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListTaskDefinitions' :: ListTaskDefinitions -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListTaskDefinitions
s@ListTaskDefinitions' {} Maybe Int
a -> ListTaskDefinitions
s {$sel:maxResults:ListTaskDefinitions' :: Maybe Int
maxResults = Maybe Int
a} :: ListTaskDefinitions)
instance Core.AWSPager ListTaskDefinitions where
page :: ListTaskDefinitions
-> AWSResponse ListTaskDefinitions -> Maybe ListTaskDefinitions
page ListTaskDefinitions
rq AWSResponse ListTaskDefinitions
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTaskDefinitions
ListTaskDefinitionsResponse
rs
ListTaskDefinitionsResponse
-> Getting (First Text) ListTaskDefinitionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTaskDefinitionsResponse
-> Const (First Text) ListTaskDefinitionsResponse
Lens' ListTaskDefinitionsResponse (Maybe Text)
listTaskDefinitionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTaskDefinitionsResponse
-> Const (First Text) ListTaskDefinitionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTaskDefinitionsResponse 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 ListTaskDefinitions
forall a. Maybe a
Prelude.Nothing
| Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTaskDefinitions
ListTaskDefinitionsResponse
rs
ListTaskDefinitionsResponse
-> Getting (First [Text]) ListTaskDefinitionsResponse [Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListTaskDefinitionsResponse
-> Const (First [Text]) ListTaskDefinitionsResponse
Lens' ListTaskDefinitionsResponse (Maybe [Text])
listTaskDefinitionsResponse_taskDefinitionArns
((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListTaskDefinitionsResponse
-> Const (First [Text]) ListTaskDefinitionsResponse)
-> (([Text] -> Const (First [Text]) [Text])
-> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting (First [Text]) ListTaskDefinitionsResponse [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 ListTaskDefinitions
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListTaskDefinitions -> Maybe ListTaskDefinitions
forall a. a -> Maybe a
Prelude.Just (ListTaskDefinitions -> Maybe ListTaskDefinitions)
-> ListTaskDefinitions -> Maybe ListTaskDefinitions
forall a b. (a -> b) -> a -> b
Prelude.$
ListTaskDefinitions
rq
ListTaskDefinitions
-> (ListTaskDefinitions -> ListTaskDefinitions)
-> ListTaskDefinitions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListTaskDefinitions -> Identity ListTaskDefinitions
Lens
ListTaskDefinitions ListTaskDefinitions (Maybe Text) (Maybe Text)
listTaskDefinitions_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListTaskDefinitions -> Identity ListTaskDefinitions)
-> Maybe Text -> ListTaskDefinitions -> ListTaskDefinitions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTaskDefinitions
ListTaskDefinitionsResponse
rs
ListTaskDefinitionsResponse
-> Getting (First Text) ListTaskDefinitionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTaskDefinitionsResponse
-> Const (First Text) ListTaskDefinitionsResponse
Lens' ListTaskDefinitionsResponse (Maybe Text)
listTaskDefinitionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTaskDefinitionsResponse
-> Const (First Text) ListTaskDefinitionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTaskDefinitionsResponse 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 ListTaskDefinitions where
type
AWSResponse ListTaskDefinitions =
ListTaskDefinitionsResponse
request :: ListTaskDefinitions -> Request ListTaskDefinitions
request = Service -> ListTaskDefinitions -> Request ListTaskDefinitions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListTaskDefinitions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListTaskDefinitions)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListTaskDefinitions))
-> Logger
-> Service
-> Proxy ListTaskDefinitions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListTaskDefinitions)))
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 -> ListTaskDefinitionsResponse
ListTaskDefinitionsResponse'
(Maybe [Text] -> Maybe Text -> Int -> ListTaskDefinitionsResponse)
-> Either String (Maybe [Text])
-> Either String (Maybe Text -> Int -> ListTaskDefinitionsResponse)
forall (f :: * -> *) a b. Functor 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
"taskDefinitionArns"
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 (Maybe Text -> Int -> ListTaskDefinitionsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListTaskDefinitionsResponse)
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 -> ListTaskDefinitionsResponse)
-> Either String Int -> Either String ListTaskDefinitionsResponse
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 ListTaskDefinitions
instance Prelude.NFData ListTaskDefinitions
instance Core.ToHeaders ListTaskDefinitions where
toHeaders :: ListTaskDefinitions -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListTaskDefinitions -> 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.ListTaskDefinitions" ::
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 ListTaskDefinitions where
toJSON :: ListTaskDefinitions -> Value
toJSON ListTaskDefinitions' {Maybe Int
Maybe Text
Maybe SortOrder
Maybe TaskDefinitionStatus
maxResults :: Maybe Int
sort :: Maybe SortOrder
nextToken :: Maybe Text
familyPrefix :: Maybe Text
status :: Maybe TaskDefinitionStatus
$sel:maxResults:ListTaskDefinitions' :: ListTaskDefinitions -> Maybe Int
$sel:sort:ListTaskDefinitions' :: ListTaskDefinitions -> Maybe SortOrder
$sel:nextToken:ListTaskDefinitions' :: ListTaskDefinitions -> Maybe Text
$sel:familyPrefix:ListTaskDefinitions' :: ListTaskDefinitions -> Maybe Text
$sel:status:ListTaskDefinitions' :: ListTaskDefinitions -> Maybe TaskDefinitionStatus
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"status" Text -> TaskDefinitionStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TaskDefinitionStatus -> Pair)
-> Maybe TaskDefinitionStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TaskDefinitionStatus
status,
(Text
"familyPrefix" 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
familyPrefix,
(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
"sort" Text -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sort,
(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 ListTaskDefinitions where
toPath :: ListTaskDefinitions -> ByteString
toPath = ByteString -> ListTaskDefinitions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListTaskDefinitions where
toQuery :: ListTaskDefinitions -> QueryString
toQuery = QueryString -> ListTaskDefinitions -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListTaskDefinitionsResponse = ListTaskDefinitionsResponse'
{
ListTaskDefinitionsResponse -> Maybe [Text]
taskDefinitionArns :: Prelude.Maybe [Prelude.Text],
ListTaskDefinitionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTaskDefinitionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListTaskDefinitionsResponse -> ListTaskDefinitionsResponse -> Bool
(ListTaskDefinitionsResponse
-> ListTaskDefinitionsResponse -> Bool)
-> (ListTaskDefinitionsResponse
-> ListTaskDefinitionsResponse -> Bool)
-> Eq ListTaskDefinitionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTaskDefinitionsResponse -> ListTaskDefinitionsResponse -> Bool
$c/= :: ListTaskDefinitionsResponse -> ListTaskDefinitionsResponse -> Bool
== :: ListTaskDefinitionsResponse -> ListTaskDefinitionsResponse -> Bool
$c== :: ListTaskDefinitionsResponse -> ListTaskDefinitionsResponse -> Bool
Prelude.Eq, ReadPrec [ListTaskDefinitionsResponse]
ReadPrec ListTaskDefinitionsResponse
Int -> ReadS ListTaskDefinitionsResponse
ReadS [ListTaskDefinitionsResponse]
(Int -> ReadS ListTaskDefinitionsResponse)
-> ReadS [ListTaskDefinitionsResponse]
-> ReadPrec ListTaskDefinitionsResponse
-> ReadPrec [ListTaskDefinitionsResponse]
-> Read ListTaskDefinitionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTaskDefinitionsResponse]
$creadListPrec :: ReadPrec [ListTaskDefinitionsResponse]
readPrec :: ReadPrec ListTaskDefinitionsResponse
$creadPrec :: ReadPrec ListTaskDefinitionsResponse
readList :: ReadS [ListTaskDefinitionsResponse]
$creadList :: ReadS [ListTaskDefinitionsResponse]
readsPrec :: Int -> ReadS ListTaskDefinitionsResponse
$creadsPrec :: Int -> ReadS ListTaskDefinitionsResponse
Prelude.Read, Int -> ListTaskDefinitionsResponse -> ShowS
[ListTaskDefinitionsResponse] -> ShowS
ListTaskDefinitionsResponse -> String
(Int -> ListTaskDefinitionsResponse -> ShowS)
-> (ListTaskDefinitionsResponse -> String)
-> ([ListTaskDefinitionsResponse] -> ShowS)
-> Show ListTaskDefinitionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTaskDefinitionsResponse] -> ShowS
$cshowList :: [ListTaskDefinitionsResponse] -> ShowS
show :: ListTaskDefinitionsResponse -> String
$cshow :: ListTaskDefinitionsResponse -> String
showsPrec :: Int -> ListTaskDefinitionsResponse -> ShowS
$cshowsPrec :: Int -> ListTaskDefinitionsResponse -> ShowS
Prelude.Show, (forall x.
ListTaskDefinitionsResponse -> Rep ListTaskDefinitionsResponse x)
-> (forall x.
Rep ListTaskDefinitionsResponse x -> ListTaskDefinitionsResponse)
-> Generic ListTaskDefinitionsResponse
forall x.
Rep ListTaskDefinitionsResponse x -> ListTaskDefinitionsResponse
forall x.
ListTaskDefinitionsResponse -> Rep ListTaskDefinitionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTaskDefinitionsResponse x -> ListTaskDefinitionsResponse
$cfrom :: forall x.
ListTaskDefinitionsResponse -> Rep ListTaskDefinitionsResponse x
Prelude.Generic)
newListTaskDefinitionsResponse ::
Prelude.Int ->
ListTaskDefinitionsResponse
newListTaskDefinitionsResponse :: Int -> ListTaskDefinitionsResponse
newListTaskDefinitionsResponse Int
pHttpStatus_ =
ListTaskDefinitionsResponse' :: Maybe [Text] -> Maybe Text -> Int -> ListTaskDefinitionsResponse
ListTaskDefinitionsResponse'
{ $sel:taskDefinitionArns:ListTaskDefinitionsResponse' :: Maybe [Text]
taskDefinitionArns =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListTaskDefinitionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListTaskDefinitionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listTaskDefinitionsResponse_taskDefinitionArns :: Lens.Lens' ListTaskDefinitionsResponse (Prelude.Maybe [Prelude.Text])
listTaskDefinitionsResponse_taskDefinitionArns :: (Maybe [Text] -> f (Maybe [Text]))
-> ListTaskDefinitionsResponse -> f ListTaskDefinitionsResponse
listTaskDefinitionsResponse_taskDefinitionArns = (ListTaskDefinitionsResponse -> Maybe [Text])
-> (ListTaskDefinitionsResponse
-> Maybe [Text] -> ListTaskDefinitionsResponse)
-> Lens' ListTaskDefinitionsResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTaskDefinitionsResponse' {Maybe [Text]
taskDefinitionArns :: Maybe [Text]
$sel:taskDefinitionArns:ListTaskDefinitionsResponse' :: ListTaskDefinitionsResponse -> Maybe [Text]
taskDefinitionArns} -> Maybe [Text]
taskDefinitionArns) (\s :: ListTaskDefinitionsResponse
s@ListTaskDefinitionsResponse' {} Maybe [Text]
a -> ListTaskDefinitionsResponse
s {$sel:taskDefinitionArns:ListTaskDefinitionsResponse' :: Maybe [Text]
taskDefinitionArns = Maybe [Text]
a} :: ListTaskDefinitionsResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> ListTaskDefinitionsResponse -> f ListTaskDefinitionsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListTaskDefinitionsResponse
-> f ListTaskDefinitionsResponse
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
listTaskDefinitionsResponse_nextToken :: Lens.Lens' ListTaskDefinitionsResponse (Prelude.Maybe Prelude.Text)
listTaskDefinitionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTaskDefinitionsResponse -> f ListTaskDefinitionsResponse
listTaskDefinitionsResponse_nextToken = (ListTaskDefinitionsResponse -> Maybe Text)
-> (ListTaskDefinitionsResponse
-> Maybe Text -> ListTaskDefinitionsResponse)
-> Lens' ListTaskDefinitionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTaskDefinitionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTaskDefinitionsResponse' :: ListTaskDefinitionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTaskDefinitionsResponse
s@ListTaskDefinitionsResponse' {} Maybe Text
a -> ListTaskDefinitionsResponse
s {$sel:nextToken:ListTaskDefinitionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTaskDefinitionsResponse)
listTaskDefinitionsResponse_httpStatus :: Lens.Lens' ListTaskDefinitionsResponse Prelude.Int
listTaskDefinitionsResponse_httpStatus :: (Int -> f Int)
-> ListTaskDefinitionsResponse -> f ListTaskDefinitionsResponse
listTaskDefinitionsResponse_httpStatus = (ListTaskDefinitionsResponse -> Int)
-> (ListTaskDefinitionsResponse
-> Int -> ListTaskDefinitionsResponse)
-> Lens
ListTaskDefinitionsResponse ListTaskDefinitionsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTaskDefinitionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListTaskDefinitionsResponse' :: ListTaskDefinitionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListTaskDefinitionsResponse
s@ListTaskDefinitionsResponse' {} Int
a -> ListTaskDefinitionsResponse
s {$sel:httpStatus:ListTaskDefinitionsResponse' :: Int
httpStatus = Int
a} :: ListTaskDefinitionsResponse)
instance Prelude.NFData ListTaskDefinitionsResponse