{-# 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.Organizations.ListOrganizationalUnitsForParent
(
ListOrganizationalUnitsForParent (..),
newListOrganizationalUnitsForParent,
listOrganizationalUnitsForParent_nextToken,
listOrganizationalUnitsForParent_maxResults,
listOrganizationalUnitsForParent_parentId,
ListOrganizationalUnitsForParentResponse (..),
newListOrganizationalUnitsForParentResponse,
listOrganizationalUnitsForParentResponse_nextToken,
listOrganizationalUnitsForParentResponse_organizationalUnits,
listOrganizationalUnitsForParentResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Organizations.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListOrganizationalUnitsForParent = ListOrganizationalUnitsForParent'
{
ListOrganizationalUnitsForParent -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListOrganizationalUnitsForParent -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListOrganizationalUnitsForParent -> Text
parentId :: Prelude.Text
}
deriving (ListOrganizationalUnitsForParent
-> ListOrganizationalUnitsForParent -> Bool
(ListOrganizationalUnitsForParent
-> ListOrganizationalUnitsForParent -> Bool)
-> (ListOrganizationalUnitsForParent
-> ListOrganizationalUnitsForParent -> Bool)
-> Eq ListOrganizationalUnitsForParent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListOrganizationalUnitsForParent
-> ListOrganizationalUnitsForParent -> Bool
$c/= :: ListOrganizationalUnitsForParent
-> ListOrganizationalUnitsForParent -> Bool
== :: ListOrganizationalUnitsForParent
-> ListOrganizationalUnitsForParent -> Bool
$c== :: ListOrganizationalUnitsForParent
-> ListOrganizationalUnitsForParent -> Bool
Prelude.Eq, ReadPrec [ListOrganizationalUnitsForParent]
ReadPrec ListOrganizationalUnitsForParent
Int -> ReadS ListOrganizationalUnitsForParent
ReadS [ListOrganizationalUnitsForParent]
(Int -> ReadS ListOrganizationalUnitsForParent)
-> ReadS [ListOrganizationalUnitsForParent]
-> ReadPrec ListOrganizationalUnitsForParent
-> ReadPrec [ListOrganizationalUnitsForParent]
-> Read ListOrganizationalUnitsForParent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListOrganizationalUnitsForParent]
$creadListPrec :: ReadPrec [ListOrganizationalUnitsForParent]
readPrec :: ReadPrec ListOrganizationalUnitsForParent
$creadPrec :: ReadPrec ListOrganizationalUnitsForParent
readList :: ReadS [ListOrganizationalUnitsForParent]
$creadList :: ReadS [ListOrganizationalUnitsForParent]
readsPrec :: Int -> ReadS ListOrganizationalUnitsForParent
$creadsPrec :: Int -> ReadS ListOrganizationalUnitsForParent
Prelude.Read, Int -> ListOrganizationalUnitsForParent -> ShowS
[ListOrganizationalUnitsForParent] -> ShowS
ListOrganizationalUnitsForParent -> String
(Int -> ListOrganizationalUnitsForParent -> ShowS)
-> (ListOrganizationalUnitsForParent -> String)
-> ([ListOrganizationalUnitsForParent] -> ShowS)
-> Show ListOrganizationalUnitsForParent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListOrganizationalUnitsForParent] -> ShowS
$cshowList :: [ListOrganizationalUnitsForParent] -> ShowS
show :: ListOrganizationalUnitsForParent -> String
$cshow :: ListOrganizationalUnitsForParent -> String
showsPrec :: Int -> ListOrganizationalUnitsForParent -> ShowS
$cshowsPrec :: Int -> ListOrganizationalUnitsForParent -> ShowS
Prelude.Show, (forall x.
ListOrganizationalUnitsForParent
-> Rep ListOrganizationalUnitsForParent x)
-> (forall x.
Rep ListOrganizationalUnitsForParent x
-> ListOrganizationalUnitsForParent)
-> Generic ListOrganizationalUnitsForParent
forall x.
Rep ListOrganizationalUnitsForParent x
-> ListOrganizationalUnitsForParent
forall x.
ListOrganizationalUnitsForParent
-> Rep ListOrganizationalUnitsForParent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListOrganizationalUnitsForParent x
-> ListOrganizationalUnitsForParent
$cfrom :: forall x.
ListOrganizationalUnitsForParent
-> Rep ListOrganizationalUnitsForParent x
Prelude.Generic)
newListOrganizationalUnitsForParent ::
Prelude.Text ->
ListOrganizationalUnitsForParent
newListOrganizationalUnitsForParent :: Text -> ListOrganizationalUnitsForParent
newListOrganizationalUnitsForParent Text
pParentId_ =
ListOrganizationalUnitsForParent' :: Maybe Text
-> Maybe Natural -> Text -> ListOrganizationalUnitsForParent
ListOrganizationalUnitsForParent'
{ $sel:nextToken:ListOrganizationalUnitsForParent' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListOrganizationalUnitsForParent' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:parentId:ListOrganizationalUnitsForParent' :: Text
parentId = Text
pParentId_
}
listOrganizationalUnitsForParent_nextToken :: Lens.Lens' ListOrganizationalUnitsForParent (Prelude.Maybe Prelude.Text)
listOrganizationalUnitsForParent_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListOrganizationalUnitsForParent
-> f ListOrganizationalUnitsForParent
listOrganizationalUnitsForParent_nextToken = (ListOrganizationalUnitsForParent -> Maybe Text)
-> (ListOrganizationalUnitsForParent
-> Maybe Text -> ListOrganizationalUnitsForParent)
-> Lens
ListOrganizationalUnitsForParent
ListOrganizationalUnitsForParent
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationalUnitsForParent' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListOrganizationalUnitsForParent' :: ListOrganizationalUnitsForParent -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListOrganizationalUnitsForParent
s@ListOrganizationalUnitsForParent' {} Maybe Text
a -> ListOrganizationalUnitsForParent
s {$sel:nextToken:ListOrganizationalUnitsForParent' :: Maybe Text
nextToken = Maybe Text
a} :: ListOrganizationalUnitsForParent)
listOrganizationalUnitsForParent_maxResults :: Lens.Lens' ListOrganizationalUnitsForParent (Prelude.Maybe Prelude.Natural)
listOrganizationalUnitsForParent_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListOrganizationalUnitsForParent
-> f ListOrganizationalUnitsForParent
listOrganizationalUnitsForParent_maxResults = (ListOrganizationalUnitsForParent -> Maybe Natural)
-> (ListOrganizationalUnitsForParent
-> Maybe Natural -> ListOrganizationalUnitsForParent)
-> Lens
ListOrganizationalUnitsForParent
ListOrganizationalUnitsForParent
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationalUnitsForParent' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListOrganizationalUnitsForParent' :: ListOrganizationalUnitsForParent -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListOrganizationalUnitsForParent
s@ListOrganizationalUnitsForParent' {} Maybe Natural
a -> ListOrganizationalUnitsForParent
s {$sel:maxResults:ListOrganizationalUnitsForParent' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListOrganizationalUnitsForParent)
listOrganizationalUnitsForParent_parentId :: Lens.Lens' ListOrganizationalUnitsForParent Prelude.Text
listOrganizationalUnitsForParent_parentId :: (Text -> f Text)
-> ListOrganizationalUnitsForParent
-> f ListOrganizationalUnitsForParent
listOrganizationalUnitsForParent_parentId = (ListOrganizationalUnitsForParent -> Text)
-> (ListOrganizationalUnitsForParent
-> Text -> ListOrganizationalUnitsForParent)
-> Lens
ListOrganizationalUnitsForParent
ListOrganizationalUnitsForParent
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationalUnitsForParent' {Text
parentId :: Text
$sel:parentId:ListOrganizationalUnitsForParent' :: ListOrganizationalUnitsForParent -> Text
parentId} -> Text
parentId) (\s :: ListOrganizationalUnitsForParent
s@ListOrganizationalUnitsForParent' {} Text
a -> ListOrganizationalUnitsForParent
s {$sel:parentId:ListOrganizationalUnitsForParent' :: Text
parentId = Text
a} :: ListOrganizationalUnitsForParent)
instance
Core.AWSPager
ListOrganizationalUnitsForParent
where
page :: ListOrganizationalUnitsForParent
-> AWSResponse ListOrganizationalUnitsForParent
-> Maybe ListOrganizationalUnitsForParent
page ListOrganizationalUnitsForParent
rq AWSResponse ListOrganizationalUnitsForParent
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListOrganizationalUnitsForParent
ListOrganizationalUnitsForParentResponse
rs
ListOrganizationalUnitsForParentResponse
-> Getting
(First Text) ListOrganizationalUnitsForParentResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListOrganizationalUnitsForParentResponse
-> Const (First Text) ListOrganizationalUnitsForParentResponse
Lens' ListOrganizationalUnitsForParentResponse (Maybe Text)
listOrganizationalUnitsForParentResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListOrganizationalUnitsForParentResponse
-> Const (First Text) ListOrganizationalUnitsForParentResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) ListOrganizationalUnitsForParentResponse 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 ListOrganizationalUnitsForParent
forall a. Maybe a
Prelude.Nothing
| Maybe [OrganizationalUnit] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListOrganizationalUnitsForParent
ListOrganizationalUnitsForParentResponse
rs
ListOrganizationalUnitsForParentResponse
-> Getting
(First [OrganizationalUnit])
ListOrganizationalUnitsForParentResponse
[OrganizationalUnit]
-> Maybe [OrganizationalUnit]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [OrganizationalUnit]
-> Const (First [OrganizationalUnit]) (Maybe [OrganizationalUnit]))
-> ListOrganizationalUnitsForParentResponse
-> Const
(First [OrganizationalUnit])
ListOrganizationalUnitsForParentResponse
Lens'
ListOrganizationalUnitsForParentResponse
(Maybe [OrganizationalUnit])
listOrganizationalUnitsForParentResponse_organizationalUnits
((Maybe [OrganizationalUnit]
-> Const (First [OrganizationalUnit]) (Maybe [OrganizationalUnit]))
-> ListOrganizationalUnitsForParentResponse
-> Const
(First [OrganizationalUnit])
ListOrganizationalUnitsForParentResponse)
-> (([OrganizationalUnit]
-> Const (First [OrganizationalUnit]) [OrganizationalUnit])
-> Maybe [OrganizationalUnit]
-> Const (First [OrganizationalUnit]) (Maybe [OrganizationalUnit]))
-> Getting
(First [OrganizationalUnit])
ListOrganizationalUnitsForParentResponse
[OrganizationalUnit]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([OrganizationalUnit]
-> Const (First [OrganizationalUnit]) [OrganizationalUnit])
-> Maybe [OrganizationalUnit]
-> Const (First [OrganizationalUnit]) (Maybe [OrganizationalUnit])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListOrganizationalUnitsForParent
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListOrganizationalUnitsForParent
-> Maybe ListOrganizationalUnitsForParent
forall a. a -> Maybe a
Prelude.Just (ListOrganizationalUnitsForParent
-> Maybe ListOrganizationalUnitsForParent)
-> ListOrganizationalUnitsForParent
-> Maybe ListOrganizationalUnitsForParent
forall a b. (a -> b) -> a -> b
Prelude.$
ListOrganizationalUnitsForParent
rq
ListOrganizationalUnitsForParent
-> (ListOrganizationalUnitsForParent
-> ListOrganizationalUnitsForParent)
-> ListOrganizationalUnitsForParent
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListOrganizationalUnitsForParent
-> Identity ListOrganizationalUnitsForParent
Lens
ListOrganizationalUnitsForParent
ListOrganizationalUnitsForParent
(Maybe Text)
(Maybe Text)
listOrganizationalUnitsForParent_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListOrganizationalUnitsForParent
-> Identity ListOrganizationalUnitsForParent)
-> Maybe Text
-> ListOrganizationalUnitsForParent
-> ListOrganizationalUnitsForParent
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListOrganizationalUnitsForParent
ListOrganizationalUnitsForParentResponse
rs
ListOrganizationalUnitsForParentResponse
-> Getting
(First Text) ListOrganizationalUnitsForParentResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListOrganizationalUnitsForParentResponse
-> Const (First Text) ListOrganizationalUnitsForParentResponse
Lens' ListOrganizationalUnitsForParentResponse (Maybe Text)
listOrganizationalUnitsForParentResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListOrganizationalUnitsForParentResponse
-> Const (First Text) ListOrganizationalUnitsForParentResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) ListOrganizationalUnitsForParentResponse 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
ListOrganizationalUnitsForParent
where
type
AWSResponse ListOrganizationalUnitsForParent =
ListOrganizationalUnitsForParentResponse
request :: ListOrganizationalUnitsForParent
-> Request ListOrganizationalUnitsForParent
request = Service
-> ListOrganizationalUnitsForParent
-> Request ListOrganizationalUnitsForParent
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListOrganizationalUnitsForParent
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ListOrganizationalUnitsForParent)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListOrganizationalUnitsForParent))
-> Logger
-> Service
-> Proxy ListOrganizationalUnitsForParent
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ListOrganizationalUnitsForParent)))
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 [OrganizationalUnit]
-> Int
-> ListOrganizationalUnitsForParentResponse
ListOrganizationalUnitsForParentResponse'
(Maybe Text
-> Maybe [OrganizationalUnit]
-> Int
-> ListOrganizationalUnitsForParentResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [OrganizationalUnit]
-> Int -> ListOrganizationalUnitsForParentResponse)
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 [OrganizationalUnit]
-> Int -> ListOrganizationalUnitsForParentResponse)
-> Either String (Maybe [OrganizationalUnit])
-> Either String (Int -> ListOrganizationalUnitsForParentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [OrganizationalUnit]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"OrganizationalUnits"
Either String (Maybe (Maybe [OrganizationalUnit]))
-> Maybe [OrganizationalUnit]
-> Either String (Maybe [OrganizationalUnit])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [OrganizationalUnit]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> ListOrganizationalUnitsForParentResponse)
-> Either String Int
-> Either String ListOrganizationalUnitsForParentResponse
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
ListOrganizationalUnitsForParent
instance
Prelude.NFData
ListOrganizationalUnitsForParent
instance
Core.ToHeaders
ListOrganizationalUnitsForParent
where
toHeaders :: ListOrganizationalUnitsForParent -> ResponseHeaders
toHeaders =
ResponseHeaders
-> ListOrganizationalUnitsForParent -> 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
"AWSOrganizationsV20161128.ListOrganizationalUnitsForParent" ::
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 ListOrganizationalUnitsForParent where
toJSON :: ListOrganizationalUnitsForParent -> Value
toJSON ListOrganizationalUnitsForParent' {Maybe Natural
Maybe Text
Text
parentId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:parentId:ListOrganizationalUnitsForParent' :: ListOrganizationalUnitsForParent -> Text
$sel:maxResults:ListOrganizationalUnitsForParent' :: ListOrganizationalUnitsForParent -> Maybe Natural
$sel:nextToken:ListOrganizationalUnitsForParent' :: ListOrganizationalUnitsForParent -> 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
"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,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ParentId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
parentId)
]
)
instance Core.ToPath ListOrganizationalUnitsForParent where
toPath :: ListOrganizationalUnitsForParent -> ByteString
toPath = ByteString -> ListOrganizationalUnitsForParent -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
ListOrganizationalUnitsForParent
where
toQuery :: ListOrganizationalUnitsForParent -> QueryString
toQuery = QueryString -> ListOrganizationalUnitsForParent -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListOrganizationalUnitsForParentResponse = ListOrganizationalUnitsForParentResponse'
{
ListOrganizationalUnitsForParentResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListOrganizationalUnitsForParentResponse
-> Maybe [OrganizationalUnit]
organizationalUnits :: Prelude.Maybe [OrganizationalUnit],
ListOrganizationalUnitsForParentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListOrganizationalUnitsForParentResponse
-> ListOrganizationalUnitsForParentResponse -> Bool
(ListOrganizationalUnitsForParentResponse
-> ListOrganizationalUnitsForParentResponse -> Bool)
-> (ListOrganizationalUnitsForParentResponse
-> ListOrganizationalUnitsForParentResponse -> Bool)
-> Eq ListOrganizationalUnitsForParentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListOrganizationalUnitsForParentResponse
-> ListOrganizationalUnitsForParentResponse -> Bool
$c/= :: ListOrganizationalUnitsForParentResponse
-> ListOrganizationalUnitsForParentResponse -> Bool
== :: ListOrganizationalUnitsForParentResponse
-> ListOrganizationalUnitsForParentResponse -> Bool
$c== :: ListOrganizationalUnitsForParentResponse
-> ListOrganizationalUnitsForParentResponse -> Bool
Prelude.Eq, ReadPrec [ListOrganizationalUnitsForParentResponse]
ReadPrec ListOrganizationalUnitsForParentResponse
Int -> ReadS ListOrganizationalUnitsForParentResponse
ReadS [ListOrganizationalUnitsForParentResponse]
(Int -> ReadS ListOrganizationalUnitsForParentResponse)
-> ReadS [ListOrganizationalUnitsForParentResponse]
-> ReadPrec ListOrganizationalUnitsForParentResponse
-> ReadPrec [ListOrganizationalUnitsForParentResponse]
-> Read ListOrganizationalUnitsForParentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListOrganizationalUnitsForParentResponse]
$creadListPrec :: ReadPrec [ListOrganizationalUnitsForParentResponse]
readPrec :: ReadPrec ListOrganizationalUnitsForParentResponse
$creadPrec :: ReadPrec ListOrganizationalUnitsForParentResponse
readList :: ReadS [ListOrganizationalUnitsForParentResponse]
$creadList :: ReadS [ListOrganizationalUnitsForParentResponse]
readsPrec :: Int -> ReadS ListOrganizationalUnitsForParentResponse
$creadsPrec :: Int -> ReadS ListOrganizationalUnitsForParentResponse
Prelude.Read, Int -> ListOrganizationalUnitsForParentResponse -> ShowS
[ListOrganizationalUnitsForParentResponse] -> ShowS
ListOrganizationalUnitsForParentResponse -> String
(Int -> ListOrganizationalUnitsForParentResponse -> ShowS)
-> (ListOrganizationalUnitsForParentResponse -> String)
-> ([ListOrganizationalUnitsForParentResponse] -> ShowS)
-> Show ListOrganizationalUnitsForParentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListOrganizationalUnitsForParentResponse] -> ShowS
$cshowList :: [ListOrganizationalUnitsForParentResponse] -> ShowS
show :: ListOrganizationalUnitsForParentResponse -> String
$cshow :: ListOrganizationalUnitsForParentResponse -> String
showsPrec :: Int -> ListOrganizationalUnitsForParentResponse -> ShowS
$cshowsPrec :: Int -> ListOrganizationalUnitsForParentResponse -> ShowS
Prelude.Show, (forall x.
ListOrganizationalUnitsForParentResponse
-> Rep ListOrganizationalUnitsForParentResponse x)
-> (forall x.
Rep ListOrganizationalUnitsForParentResponse x
-> ListOrganizationalUnitsForParentResponse)
-> Generic ListOrganizationalUnitsForParentResponse
forall x.
Rep ListOrganizationalUnitsForParentResponse x
-> ListOrganizationalUnitsForParentResponse
forall x.
ListOrganizationalUnitsForParentResponse
-> Rep ListOrganizationalUnitsForParentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListOrganizationalUnitsForParentResponse x
-> ListOrganizationalUnitsForParentResponse
$cfrom :: forall x.
ListOrganizationalUnitsForParentResponse
-> Rep ListOrganizationalUnitsForParentResponse x
Prelude.Generic)
newListOrganizationalUnitsForParentResponse ::
Prelude.Int ->
ListOrganizationalUnitsForParentResponse
newListOrganizationalUnitsForParentResponse :: Int -> ListOrganizationalUnitsForParentResponse
newListOrganizationalUnitsForParentResponse
Int
pHttpStatus_ =
ListOrganizationalUnitsForParentResponse' :: Maybe Text
-> Maybe [OrganizationalUnit]
-> Int
-> ListOrganizationalUnitsForParentResponse
ListOrganizationalUnitsForParentResponse'
{ $sel:nextToken:ListOrganizationalUnitsForParentResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:organizationalUnits:ListOrganizationalUnitsForParentResponse' :: Maybe [OrganizationalUnit]
organizationalUnits =
Maybe [OrganizationalUnit]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListOrganizationalUnitsForParentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listOrganizationalUnitsForParentResponse_nextToken :: Lens.Lens' ListOrganizationalUnitsForParentResponse (Prelude.Maybe Prelude.Text)
listOrganizationalUnitsForParentResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListOrganizationalUnitsForParentResponse
-> f ListOrganizationalUnitsForParentResponse
listOrganizationalUnitsForParentResponse_nextToken = (ListOrganizationalUnitsForParentResponse -> Maybe Text)
-> (ListOrganizationalUnitsForParentResponse
-> Maybe Text -> ListOrganizationalUnitsForParentResponse)
-> Lens' ListOrganizationalUnitsForParentResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationalUnitsForParentResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListOrganizationalUnitsForParentResponse' :: ListOrganizationalUnitsForParentResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListOrganizationalUnitsForParentResponse
s@ListOrganizationalUnitsForParentResponse' {} Maybe Text
a -> ListOrganizationalUnitsForParentResponse
s {$sel:nextToken:ListOrganizationalUnitsForParentResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListOrganizationalUnitsForParentResponse)
listOrganizationalUnitsForParentResponse_organizationalUnits :: Lens.Lens' ListOrganizationalUnitsForParentResponse (Prelude.Maybe [OrganizationalUnit])
listOrganizationalUnitsForParentResponse_organizationalUnits :: (Maybe [OrganizationalUnit] -> f (Maybe [OrganizationalUnit]))
-> ListOrganizationalUnitsForParentResponse
-> f ListOrganizationalUnitsForParentResponse
listOrganizationalUnitsForParentResponse_organizationalUnits = (ListOrganizationalUnitsForParentResponse
-> Maybe [OrganizationalUnit])
-> (ListOrganizationalUnitsForParentResponse
-> Maybe [OrganizationalUnit]
-> ListOrganizationalUnitsForParentResponse)
-> Lens'
ListOrganizationalUnitsForParentResponse
(Maybe [OrganizationalUnit])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationalUnitsForParentResponse' {Maybe [OrganizationalUnit]
organizationalUnits :: Maybe [OrganizationalUnit]
$sel:organizationalUnits:ListOrganizationalUnitsForParentResponse' :: ListOrganizationalUnitsForParentResponse
-> Maybe [OrganizationalUnit]
organizationalUnits} -> Maybe [OrganizationalUnit]
organizationalUnits) (\s :: ListOrganizationalUnitsForParentResponse
s@ListOrganizationalUnitsForParentResponse' {} Maybe [OrganizationalUnit]
a -> ListOrganizationalUnitsForParentResponse
s {$sel:organizationalUnits:ListOrganizationalUnitsForParentResponse' :: Maybe [OrganizationalUnit]
organizationalUnits = Maybe [OrganizationalUnit]
a} :: ListOrganizationalUnitsForParentResponse) ((Maybe [OrganizationalUnit] -> f (Maybe [OrganizationalUnit]))
-> ListOrganizationalUnitsForParentResponse
-> f ListOrganizationalUnitsForParentResponse)
-> ((Maybe [OrganizationalUnit] -> f (Maybe [OrganizationalUnit]))
-> Maybe [OrganizationalUnit] -> f (Maybe [OrganizationalUnit]))
-> (Maybe [OrganizationalUnit] -> f (Maybe [OrganizationalUnit]))
-> ListOrganizationalUnitsForParentResponse
-> f ListOrganizationalUnitsForParentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[OrganizationalUnit]
[OrganizationalUnit]
[OrganizationalUnit]
[OrganizationalUnit]
-> Iso
(Maybe [OrganizationalUnit])
(Maybe [OrganizationalUnit])
(Maybe [OrganizationalUnit])
(Maybe [OrganizationalUnit])
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
[OrganizationalUnit]
[OrganizationalUnit]
[OrganizationalUnit]
[OrganizationalUnit]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listOrganizationalUnitsForParentResponse_httpStatus :: Lens.Lens' ListOrganizationalUnitsForParentResponse Prelude.Int
listOrganizationalUnitsForParentResponse_httpStatus :: (Int -> f Int)
-> ListOrganizationalUnitsForParentResponse
-> f ListOrganizationalUnitsForParentResponse
listOrganizationalUnitsForParentResponse_httpStatus = (ListOrganizationalUnitsForParentResponse -> Int)
-> (ListOrganizationalUnitsForParentResponse
-> Int -> ListOrganizationalUnitsForParentResponse)
-> Lens
ListOrganizationalUnitsForParentResponse
ListOrganizationalUnitsForParentResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOrganizationalUnitsForParentResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListOrganizationalUnitsForParentResponse' :: ListOrganizationalUnitsForParentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListOrganizationalUnitsForParentResponse
s@ListOrganizationalUnitsForParentResponse' {} Int
a -> ListOrganizationalUnitsForParentResponse
s {$sel:httpStatus:ListOrganizationalUnitsForParentResponse' :: Int
httpStatus = Int
a} :: ListOrganizationalUnitsForParentResponse)
instance
Prelude.NFData
ListOrganizationalUnitsForParentResponse