{-# 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.SageMaker.ListWorkforces
(
ListWorkforces (..),
newListWorkforces,
listWorkforces_nameContains,
listWorkforces_nextToken,
listWorkforces_sortOrder,
listWorkforces_maxResults,
listWorkforces_sortBy,
ListWorkforcesResponse (..),
newListWorkforcesResponse,
listWorkforcesResponse_nextToken,
listWorkforcesResponse_httpStatus,
listWorkforcesResponse_workforces,
)
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.SageMaker.Types
data ListWorkforces = ListWorkforces'
{
ListWorkforces -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
ListWorkforces -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListWorkforces -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
ListWorkforces -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListWorkforces -> Maybe ListWorkforcesSortByOptions
sortBy :: Prelude.Maybe ListWorkforcesSortByOptions
}
deriving (ListWorkforces -> ListWorkforces -> Bool
(ListWorkforces -> ListWorkforces -> Bool)
-> (ListWorkforces -> ListWorkforces -> Bool) -> Eq ListWorkforces
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWorkforces -> ListWorkforces -> Bool
$c/= :: ListWorkforces -> ListWorkforces -> Bool
== :: ListWorkforces -> ListWorkforces -> Bool
$c== :: ListWorkforces -> ListWorkforces -> Bool
Prelude.Eq, ReadPrec [ListWorkforces]
ReadPrec ListWorkforces
Int -> ReadS ListWorkforces
ReadS [ListWorkforces]
(Int -> ReadS ListWorkforces)
-> ReadS [ListWorkforces]
-> ReadPrec ListWorkforces
-> ReadPrec [ListWorkforces]
-> Read ListWorkforces
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWorkforces]
$creadListPrec :: ReadPrec [ListWorkforces]
readPrec :: ReadPrec ListWorkforces
$creadPrec :: ReadPrec ListWorkforces
readList :: ReadS [ListWorkforces]
$creadList :: ReadS [ListWorkforces]
readsPrec :: Int -> ReadS ListWorkforces
$creadsPrec :: Int -> ReadS ListWorkforces
Prelude.Read, Int -> ListWorkforces -> ShowS
[ListWorkforces] -> ShowS
ListWorkforces -> String
(Int -> ListWorkforces -> ShowS)
-> (ListWorkforces -> String)
-> ([ListWorkforces] -> ShowS)
-> Show ListWorkforces
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWorkforces] -> ShowS
$cshowList :: [ListWorkforces] -> ShowS
show :: ListWorkforces -> String
$cshow :: ListWorkforces -> String
showsPrec :: Int -> ListWorkforces -> ShowS
$cshowsPrec :: Int -> ListWorkforces -> ShowS
Prelude.Show, (forall x. ListWorkforces -> Rep ListWorkforces x)
-> (forall x. Rep ListWorkforces x -> ListWorkforces)
-> Generic ListWorkforces
forall x. Rep ListWorkforces x -> ListWorkforces
forall x. ListWorkforces -> Rep ListWorkforces x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListWorkforces x -> ListWorkforces
$cfrom :: forall x. ListWorkforces -> Rep ListWorkforces x
Prelude.Generic)
newListWorkforces ::
ListWorkforces
newListWorkforces :: ListWorkforces
newListWorkforces =
ListWorkforces' :: Maybe Text
-> Maybe Text
-> Maybe SortOrder
-> Maybe Natural
-> Maybe ListWorkforcesSortByOptions
-> ListWorkforces
ListWorkforces'
{ $sel:nameContains:ListWorkforces' :: Maybe Text
nameContains = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListWorkforces' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:ListWorkforces' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListWorkforces' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:ListWorkforces' :: Maybe ListWorkforcesSortByOptions
sortBy = Maybe ListWorkforcesSortByOptions
forall a. Maybe a
Prelude.Nothing
}
listWorkforces_nameContains :: Lens.Lens' ListWorkforces (Prelude.Maybe Prelude.Text)
listWorkforces_nameContains :: (Maybe Text -> f (Maybe Text))
-> ListWorkforces -> f ListWorkforces
listWorkforces_nameContains = (ListWorkforces -> Maybe Text)
-> (ListWorkforces -> Maybe Text -> ListWorkforces)
-> Lens ListWorkforces ListWorkforces (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkforces' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListWorkforces' :: ListWorkforces -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListWorkforces
s@ListWorkforces' {} Maybe Text
a -> ListWorkforces
s {$sel:nameContains:ListWorkforces' :: Maybe Text
nameContains = Maybe Text
a} :: ListWorkforces)
listWorkforces_nextToken :: Lens.Lens' ListWorkforces (Prelude.Maybe Prelude.Text)
listWorkforces_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListWorkforces -> f ListWorkforces
listWorkforces_nextToken = (ListWorkforces -> Maybe Text)
-> (ListWorkforces -> Maybe Text -> ListWorkforces)
-> Lens ListWorkforces ListWorkforces (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkforces' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListWorkforces' :: ListWorkforces -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListWorkforces
s@ListWorkforces' {} Maybe Text
a -> ListWorkforces
s {$sel:nextToken:ListWorkforces' :: Maybe Text
nextToken = Maybe Text
a} :: ListWorkforces)
listWorkforces_sortOrder :: Lens.Lens' ListWorkforces (Prelude.Maybe SortOrder)
listWorkforces_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> ListWorkforces -> f ListWorkforces
listWorkforces_sortOrder = (ListWorkforces -> Maybe SortOrder)
-> (ListWorkforces -> Maybe SortOrder -> ListWorkforces)
-> Lens
ListWorkforces ListWorkforces (Maybe SortOrder) (Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkforces' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListWorkforces' :: ListWorkforces -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListWorkforces
s@ListWorkforces' {} Maybe SortOrder
a -> ListWorkforces
s {$sel:sortOrder:ListWorkforces' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListWorkforces)
listWorkforces_maxResults :: Lens.Lens' ListWorkforces (Prelude.Maybe Prelude.Natural)
listWorkforces_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListWorkforces -> f ListWorkforces
listWorkforces_maxResults = (ListWorkforces -> Maybe Natural)
-> (ListWorkforces -> Maybe Natural -> ListWorkforces)
-> Lens
ListWorkforces ListWorkforces (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkforces' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListWorkforces' :: ListWorkforces -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListWorkforces
s@ListWorkforces' {} Maybe Natural
a -> ListWorkforces
s {$sel:maxResults:ListWorkforces' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListWorkforces)
listWorkforces_sortBy :: Lens.Lens' ListWorkforces (Prelude.Maybe ListWorkforcesSortByOptions)
listWorkforces_sortBy :: (Maybe ListWorkforcesSortByOptions
-> f (Maybe ListWorkforcesSortByOptions))
-> ListWorkforces -> f ListWorkforces
listWorkforces_sortBy = (ListWorkforces -> Maybe ListWorkforcesSortByOptions)
-> (ListWorkforces
-> Maybe ListWorkforcesSortByOptions -> ListWorkforces)
-> Lens
ListWorkforces
ListWorkforces
(Maybe ListWorkforcesSortByOptions)
(Maybe ListWorkforcesSortByOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkforces' {Maybe ListWorkforcesSortByOptions
sortBy :: Maybe ListWorkforcesSortByOptions
$sel:sortBy:ListWorkforces' :: ListWorkforces -> Maybe ListWorkforcesSortByOptions
sortBy} -> Maybe ListWorkforcesSortByOptions
sortBy) (\s :: ListWorkforces
s@ListWorkforces' {} Maybe ListWorkforcesSortByOptions
a -> ListWorkforces
s {$sel:sortBy:ListWorkforces' :: Maybe ListWorkforcesSortByOptions
sortBy = Maybe ListWorkforcesSortByOptions
a} :: ListWorkforces)
instance Core.AWSPager ListWorkforces where
page :: ListWorkforces
-> AWSResponse ListWorkforces -> Maybe ListWorkforces
page ListWorkforces
rq AWSResponse ListWorkforces
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListWorkforces
ListWorkforcesResponse
rs
ListWorkforcesResponse
-> Getting (First Text) ListWorkforcesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListWorkforcesResponse
-> Const (First Text) ListWorkforcesResponse
Lens' ListWorkforcesResponse (Maybe Text)
listWorkforcesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListWorkforcesResponse
-> Const (First Text) ListWorkforcesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListWorkforcesResponse 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 ListWorkforces
forall a. Maybe a
Prelude.Nothing
| [Workforce] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
(AWSResponse ListWorkforces
ListWorkforcesResponse
rs ListWorkforcesResponse
-> Getting [Workforce] ListWorkforcesResponse [Workforce]
-> [Workforce]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [Workforce] ListWorkforcesResponse [Workforce]
Lens' ListWorkforcesResponse [Workforce]
listWorkforcesResponse_workforces) =
Maybe ListWorkforces
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListWorkforces -> Maybe ListWorkforces
forall a. a -> Maybe a
Prelude.Just (ListWorkforces -> Maybe ListWorkforces)
-> ListWorkforces -> Maybe ListWorkforces
forall a b. (a -> b) -> a -> b
Prelude.$
ListWorkforces
rq
ListWorkforces
-> (ListWorkforces -> ListWorkforces) -> ListWorkforces
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListWorkforces -> Identity ListWorkforces
Lens ListWorkforces ListWorkforces (Maybe Text) (Maybe Text)
listWorkforces_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListWorkforces -> Identity ListWorkforces)
-> Maybe Text -> ListWorkforces -> ListWorkforces
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListWorkforces
ListWorkforcesResponse
rs
ListWorkforcesResponse
-> Getting (First Text) ListWorkforcesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListWorkforcesResponse
-> Const (First Text) ListWorkforcesResponse
Lens' ListWorkforcesResponse (Maybe Text)
listWorkforcesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListWorkforcesResponse
-> Const (First Text) ListWorkforcesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListWorkforcesResponse 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 ListWorkforces where
type
AWSResponse ListWorkforces =
ListWorkforcesResponse
request :: ListWorkforces -> Request ListWorkforces
request = Service -> ListWorkforces -> Request ListWorkforces
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListWorkforces
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListWorkforces)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListWorkforces))
-> Logger
-> Service
-> Proxy ListWorkforces
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListWorkforces)))
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 -> Int -> [Workforce] -> ListWorkforcesResponse
ListWorkforcesResponse'
(Maybe Text -> Int -> [Workforce] -> ListWorkforcesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [Workforce] -> ListWorkforcesResponse)
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 (Int -> [Workforce] -> ListWorkforcesResponse)
-> Either String Int
-> Either String ([Workforce] -> ListWorkforcesResponse)
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))
Either String ([Workforce] -> ListWorkforcesResponse)
-> Either String [Workforce]
-> Either String ListWorkforcesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [Workforce])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Workforces" Either String (Maybe [Workforce])
-> [Workforce] -> Either String [Workforce]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Workforce]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ListWorkforces
instance Prelude.NFData ListWorkforces
instance Core.ToHeaders ListWorkforces where
toHeaders :: ListWorkforces -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListWorkforces -> 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
"SageMaker.ListWorkforces" :: 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 ListWorkforces where
toJSON :: ListWorkforces -> Value
toJSON ListWorkforces' {Maybe Natural
Maybe Text
Maybe ListWorkforcesSortByOptions
Maybe SortOrder
sortBy :: Maybe ListWorkforcesSortByOptions
maxResults :: Maybe Natural
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
nameContains :: Maybe Text
$sel:sortBy:ListWorkforces' :: ListWorkforces -> Maybe ListWorkforcesSortByOptions
$sel:maxResults:ListWorkforces' :: ListWorkforces -> Maybe Natural
$sel:sortOrder:ListWorkforces' :: ListWorkforces -> Maybe SortOrder
$sel:nextToken:ListWorkforces' :: ListWorkforces -> Maybe Text
$sel:nameContains:ListWorkforces' :: ListWorkforces -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NameContains" 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
nameContains,
(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
"SortOrder" 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
sortOrder,
(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,
(Text
"SortBy" Text -> ListWorkforcesSortByOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ListWorkforcesSortByOptions -> Pair)
-> Maybe ListWorkforcesSortByOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ListWorkforcesSortByOptions
sortBy
]
)
instance Core.ToPath ListWorkforces where
toPath :: ListWorkforces -> ByteString
toPath = ByteString -> ListWorkforces -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListWorkforces where
toQuery :: ListWorkforces -> QueryString
toQuery = QueryString -> ListWorkforces -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListWorkforcesResponse = ListWorkforcesResponse'
{
ListWorkforcesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListWorkforcesResponse -> Int
httpStatus :: Prelude.Int,
ListWorkforcesResponse -> [Workforce]
workforces :: [Workforce]
}
deriving (ListWorkforcesResponse -> ListWorkforcesResponse -> Bool
(ListWorkforcesResponse -> ListWorkforcesResponse -> Bool)
-> (ListWorkforcesResponse -> ListWorkforcesResponse -> Bool)
-> Eq ListWorkforcesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWorkforcesResponse -> ListWorkforcesResponse -> Bool
$c/= :: ListWorkforcesResponse -> ListWorkforcesResponse -> Bool
== :: ListWorkforcesResponse -> ListWorkforcesResponse -> Bool
$c== :: ListWorkforcesResponse -> ListWorkforcesResponse -> Bool
Prelude.Eq, ReadPrec [ListWorkforcesResponse]
ReadPrec ListWorkforcesResponse
Int -> ReadS ListWorkforcesResponse
ReadS [ListWorkforcesResponse]
(Int -> ReadS ListWorkforcesResponse)
-> ReadS [ListWorkforcesResponse]
-> ReadPrec ListWorkforcesResponse
-> ReadPrec [ListWorkforcesResponse]
-> Read ListWorkforcesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWorkforcesResponse]
$creadListPrec :: ReadPrec [ListWorkforcesResponse]
readPrec :: ReadPrec ListWorkforcesResponse
$creadPrec :: ReadPrec ListWorkforcesResponse
readList :: ReadS [ListWorkforcesResponse]
$creadList :: ReadS [ListWorkforcesResponse]
readsPrec :: Int -> ReadS ListWorkforcesResponse
$creadsPrec :: Int -> ReadS ListWorkforcesResponse
Prelude.Read, Int -> ListWorkforcesResponse -> ShowS
[ListWorkforcesResponse] -> ShowS
ListWorkforcesResponse -> String
(Int -> ListWorkforcesResponse -> ShowS)
-> (ListWorkforcesResponse -> String)
-> ([ListWorkforcesResponse] -> ShowS)
-> Show ListWorkforcesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWorkforcesResponse] -> ShowS
$cshowList :: [ListWorkforcesResponse] -> ShowS
show :: ListWorkforcesResponse -> String
$cshow :: ListWorkforcesResponse -> String
showsPrec :: Int -> ListWorkforcesResponse -> ShowS
$cshowsPrec :: Int -> ListWorkforcesResponse -> ShowS
Prelude.Show, (forall x. ListWorkforcesResponse -> Rep ListWorkforcesResponse x)
-> (forall x.
Rep ListWorkforcesResponse x -> ListWorkforcesResponse)
-> Generic ListWorkforcesResponse
forall x. Rep ListWorkforcesResponse x -> ListWorkforcesResponse
forall x. ListWorkforcesResponse -> Rep ListWorkforcesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListWorkforcesResponse x -> ListWorkforcesResponse
$cfrom :: forall x. ListWorkforcesResponse -> Rep ListWorkforcesResponse x
Prelude.Generic)
newListWorkforcesResponse ::
Prelude.Int ->
ListWorkforcesResponse
newListWorkforcesResponse :: Int -> ListWorkforcesResponse
newListWorkforcesResponse Int
pHttpStatus_ =
ListWorkforcesResponse' :: Maybe Text -> Int -> [Workforce] -> ListWorkforcesResponse
ListWorkforcesResponse'
{ $sel:nextToken:ListWorkforcesResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListWorkforcesResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:workforces:ListWorkforcesResponse' :: [Workforce]
workforces = [Workforce]
forall a. Monoid a => a
Prelude.mempty
}
listWorkforcesResponse_nextToken :: Lens.Lens' ListWorkforcesResponse (Prelude.Maybe Prelude.Text)
listWorkforcesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListWorkforcesResponse -> f ListWorkforcesResponse
listWorkforcesResponse_nextToken = (ListWorkforcesResponse -> Maybe Text)
-> (ListWorkforcesResponse -> Maybe Text -> ListWorkforcesResponse)
-> Lens' ListWorkforcesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkforcesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListWorkforcesResponse' :: ListWorkforcesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListWorkforcesResponse
s@ListWorkforcesResponse' {} Maybe Text
a -> ListWorkforcesResponse
s {$sel:nextToken:ListWorkforcesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListWorkforcesResponse)
listWorkforcesResponse_httpStatus :: Lens.Lens' ListWorkforcesResponse Prelude.Int
listWorkforcesResponse_httpStatus :: (Int -> f Int)
-> ListWorkforcesResponse -> f ListWorkforcesResponse
listWorkforcesResponse_httpStatus = (ListWorkforcesResponse -> Int)
-> (ListWorkforcesResponse -> Int -> ListWorkforcesResponse)
-> Lens ListWorkforcesResponse ListWorkforcesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkforcesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListWorkforcesResponse' :: ListWorkforcesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListWorkforcesResponse
s@ListWorkforcesResponse' {} Int
a -> ListWorkforcesResponse
s {$sel:httpStatus:ListWorkforcesResponse' :: Int
httpStatus = Int
a} :: ListWorkforcesResponse)
listWorkforcesResponse_workforces :: Lens.Lens' ListWorkforcesResponse [Workforce]
listWorkforcesResponse_workforces :: ([Workforce] -> f [Workforce])
-> ListWorkforcesResponse -> f ListWorkforcesResponse
listWorkforcesResponse_workforces = (ListWorkforcesResponse -> [Workforce])
-> (ListWorkforcesResponse
-> [Workforce] -> ListWorkforcesResponse)
-> Lens' ListWorkforcesResponse [Workforce]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorkforcesResponse' {[Workforce]
workforces :: [Workforce]
$sel:workforces:ListWorkforcesResponse' :: ListWorkforcesResponse -> [Workforce]
workforces} -> [Workforce]
workforces) (\s :: ListWorkforcesResponse
s@ListWorkforcesResponse' {} [Workforce]
a -> ListWorkforcesResponse
s {$sel:workforces:ListWorkforcesResponse' :: [Workforce]
workforces = [Workforce]
a} :: ListWorkforcesResponse) (([Workforce] -> f [Workforce])
-> ListWorkforcesResponse -> f ListWorkforcesResponse)
-> (([Workforce] -> f [Workforce]) -> [Workforce] -> f [Workforce])
-> ([Workforce] -> f [Workforce])
-> ListWorkforcesResponse
-> f ListWorkforcesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Workforce] -> f [Workforce]) -> [Workforce] -> f [Workforce]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData ListWorkforcesResponse