{-# 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.CloudDirectory.ListDevelopmentSchemaArns
(
ListDevelopmentSchemaArns (..),
newListDevelopmentSchemaArns,
listDevelopmentSchemaArns_maxResults,
listDevelopmentSchemaArns_nextToken,
ListDevelopmentSchemaArnsResponse (..),
newListDevelopmentSchemaArnsResponse,
listDevelopmentSchemaArnsResponse_nextToken,
listDevelopmentSchemaArnsResponse_schemaArns,
listDevelopmentSchemaArnsResponse_httpStatus,
)
where
import Amazonka.CloudDirectory.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListDevelopmentSchemaArns = ListDevelopmentSchemaArns'
{
ListDevelopmentSchemaArns -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListDevelopmentSchemaArns -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (ListDevelopmentSchemaArns -> ListDevelopmentSchemaArns -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDevelopmentSchemaArns -> ListDevelopmentSchemaArns -> Bool
$c/= :: ListDevelopmentSchemaArns -> ListDevelopmentSchemaArns -> Bool
== :: ListDevelopmentSchemaArns -> ListDevelopmentSchemaArns -> Bool
$c== :: ListDevelopmentSchemaArns -> ListDevelopmentSchemaArns -> Bool
Prelude.Eq, ReadPrec [ListDevelopmentSchemaArns]
ReadPrec ListDevelopmentSchemaArns
Int -> ReadS ListDevelopmentSchemaArns
ReadS [ListDevelopmentSchemaArns]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDevelopmentSchemaArns]
$creadListPrec :: ReadPrec [ListDevelopmentSchemaArns]
readPrec :: ReadPrec ListDevelopmentSchemaArns
$creadPrec :: ReadPrec ListDevelopmentSchemaArns
readList :: ReadS [ListDevelopmentSchemaArns]
$creadList :: ReadS [ListDevelopmentSchemaArns]
readsPrec :: Int -> ReadS ListDevelopmentSchemaArns
$creadsPrec :: Int -> ReadS ListDevelopmentSchemaArns
Prelude.Read, Int -> ListDevelopmentSchemaArns -> ShowS
[ListDevelopmentSchemaArns] -> ShowS
ListDevelopmentSchemaArns -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDevelopmentSchemaArns] -> ShowS
$cshowList :: [ListDevelopmentSchemaArns] -> ShowS
show :: ListDevelopmentSchemaArns -> String
$cshow :: ListDevelopmentSchemaArns -> String
showsPrec :: Int -> ListDevelopmentSchemaArns -> ShowS
$cshowsPrec :: Int -> ListDevelopmentSchemaArns -> ShowS
Prelude.Show, forall x.
Rep ListDevelopmentSchemaArns x -> ListDevelopmentSchemaArns
forall x.
ListDevelopmentSchemaArns -> Rep ListDevelopmentSchemaArns x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDevelopmentSchemaArns x -> ListDevelopmentSchemaArns
$cfrom :: forall x.
ListDevelopmentSchemaArns -> Rep ListDevelopmentSchemaArns x
Prelude.Generic)
newListDevelopmentSchemaArns ::
ListDevelopmentSchemaArns
newListDevelopmentSchemaArns :: ListDevelopmentSchemaArns
newListDevelopmentSchemaArns =
ListDevelopmentSchemaArns'
{ $sel:maxResults:ListDevelopmentSchemaArns' :: Maybe Natural
maxResults =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListDevelopmentSchemaArns' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
}
listDevelopmentSchemaArns_maxResults :: Lens.Lens' ListDevelopmentSchemaArns (Prelude.Maybe Prelude.Natural)
listDevelopmentSchemaArns_maxResults :: Lens' ListDevelopmentSchemaArns (Maybe Natural)
listDevelopmentSchemaArns_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevelopmentSchemaArns' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDevelopmentSchemaArns' :: ListDevelopmentSchemaArns -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDevelopmentSchemaArns
s@ListDevelopmentSchemaArns' {} Maybe Natural
a -> ListDevelopmentSchemaArns
s {$sel:maxResults:ListDevelopmentSchemaArns' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDevelopmentSchemaArns)
listDevelopmentSchemaArns_nextToken :: Lens.Lens' ListDevelopmentSchemaArns (Prelude.Maybe Prelude.Text)
listDevelopmentSchemaArns_nextToken :: Lens' ListDevelopmentSchemaArns (Maybe Text)
listDevelopmentSchemaArns_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevelopmentSchemaArns' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDevelopmentSchemaArns' :: ListDevelopmentSchemaArns -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDevelopmentSchemaArns
s@ListDevelopmentSchemaArns' {} Maybe Text
a -> ListDevelopmentSchemaArns
s {$sel:nextToken:ListDevelopmentSchemaArns' :: Maybe Text
nextToken = Maybe Text
a} :: ListDevelopmentSchemaArns)
instance Core.AWSPager ListDevelopmentSchemaArns where
page :: ListDevelopmentSchemaArns
-> AWSResponse ListDevelopmentSchemaArns
-> Maybe ListDevelopmentSchemaArns
page ListDevelopmentSchemaArns
rq AWSResponse ListDevelopmentSchemaArns
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListDevelopmentSchemaArns
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDevelopmentSchemaArnsResponse (Maybe Text)
listDevelopmentSchemaArnsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListDevelopmentSchemaArns
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDevelopmentSchemaArnsResponse (Maybe [Text])
listDevelopmentSchemaArnsResponse_schemaArns
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
forall a. a -> Maybe a
Prelude.Just
forall a b. (a -> b) -> a -> b
Prelude.$ ListDevelopmentSchemaArns
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListDevelopmentSchemaArns (Maybe Text)
listDevelopmentSchemaArns_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDevelopmentSchemaArns
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDevelopmentSchemaArnsResponse (Maybe Text)
listDevelopmentSchemaArnsResponse_nextToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListDevelopmentSchemaArns where
type
AWSResponse ListDevelopmentSchemaArns =
ListDevelopmentSchemaArnsResponse
request :: (Service -> Service)
-> ListDevelopmentSchemaArns -> Request ListDevelopmentSchemaArns
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListDevelopmentSchemaArns
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListDevelopmentSchemaArns)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe [Text] -> Int -> ListDevelopmentSchemaArnsResponse
ListDevelopmentSchemaArnsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SchemaArns" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListDevelopmentSchemaArns where
hashWithSalt :: Int -> ListDevelopmentSchemaArns -> Int
hashWithSalt Int
_salt ListDevelopmentSchemaArns' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListDevelopmentSchemaArns' :: ListDevelopmentSchemaArns -> Maybe Text
$sel:maxResults:ListDevelopmentSchemaArns' :: ListDevelopmentSchemaArns -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
instance Prelude.NFData ListDevelopmentSchemaArns where
rnf :: ListDevelopmentSchemaArns -> ()
rnf ListDevelopmentSchemaArns' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListDevelopmentSchemaArns' :: ListDevelopmentSchemaArns -> Maybe Text
$sel:maxResults:ListDevelopmentSchemaArns' :: ListDevelopmentSchemaArns -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
instance Data.ToHeaders ListDevelopmentSchemaArns where
toHeaders :: ListDevelopmentSchemaArns -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToJSON ListDevelopmentSchemaArns where
toJSON :: ListDevelopmentSchemaArns -> Value
toJSON ListDevelopmentSchemaArns' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListDevelopmentSchemaArns' :: ListDevelopmentSchemaArns -> Maybe Text
$sel:maxResults:ListDevelopmentSchemaArns' :: ListDevelopmentSchemaArns -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
]
)
instance Data.ToPath ListDevelopmentSchemaArns where
toPath :: ListDevelopmentSchemaArns -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const
ByteString
"/amazonclouddirectory/2017-01-11/schema/development"
instance Data.ToQuery ListDevelopmentSchemaArns where
toQuery :: ListDevelopmentSchemaArns -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ListDevelopmentSchemaArnsResponse = ListDevelopmentSchemaArnsResponse'
{
ListDevelopmentSchemaArnsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDevelopmentSchemaArnsResponse -> Maybe [Text]
schemaArns :: Prelude.Maybe [Prelude.Text],
ListDevelopmentSchemaArnsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListDevelopmentSchemaArnsResponse
-> ListDevelopmentSchemaArnsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDevelopmentSchemaArnsResponse
-> ListDevelopmentSchemaArnsResponse -> Bool
$c/= :: ListDevelopmentSchemaArnsResponse
-> ListDevelopmentSchemaArnsResponse -> Bool
== :: ListDevelopmentSchemaArnsResponse
-> ListDevelopmentSchemaArnsResponse -> Bool
$c== :: ListDevelopmentSchemaArnsResponse
-> ListDevelopmentSchemaArnsResponse -> Bool
Prelude.Eq, ReadPrec [ListDevelopmentSchemaArnsResponse]
ReadPrec ListDevelopmentSchemaArnsResponse
Int -> ReadS ListDevelopmentSchemaArnsResponse
ReadS [ListDevelopmentSchemaArnsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDevelopmentSchemaArnsResponse]
$creadListPrec :: ReadPrec [ListDevelopmentSchemaArnsResponse]
readPrec :: ReadPrec ListDevelopmentSchemaArnsResponse
$creadPrec :: ReadPrec ListDevelopmentSchemaArnsResponse
readList :: ReadS [ListDevelopmentSchemaArnsResponse]
$creadList :: ReadS [ListDevelopmentSchemaArnsResponse]
readsPrec :: Int -> ReadS ListDevelopmentSchemaArnsResponse
$creadsPrec :: Int -> ReadS ListDevelopmentSchemaArnsResponse
Prelude.Read, Int -> ListDevelopmentSchemaArnsResponse -> ShowS
[ListDevelopmentSchemaArnsResponse] -> ShowS
ListDevelopmentSchemaArnsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDevelopmentSchemaArnsResponse] -> ShowS
$cshowList :: [ListDevelopmentSchemaArnsResponse] -> ShowS
show :: ListDevelopmentSchemaArnsResponse -> String
$cshow :: ListDevelopmentSchemaArnsResponse -> String
showsPrec :: Int -> ListDevelopmentSchemaArnsResponse -> ShowS
$cshowsPrec :: Int -> ListDevelopmentSchemaArnsResponse -> ShowS
Prelude.Show, forall x.
Rep ListDevelopmentSchemaArnsResponse x
-> ListDevelopmentSchemaArnsResponse
forall x.
ListDevelopmentSchemaArnsResponse
-> Rep ListDevelopmentSchemaArnsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDevelopmentSchemaArnsResponse x
-> ListDevelopmentSchemaArnsResponse
$cfrom :: forall x.
ListDevelopmentSchemaArnsResponse
-> Rep ListDevelopmentSchemaArnsResponse x
Prelude.Generic)
newListDevelopmentSchemaArnsResponse ::
Prelude.Int ->
ListDevelopmentSchemaArnsResponse
newListDevelopmentSchemaArnsResponse :: Int -> ListDevelopmentSchemaArnsResponse
newListDevelopmentSchemaArnsResponse Int
pHttpStatus_ =
ListDevelopmentSchemaArnsResponse'
{ $sel:nextToken:ListDevelopmentSchemaArnsResponse' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:schemaArns:ListDevelopmentSchemaArnsResponse' :: Maybe [Text]
schemaArns = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListDevelopmentSchemaArnsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listDevelopmentSchemaArnsResponse_nextToken :: Lens.Lens' ListDevelopmentSchemaArnsResponse (Prelude.Maybe Prelude.Text)
listDevelopmentSchemaArnsResponse_nextToken :: Lens' ListDevelopmentSchemaArnsResponse (Maybe Text)
listDevelopmentSchemaArnsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevelopmentSchemaArnsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDevelopmentSchemaArnsResponse' :: ListDevelopmentSchemaArnsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDevelopmentSchemaArnsResponse
s@ListDevelopmentSchemaArnsResponse' {} Maybe Text
a -> ListDevelopmentSchemaArnsResponse
s {$sel:nextToken:ListDevelopmentSchemaArnsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDevelopmentSchemaArnsResponse)
listDevelopmentSchemaArnsResponse_schemaArns :: Lens.Lens' ListDevelopmentSchemaArnsResponse (Prelude.Maybe [Prelude.Text])
listDevelopmentSchemaArnsResponse_schemaArns :: Lens' ListDevelopmentSchemaArnsResponse (Maybe [Text])
listDevelopmentSchemaArnsResponse_schemaArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevelopmentSchemaArnsResponse' {Maybe [Text]
schemaArns :: Maybe [Text]
$sel:schemaArns:ListDevelopmentSchemaArnsResponse' :: ListDevelopmentSchemaArnsResponse -> Maybe [Text]
schemaArns} -> Maybe [Text]
schemaArns) (\s :: ListDevelopmentSchemaArnsResponse
s@ListDevelopmentSchemaArnsResponse' {} Maybe [Text]
a -> ListDevelopmentSchemaArnsResponse
s {$sel:schemaArns:ListDevelopmentSchemaArnsResponse' :: Maybe [Text]
schemaArns = Maybe [Text]
a} :: ListDevelopmentSchemaArnsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listDevelopmentSchemaArnsResponse_httpStatus :: Lens.Lens' ListDevelopmentSchemaArnsResponse Prelude.Int
listDevelopmentSchemaArnsResponse_httpStatus :: Lens' ListDevelopmentSchemaArnsResponse Int
listDevelopmentSchemaArnsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevelopmentSchemaArnsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListDevelopmentSchemaArnsResponse' :: ListDevelopmentSchemaArnsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListDevelopmentSchemaArnsResponse
s@ListDevelopmentSchemaArnsResponse' {} Int
a -> ListDevelopmentSchemaArnsResponse
s {$sel:httpStatus:ListDevelopmentSchemaArnsResponse' :: Int
httpStatus = Int
a} :: ListDevelopmentSchemaArnsResponse)
instance
Prelude.NFData
ListDevelopmentSchemaArnsResponse
where
rnf :: ListDevelopmentSchemaArnsResponse -> ()
rnf ListDevelopmentSchemaArnsResponse' {Int
Maybe [Text]
Maybe Text
httpStatus :: Int
schemaArns :: Maybe [Text]
nextToken :: Maybe Text
$sel:httpStatus:ListDevelopmentSchemaArnsResponse' :: ListDevelopmentSchemaArnsResponse -> Int
$sel:schemaArns:ListDevelopmentSchemaArnsResponse' :: ListDevelopmentSchemaArnsResponse -> Maybe [Text]
$sel:nextToken:ListDevelopmentSchemaArnsResponse' :: ListDevelopmentSchemaArnsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
schemaArns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus