{-# 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.WorkSpaces.DescribeWorkspaceDirectories
(
DescribeWorkspaceDirectories (..),
newDescribeWorkspaceDirectories,
describeWorkspaceDirectories_nextToken,
describeWorkspaceDirectories_directoryIds,
describeWorkspaceDirectories_limit,
DescribeWorkspaceDirectoriesResponse (..),
newDescribeWorkspaceDirectoriesResponse,
describeWorkspaceDirectoriesResponse_directories,
describeWorkspaceDirectoriesResponse_nextToken,
describeWorkspaceDirectoriesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WorkSpaces.Types
data DescribeWorkspaceDirectories = DescribeWorkspaceDirectories'
{
DescribeWorkspaceDirectories -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeWorkspaceDirectories -> Maybe (NonEmpty Text)
directoryIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
DescribeWorkspaceDirectories -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural
}
deriving (DescribeWorkspaceDirectories
-> DescribeWorkspaceDirectories -> Bool
(DescribeWorkspaceDirectories
-> DescribeWorkspaceDirectories -> Bool)
-> (DescribeWorkspaceDirectories
-> DescribeWorkspaceDirectories -> Bool)
-> Eq DescribeWorkspaceDirectories
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWorkspaceDirectories
-> DescribeWorkspaceDirectories -> Bool
$c/= :: DescribeWorkspaceDirectories
-> DescribeWorkspaceDirectories -> Bool
== :: DescribeWorkspaceDirectories
-> DescribeWorkspaceDirectories -> Bool
$c== :: DescribeWorkspaceDirectories
-> DescribeWorkspaceDirectories -> Bool
Prelude.Eq, ReadPrec [DescribeWorkspaceDirectories]
ReadPrec DescribeWorkspaceDirectories
Int -> ReadS DescribeWorkspaceDirectories
ReadS [DescribeWorkspaceDirectories]
(Int -> ReadS DescribeWorkspaceDirectories)
-> ReadS [DescribeWorkspaceDirectories]
-> ReadPrec DescribeWorkspaceDirectories
-> ReadPrec [DescribeWorkspaceDirectories]
-> Read DescribeWorkspaceDirectories
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWorkspaceDirectories]
$creadListPrec :: ReadPrec [DescribeWorkspaceDirectories]
readPrec :: ReadPrec DescribeWorkspaceDirectories
$creadPrec :: ReadPrec DescribeWorkspaceDirectories
readList :: ReadS [DescribeWorkspaceDirectories]
$creadList :: ReadS [DescribeWorkspaceDirectories]
readsPrec :: Int -> ReadS DescribeWorkspaceDirectories
$creadsPrec :: Int -> ReadS DescribeWorkspaceDirectories
Prelude.Read, Int -> DescribeWorkspaceDirectories -> ShowS
[DescribeWorkspaceDirectories] -> ShowS
DescribeWorkspaceDirectories -> String
(Int -> DescribeWorkspaceDirectories -> ShowS)
-> (DescribeWorkspaceDirectories -> String)
-> ([DescribeWorkspaceDirectories] -> ShowS)
-> Show DescribeWorkspaceDirectories
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWorkspaceDirectories] -> ShowS
$cshowList :: [DescribeWorkspaceDirectories] -> ShowS
show :: DescribeWorkspaceDirectories -> String
$cshow :: DescribeWorkspaceDirectories -> String
showsPrec :: Int -> DescribeWorkspaceDirectories -> ShowS
$cshowsPrec :: Int -> DescribeWorkspaceDirectories -> ShowS
Prelude.Show, (forall x.
DescribeWorkspaceDirectories -> Rep DescribeWorkspaceDirectories x)
-> (forall x.
Rep DescribeWorkspaceDirectories x -> DescribeWorkspaceDirectories)
-> Generic DescribeWorkspaceDirectories
forall x.
Rep DescribeWorkspaceDirectories x -> DescribeWorkspaceDirectories
forall x.
DescribeWorkspaceDirectories -> Rep DescribeWorkspaceDirectories x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWorkspaceDirectories x -> DescribeWorkspaceDirectories
$cfrom :: forall x.
DescribeWorkspaceDirectories -> Rep DescribeWorkspaceDirectories x
Prelude.Generic)
newDescribeWorkspaceDirectories ::
DescribeWorkspaceDirectories
newDescribeWorkspaceDirectories :: DescribeWorkspaceDirectories
newDescribeWorkspaceDirectories =
DescribeWorkspaceDirectories' :: Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Natural
-> DescribeWorkspaceDirectories
DescribeWorkspaceDirectories'
{ $sel:nextToken:DescribeWorkspaceDirectories' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:directoryIds:DescribeWorkspaceDirectories' :: Maybe (NonEmpty Text)
directoryIds = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeWorkspaceDirectories' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
describeWorkspaceDirectories_nextToken :: Lens.Lens' DescribeWorkspaceDirectories (Prelude.Maybe Prelude.Text)
describeWorkspaceDirectories_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeWorkspaceDirectories -> f DescribeWorkspaceDirectories
describeWorkspaceDirectories_nextToken = (DescribeWorkspaceDirectories -> Maybe Text)
-> (DescribeWorkspaceDirectories
-> Maybe Text -> DescribeWorkspaceDirectories)
-> Lens
DescribeWorkspaceDirectories
DescribeWorkspaceDirectories
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkspaceDirectories' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeWorkspaceDirectories' :: DescribeWorkspaceDirectories -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeWorkspaceDirectories
s@DescribeWorkspaceDirectories' {} Maybe Text
a -> DescribeWorkspaceDirectories
s {$sel:nextToken:DescribeWorkspaceDirectories' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeWorkspaceDirectories)
describeWorkspaceDirectories_directoryIds :: Lens.Lens' DescribeWorkspaceDirectories (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
describeWorkspaceDirectories_directoryIds :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeWorkspaceDirectories -> f DescribeWorkspaceDirectories
describeWorkspaceDirectories_directoryIds = (DescribeWorkspaceDirectories -> Maybe (NonEmpty Text))
-> (DescribeWorkspaceDirectories
-> Maybe (NonEmpty Text) -> DescribeWorkspaceDirectories)
-> Lens
DescribeWorkspaceDirectories
DescribeWorkspaceDirectories
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkspaceDirectories' {Maybe (NonEmpty Text)
directoryIds :: Maybe (NonEmpty Text)
$sel:directoryIds:DescribeWorkspaceDirectories' :: DescribeWorkspaceDirectories -> Maybe (NonEmpty Text)
directoryIds} -> Maybe (NonEmpty Text)
directoryIds) (\s :: DescribeWorkspaceDirectories
s@DescribeWorkspaceDirectories' {} Maybe (NonEmpty Text)
a -> DescribeWorkspaceDirectories
s {$sel:directoryIds:DescribeWorkspaceDirectories' :: Maybe (NonEmpty Text)
directoryIds = Maybe (NonEmpty Text)
a} :: DescribeWorkspaceDirectories) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeWorkspaceDirectories -> f DescribeWorkspaceDirectories)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeWorkspaceDirectories
-> f DescribeWorkspaceDirectories
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty 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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeWorkspaceDirectories_limit :: Lens.Lens' DescribeWorkspaceDirectories (Prelude.Maybe Prelude.Natural)
describeWorkspaceDirectories_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeWorkspaceDirectories -> f DescribeWorkspaceDirectories
describeWorkspaceDirectories_limit = (DescribeWorkspaceDirectories -> Maybe Natural)
-> (DescribeWorkspaceDirectories
-> Maybe Natural -> DescribeWorkspaceDirectories)
-> Lens
DescribeWorkspaceDirectories
DescribeWorkspaceDirectories
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkspaceDirectories' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeWorkspaceDirectories' :: DescribeWorkspaceDirectories -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeWorkspaceDirectories
s@DescribeWorkspaceDirectories' {} Maybe Natural
a -> DescribeWorkspaceDirectories
s {$sel:limit:DescribeWorkspaceDirectories' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeWorkspaceDirectories)
instance Core.AWSPager DescribeWorkspaceDirectories where
page :: DescribeWorkspaceDirectories
-> AWSResponse DescribeWorkspaceDirectories
-> Maybe DescribeWorkspaceDirectories
page DescribeWorkspaceDirectories
rq AWSResponse DescribeWorkspaceDirectories
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeWorkspaceDirectories
DescribeWorkspaceDirectoriesResponse
rs
DescribeWorkspaceDirectoriesResponse
-> Getting (First Text) DescribeWorkspaceDirectoriesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeWorkspaceDirectoriesResponse
-> Const (First Text) DescribeWorkspaceDirectoriesResponse
Lens' DescribeWorkspaceDirectoriesResponse (Maybe Text)
describeWorkspaceDirectoriesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeWorkspaceDirectoriesResponse
-> Const (First Text) DescribeWorkspaceDirectoriesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeWorkspaceDirectoriesResponse 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 DescribeWorkspaceDirectories
forall a. Maybe a
Prelude.Nothing
| Maybe [WorkspaceDirectory] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeWorkspaceDirectories
DescribeWorkspaceDirectoriesResponse
rs
DescribeWorkspaceDirectoriesResponse
-> Getting
(First [WorkspaceDirectory])
DescribeWorkspaceDirectoriesResponse
[WorkspaceDirectory]
-> Maybe [WorkspaceDirectory]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [WorkspaceDirectory]
-> Const (First [WorkspaceDirectory]) (Maybe [WorkspaceDirectory]))
-> DescribeWorkspaceDirectoriesResponse
-> Const
(First [WorkspaceDirectory]) DescribeWorkspaceDirectoriesResponse
Lens'
DescribeWorkspaceDirectoriesResponse (Maybe [WorkspaceDirectory])
describeWorkspaceDirectoriesResponse_directories
((Maybe [WorkspaceDirectory]
-> Const (First [WorkspaceDirectory]) (Maybe [WorkspaceDirectory]))
-> DescribeWorkspaceDirectoriesResponse
-> Const
(First [WorkspaceDirectory]) DescribeWorkspaceDirectoriesResponse)
-> (([WorkspaceDirectory]
-> Const (First [WorkspaceDirectory]) [WorkspaceDirectory])
-> Maybe [WorkspaceDirectory]
-> Const (First [WorkspaceDirectory]) (Maybe [WorkspaceDirectory]))
-> Getting
(First [WorkspaceDirectory])
DescribeWorkspaceDirectoriesResponse
[WorkspaceDirectory]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([WorkspaceDirectory]
-> Const (First [WorkspaceDirectory]) [WorkspaceDirectory])
-> Maybe [WorkspaceDirectory]
-> Const (First [WorkspaceDirectory]) (Maybe [WorkspaceDirectory])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeWorkspaceDirectories
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeWorkspaceDirectories -> Maybe DescribeWorkspaceDirectories
forall a. a -> Maybe a
Prelude.Just (DescribeWorkspaceDirectories
-> Maybe DescribeWorkspaceDirectories)
-> DescribeWorkspaceDirectories
-> Maybe DescribeWorkspaceDirectories
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeWorkspaceDirectories
rq
DescribeWorkspaceDirectories
-> (DescribeWorkspaceDirectories -> DescribeWorkspaceDirectories)
-> DescribeWorkspaceDirectories
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeWorkspaceDirectories
-> Identity DescribeWorkspaceDirectories
Lens
DescribeWorkspaceDirectories
DescribeWorkspaceDirectories
(Maybe Text)
(Maybe Text)
describeWorkspaceDirectories_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeWorkspaceDirectories
-> Identity DescribeWorkspaceDirectories)
-> Maybe Text
-> DescribeWorkspaceDirectories
-> DescribeWorkspaceDirectories
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeWorkspaceDirectories
DescribeWorkspaceDirectoriesResponse
rs
DescribeWorkspaceDirectoriesResponse
-> Getting (First Text) DescribeWorkspaceDirectoriesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeWorkspaceDirectoriesResponse
-> Const (First Text) DescribeWorkspaceDirectoriesResponse
Lens' DescribeWorkspaceDirectoriesResponse (Maybe Text)
describeWorkspaceDirectoriesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeWorkspaceDirectoriesResponse
-> Const (First Text) DescribeWorkspaceDirectoriesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeWorkspaceDirectoriesResponse 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 DescribeWorkspaceDirectories where
type
AWSResponse DescribeWorkspaceDirectories =
DescribeWorkspaceDirectoriesResponse
request :: DescribeWorkspaceDirectories
-> Request DescribeWorkspaceDirectories
request = Service
-> DescribeWorkspaceDirectories
-> Request DescribeWorkspaceDirectories
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeWorkspaceDirectories
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeWorkspaceDirectories)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeWorkspaceDirectories))
-> Logger
-> Service
-> Proxy DescribeWorkspaceDirectories
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeWorkspaceDirectories)))
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 [WorkspaceDirectory]
-> Maybe Text -> Int -> DescribeWorkspaceDirectoriesResponse
DescribeWorkspaceDirectoriesResponse'
(Maybe [WorkspaceDirectory]
-> Maybe Text -> Int -> DescribeWorkspaceDirectoriesResponse)
-> Either String (Maybe [WorkspaceDirectory])
-> Either
String (Maybe Text -> Int -> DescribeWorkspaceDirectoriesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (Maybe [WorkspaceDirectory]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Directories" Either String (Maybe (Maybe [WorkspaceDirectory]))
-> Maybe [WorkspaceDirectory]
-> Either String (Maybe [WorkspaceDirectory])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [WorkspaceDirectory]
forall a. Monoid a => a
Prelude.mempty)
Either
String (Maybe Text -> Int -> DescribeWorkspaceDirectoriesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeWorkspaceDirectoriesResponse)
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 -> DescribeWorkspaceDirectoriesResponse)
-> Either String Int
-> Either String DescribeWorkspaceDirectoriesResponse
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
DescribeWorkspaceDirectories
instance Prelude.NFData DescribeWorkspaceDirectories
instance Core.ToHeaders DescribeWorkspaceDirectories where
toHeaders :: DescribeWorkspaceDirectories -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeWorkspaceDirectories -> 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
"WorkspacesService.DescribeWorkspaceDirectories" ::
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 DescribeWorkspaceDirectories where
toJSON :: DescribeWorkspaceDirectories -> Value
toJSON DescribeWorkspaceDirectories' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
limit :: Maybe Natural
directoryIds :: Maybe (NonEmpty Text)
nextToken :: Maybe Text
$sel:limit:DescribeWorkspaceDirectories' :: DescribeWorkspaceDirectories -> Maybe Natural
$sel:directoryIds:DescribeWorkspaceDirectories' :: DescribeWorkspaceDirectories -> Maybe (NonEmpty Text)
$sel:nextToken:DescribeWorkspaceDirectories' :: DescribeWorkspaceDirectories -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"DirectoryIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
directoryIds,
(Text
"Limit" 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
limit
]
)
instance Core.ToPath DescribeWorkspaceDirectories where
toPath :: DescribeWorkspaceDirectories -> ByteString
toPath = ByteString -> DescribeWorkspaceDirectories -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeWorkspaceDirectories where
toQuery :: DescribeWorkspaceDirectories -> QueryString
toQuery = QueryString -> DescribeWorkspaceDirectories -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeWorkspaceDirectoriesResponse = DescribeWorkspaceDirectoriesResponse'
{
DescribeWorkspaceDirectoriesResponse -> Maybe [WorkspaceDirectory]
directories :: Prelude.Maybe [WorkspaceDirectory],
DescribeWorkspaceDirectoriesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeWorkspaceDirectoriesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeWorkspaceDirectoriesResponse
-> DescribeWorkspaceDirectoriesResponse -> Bool
(DescribeWorkspaceDirectoriesResponse
-> DescribeWorkspaceDirectoriesResponse -> Bool)
-> (DescribeWorkspaceDirectoriesResponse
-> DescribeWorkspaceDirectoriesResponse -> Bool)
-> Eq DescribeWorkspaceDirectoriesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWorkspaceDirectoriesResponse
-> DescribeWorkspaceDirectoriesResponse -> Bool
$c/= :: DescribeWorkspaceDirectoriesResponse
-> DescribeWorkspaceDirectoriesResponse -> Bool
== :: DescribeWorkspaceDirectoriesResponse
-> DescribeWorkspaceDirectoriesResponse -> Bool
$c== :: DescribeWorkspaceDirectoriesResponse
-> DescribeWorkspaceDirectoriesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeWorkspaceDirectoriesResponse]
ReadPrec DescribeWorkspaceDirectoriesResponse
Int -> ReadS DescribeWorkspaceDirectoriesResponse
ReadS [DescribeWorkspaceDirectoriesResponse]
(Int -> ReadS DescribeWorkspaceDirectoriesResponse)
-> ReadS [DescribeWorkspaceDirectoriesResponse]
-> ReadPrec DescribeWorkspaceDirectoriesResponse
-> ReadPrec [DescribeWorkspaceDirectoriesResponse]
-> Read DescribeWorkspaceDirectoriesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWorkspaceDirectoriesResponse]
$creadListPrec :: ReadPrec [DescribeWorkspaceDirectoriesResponse]
readPrec :: ReadPrec DescribeWorkspaceDirectoriesResponse
$creadPrec :: ReadPrec DescribeWorkspaceDirectoriesResponse
readList :: ReadS [DescribeWorkspaceDirectoriesResponse]
$creadList :: ReadS [DescribeWorkspaceDirectoriesResponse]
readsPrec :: Int -> ReadS DescribeWorkspaceDirectoriesResponse
$creadsPrec :: Int -> ReadS DescribeWorkspaceDirectoriesResponse
Prelude.Read, Int -> DescribeWorkspaceDirectoriesResponse -> ShowS
[DescribeWorkspaceDirectoriesResponse] -> ShowS
DescribeWorkspaceDirectoriesResponse -> String
(Int -> DescribeWorkspaceDirectoriesResponse -> ShowS)
-> (DescribeWorkspaceDirectoriesResponse -> String)
-> ([DescribeWorkspaceDirectoriesResponse] -> ShowS)
-> Show DescribeWorkspaceDirectoriesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWorkspaceDirectoriesResponse] -> ShowS
$cshowList :: [DescribeWorkspaceDirectoriesResponse] -> ShowS
show :: DescribeWorkspaceDirectoriesResponse -> String
$cshow :: DescribeWorkspaceDirectoriesResponse -> String
showsPrec :: Int -> DescribeWorkspaceDirectoriesResponse -> ShowS
$cshowsPrec :: Int -> DescribeWorkspaceDirectoriesResponse -> ShowS
Prelude.Show, (forall x.
DescribeWorkspaceDirectoriesResponse
-> Rep DescribeWorkspaceDirectoriesResponse x)
-> (forall x.
Rep DescribeWorkspaceDirectoriesResponse x
-> DescribeWorkspaceDirectoriesResponse)
-> Generic DescribeWorkspaceDirectoriesResponse
forall x.
Rep DescribeWorkspaceDirectoriesResponse x
-> DescribeWorkspaceDirectoriesResponse
forall x.
DescribeWorkspaceDirectoriesResponse
-> Rep DescribeWorkspaceDirectoriesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWorkspaceDirectoriesResponse x
-> DescribeWorkspaceDirectoriesResponse
$cfrom :: forall x.
DescribeWorkspaceDirectoriesResponse
-> Rep DescribeWorkspaceDirectoriesResponse x
Prelude.Generic)
newDescribeWorkspaceDirectoriesResponse ::
Prelude.Int ->
DescribeWorkspaceDirectoriesResponse
newDescribeWorkspaceDirectoriesResponse :: Int -> DescribeWorkspaceDirectoriesResponse
newDescribeWorkspaceDirectoriesResponse Int
pHttpStatus_ =
DescribeWorkspaceDirectoriesResponse' :: Maybe [WorkspaceDirectory]
-> Maybe Text -> Int -> DescribeWorkspaceDirectoriesResponse
DescribeWorkspaceDirectoriesResponse'
{ $sel:directories:DescribeWorkspaceDirectoriesResponse' :: Maybe [WorkspaceDirectory]
directories =
Maybe [WorkspaceDirectory]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeWorkspaceDirectoriesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeWorkspaceDirectoriesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeWorkspaceDirectoriesResponse_directories :: Lens.Lens' DescribeWorkspaceDirectoriesResponse (Prelude.Maybe [WorkspaceDirectory])
describeWorkspaceDirectoriesResponse_directories :: (Maybe [WorkspaceDirectory] -> f (Maybe [WorkspaceDirectory]))
-> DescribeWorkspaceDirectoriesResponse
-> f DescribeWorkspaceDirectoriesResponse
describeWorkspaceDirectoriesResponse_directories = (DescribeWorkspaceDirectoriesResponse
-> Maybe [WorkspaceDirectory])
-> (DescribeWorkspaceDirectoriesResponse
-> Maybe [WorkspaceDirectory]
-> DescribeWorkspaceDirectoriesResponse)
-> Lens'
DescribeWorkspaceDirectoriesResponse (Maybe [WorkspaceDirectory])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkspaceDirectoriesResponse' {Maybe [WorkspaceDirectory]
directories :: Maybe [WorkspaceDirectory]
$sel:directories:DescribeWorkspaceDirectoriesResponse' :: DescribeWorkspaceDirectoriesResponse -> Maybe [WorkspaceDirectory]
directories} -> Maybe [WorkspaceDirectory]
directories) (\s :: DescribeWorkspaceDirectoriesResponse
s@DescribeWorkspaceDirectoriesResponse' {} Maybe [WorkspaceDirectory]
a -> DescribeWorkspaceDirectoriesResponse
s {$sel:directories:DescribeWorkspaceDirectoriesResponse' :: Maybe [WorkspaceDirectory]
directories = Maybe [WorkspaceDirectory]
a} :: DescribeWorkspaceDirectoriesResponse) ((Maybe [WorkspaceDirectory] -> f (Maybe [WorkspaceDirectory]))
-> DescribeWorkspaceDirectoriesResponse
-> f DescribeWorkspaceDirectoriesResponse)
-> ((Maybe [WorkspaceDirectory] -> f (Maybe [WorkspaceDirectory]))
-> Maybe [WorkspaceDirectory] -> f (Maybe [WorkspaceDirectory]))
-> (Maybe [WorkspaceDirectory] -> f (Maybe [WorkspaceDirectory]))
-> DescribeWorkspaceDirectoriesResponse
-> f DescribeWorkspaceDirectoriesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[WorkspaceDirectory]
[WorkspaceDirectory]
[WorkspaceDirectory]
[WorkspaceDirectory]
-> Iso
(Maybe [WorkspaceDirectory])
(Maybe [WorkspaceDirectory])
(Maybe [WorkspaceDirectory])
(Maybe [WorkspaceDirectory])
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
[WorkspaceDirectory]
[WorkspaceDirectory]
[WorkspaceDirectory]
[WorkspaceDirectory]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeWorkspaceDirectoriesResponse_nextToken :: Lens.Lens' DescribeWorkspaceDirectoriesResponse (Prelude.Maybe Prelude.Text)
describeWorkspaceDirectoriesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeWorkspaceDirectoriesResponse
-> f DescribeWorkspaceDirectoriesResponse
describeWorkspaceDirectoriesResponse_nextToken = (DescribeWorkspaceDirectoriesResponse -> Maybe Text)
-> (DescribeWorkspaceDirectoriesResponse
-> Maybe Text -> DescribeWorkspaceDirectoriesResponse)
-> Lens' DescribeWorkspaceDirectoriesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkspaceDirectoriesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeWorkspaceDirectoriesResponse' :: DescribeWorkspaceDirectoriesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeWorkspaceDirectoriesResponse
s@DescribeWorkspaceDirectoriesResponse' {} Maybe Text
a -> DescribeWorkspaceDirectoriesResponse
s {$sel:nextToken:DescribeWorkspaceDirectoriesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeWorkspaceDirectoriesResponse)
describeWorkspaceDirectoriesResponse_httpStatus :: Lens.Lens' DescribeWorkspaceDirectoriesResponse Prelude.Int
describeWorkspaceDirectoriesResponse_httpStatus :: (Int -> f Int)
-> DescribeWorkspaceDirectoriesResponse
-> f DescribeWorkspaceDirectoriesResponse
describeWorkspaceDirectoriesResponse_httpStatus = (DescribeWorkspaceDirectoriesResponse -> Int)
-> (DescribeWorkspaceDirectoriesResponse
-> Int -> DescribeWorkspaceDirectoriesResponse)
-> Lens
DescribeWorkspaceDirectoriesResponse
DescribeWorkspaceDirectoriesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkspaceDirectoriesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeWorkspaceDirectoriesResponse' :: DescribeWorkspaceDirectoriesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeWorkspaceDirectoriesResponse
s@DescribeWorkspaceDirectoriesResponse' {} Int
a -> DescribeWorkspaceDirectoriesResponse
s {$sel:httpStatus:DescribeWorkspaceDirectoriesResponse' :: Int
httpStatus = Int
a} :: DescribeWorkspaceDirectoriesResponse)
instance
Prelude.NFData
DescribeWorkspaceDirectoriesResponse