{-# 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.Schemas.ListSchemaVersions
(
ListSchemaVersions (..),
newListSchemaVersions,
listSchemaVersions_nextToken,
listSchemaVersions_limit,
listSchemaVersions_registryName,
listSchemaVersions_schemaName,
ListSchemaVersionsResponse (..),
newListSchemaVersionsResponse,
listSchemaVersionsResponse_schemaVersions,
listSchemaVersionsResponse_nextToken,
listSchemaVersionsResponse_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.Schemas.Types
data ListSchemaVersions = ListSchemaVersions'
{
ListSchemaVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListSchemaVersions -> Maybe Int
limit :: Prelude.Maybe Prelude.Int,
ListSchemaVersions -> Text
registryName :: Prelude.Text,
ListSchemaVersions -> Text
schemaName :: Prelude.Text
}
deriving (ListSchemaVersions -> ListSchemaVersions -> Bool
(ListSchemaVersions -> ListSchemaVersions -> Bool)
-> (ListSchemaVersions -> ListSchemaVersions -> Bool)
-> Eq ListSchemaVersions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSchemaVersions -> ListSchemaVersions -> Bool
$c/= :: ListSchemaVersions -> ListSchemaVersions -> Bool
== :: ListSchemaVersions -> ListSchemaVersions -> Bool
$c== :: ListSchemaVersions -> ListSchemaVersions -> Bool
Prelude.Eq, ReadPrec [ListSchemaVersions]
ReadPrec ListSchemaVersions
Int -> ReadS ListSchemaVersions
ReadS [ListSchemaVersions]
(Int -> ReadS ListSchemaVersions)
-> ReadS [ListSchemaVersions]
-> ReadPrec ListSchemaVersions
-> ReadPrec [ListSchemaVersions]
-> Read ListSchemaVersions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSchemaVersions]
$creadListPrec :: ReadPrec [ListSchemaVersions]
readPrec :: ReadPrec ListSchemaVersions
$creadPrec :: ReadPrec ListSchemaVersions
readList :: ReadS [ListSchemaVersions]
$creadList :: ReadS [ListSchemaVersions]
readsPrec :: Int -> ReadS ListSchemaVersions
$creadsPrec :: Int -> ReadS ListSchemaVersions
Prelude.Read, Int -> ListSchemaVersions -> ShowS
[ListSchemaVersions] -> ShowS
ListSchemaVersions -> String
(Int -> ListSchemaVersions -> ShowS)
-> (ListSchemaVersions -> String)
-> ([ListSchemaVersions] -> ShowS)
-> Show ListSchemaVersions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSchemaVersions] -> ShowS
$cshowList :: [ListSchemaVersions] -> ShowS
show :: ListSchemaVersions -> String
$cshow :: ListSchemaVersions -> String
showsPrec :: Int -> ListSchemaVersions -> ShowS
$cshowsPrec :: Int -> ListSchemaVersions -> ShowS
Prelude.Show, (forall x. ListSchemaVersions -> Rep ListSchemaVersions x)
-> (forall x. Rep ListSchemaVersions x -> ListSchemaVersions)
-> Generic ListSchemaVersions
forall x. Rep ListSchemaVersions x -> ListSchemaVersions
forall x. ListSchemaVersions -> Rep ListSchemaVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSchemaVersions x -> ListSchemaVersions
$cfrom :: forall x. ListSchemaVersions -> Rep ListSchemaVersions x
Prelude.Generic)
newListSchemaVersions ::
Prelude.Text ->
Prelude.Text ->
ListSchemaVersions
newListSchemaVersions :: Text -> Text -> ListSchemaVersions
newListSchemaVersions Text
pRegistryName_ Text
pSchemaName_ =
ListSchemaVersions' :: Maybe Text -> Maybe Int -> Text -> Text -> ListSchemaVersions
ListSchemaVersions'
{ $sel:nextToken:ListSchemaVersions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limit:ListSchemaVersions' :: Maybe Int
limit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:registryName:ListSchemaVersions' :: Text
registryName = Text
pRegistryName_,
$sel:schemaName:ListSchemaVersions' :: Text
schemaName = Text
pSchemaName_
}
listSchemaVersions_nextToken :: Lens.Lens' ListSchemaVersions (Prelude.Maybe Prelude.Text)
listSchemaVersions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSchemaVersions -> f ListSchemaVersions
listSchemaVersions_nextToken = (ListSchemaVersions -> Maybe Text)
-> (ListSchemaVersions -> Maybe Text -> ListSchemaVersions)
-> Lens
ListSchemaVersions ListSchemaVersions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaVersions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSchemaVersions' :: ListSchemaVersions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSchemaVersions
s@ListSchemaVersions' {} Maybe Text
a -> ListSchemaVersions
s {$sel:nextToken:ListSchemaVersions' :: Maybe Text
nextToken = Maybe Text
a} :: ListSchemaVersions)
listSchemaVersions_limit :: Lens.Lens' ListSchemaVersions (Prelude.Maybe Prelude.Int)
listSchemaVersions_limit :: (Maybe Int -> f (Maybe Int))
-> ListSchemaVersions -> f ListSchemaVersions
listSchemaVersions_limit = (ListSchemaVersions -> Maybe Int)
-> (ListSchemaVersions -> Maybe Int -> ListSchemaVersions)
-> Lens
ListSchemaVersions ListSchemaVersions (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaVersions' {Maybe Int
limit :: Maybe Int
$sel:limit:ListSchemaVersions' :: ListSchemaVersions -> Maybe Int
limit} -> Maybe Int
limit) (\s :: ListSchemaVersions
s@ListSchemaVersions' {} Maybe Int
a -> ListSchemaVersions
s {$sel:limit:ListSchemaVersions' :: Maybe Int
limit = Maybe Int
a} :: ListSchemaVersions)
listSchemaVersions_registryName :: Lens.Lens' ListSchemaVersions Prelude.Text
listSchemaVersions_registryName :: (Text -> f Text) -> ListSchemaVersions -> f ListSchemaVersions
listSchemaVersions_registryName = (ListSchemaVersions -> Text)
-> (ListSchemaVersions -> Text -> ListSchemaVersions)
-> Lens ListSchemaVersions ListSchemaVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaVersions' {Text
registryName :: Text
$sel:registryName:ListSchemaVersions' :: ListSchemaVersions -> Text
registryName} -> Text
registryName) (\s :: ListSchemaVersions
s@ListSchemaVersions' {} Text
a -> ListSchemaVersions
s {$sel:registryName:ListSchemaVersions' :: Text
registryName = Text
a} :: ListSchemaVersions)
listSchemaVersions_schemaName :: Lens.Lens' ListSchemaVersions Prelude.Text
listSchemaVersions_schemaName :: (Text -> f Text) -> ListSchemaVersions -> f ListSchemaVersions
listSchemaVersions_schemaName = (ListSchemaVersions -> Text)
-> (ListSchemaVersions -> Text -> ListSchemaVersions)
-> Lens ListSchemaVersions ListSchemaVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaVersions' {Text
schemaName :: Text
$sel:schemaName:ListSchemaVersions' :: ListSchemaVersions -> Text
schemaName} -> Text
schemaName) (\s :: ListSchemaVersions
s@ListSchemaVersions' {} Text
a -> ListSchemaVersions
s {$sel:schemaName:ListSchemaVersions' :: Text
schemaName = Text
a} :: ListSchemaVersions)
instance Core.AWSPager ListSchemaVersions where
page :: ListSchemaVersions
-> AWSResponse ListSchemaVersions -> Maybe ListSchemaVersions
page ListSchemaVersions
rq AWSResponse ListSchemaVersions
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListSchemaVersions
ListSchemaVersionsResponse
rs
ListSchemaVersionsResponse
-> Getting (First Text) ListSchemaVersionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSchemaVersionsResponse
-> Const (First Text) ListSchemaVersionsResponse
Lens' ListSchemaVersionsResponse (Maybe Text)
listSchemaVersionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListSchemaVersionsResponse
-> Const (First Text) ListSchemaVersionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSchemaVersionsResponse 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 ListSchemaVersions
forall a. Maybe a
Prelude.Nothing
| Maybe [SchemaVersionSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListSchemaVersions
ListSchemaVersionsResponse
rs
ListSchemaVersionsResponse
-> Getting
(First [SchemaVersionSummary])
ListSchemaVersionsResponse
[SchemaVersionSummary]
-> Maybe [SchemaVersionSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [SchemaVersionSummary]
-> Const
(First [SchemaVersionSummary]) (Maybe [SchemaVersionSummary]))
-> ListSchemaVersionsResponse
-> Const (First [SchemaVersionSummary]) ListSchemaVersionsResponse
Lens' ListSchemaVersionsResponse (Maybe [SchemaVersionSummary])
listSchemaVersionsResponse_schemaVersions
((Maybe [SchemaVersionSummary]
-> Const
(First [SchemaVersionSummary]) (Maybe [SchemaVersionSummary]))
-> ListSchemaVersionsResponse
-> Const (First [SchemaVersionSummary]) ListSchemaVersionsResponse)
-> (([SchemaVersionSummary]
-> Const (First [SchemaVersionSummary]) [SchemaVersionSummary])
-> Maybe [SchemaVersionSummary]
-> Const
(First [SchemaVersionSummary]) (Maybe [SchemaVersionSummary]))
-> Getting
(First [SchemaVersionSummary])
ListSchemaVersionsResponse
[SchemaVersionSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([SchemaVersionSummary]
-> Const (First [SchemaVersionSummary]) [SchemaVersionSummary])
-> Maybe [SchemaVersionSummary]
-> Const
(First [SchemaVersionSummary]) (Maybe [SchemaVersionSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListSchemaVersions
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListSchemaVersions -> Maybe ListSchemaVersions
forall a. a -> Maybe a
Prelude.Just (ListSchemaVersions -> Maybe ListSchemaVersions)
-> ListSchemaVersions -> Maybe ListSchemaVersions
forall a b. (a -> b) -> a -> b
Prelude.$
ListSchemaVersions
rq
ListSchemaVersions
-> (ListSchemaVersions -> ListSchemaVersions) -> ListSchemaVersions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListSchemaVersions -> Identity ListSchemaVersions
Lens
ListSchemaVersions ListSchemaVersions (Maybe Text) (Maybe Text)
listSchemaVersions_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListSchemaVersions -> Identity ListSchemaVersions)
-> Maybe Text -> ListSchemaVersions -> ListSchemaVersions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSchemaVersions
ListSchemaVersionsResponse
rs
ListSchemaVersionsResponse
-> Getting (First Text) ListSchemaVersionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSchemaVersionsResponse
-> Const (First Text) ListSchemaVersionsResponse
Lens' ListSchemaVersionsResponse (Maybe Text)
listSchemaVersionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListSchemaVersionsResponse
-> Const (First Text) ListSchemaVersionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSchemaVersionsResponse 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 ListSchemaVersions where
type
AWSResponse ListSchemaVersions =
ListSchemaVersionsResponse
request :: ListSchemaVersions -> Request ListSchemaVersions
request = Service -> ListSchemaVersions -> Request ListSchemaVersions
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListSchemaVersions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListSchemaVersions)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListSchemaVersions))
-> Logger
-> Service
-> Proxy ListSchemaVersions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListSchemaVersions)))
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 [SchemaVersionSummary]
-> Maybe Text -> Int -> ListSchemaVersionsResponse
ListSchemaVersionsResponse'
(Maybe [SchemaVersionSummary]
-> Maybe Text -> Int -> ListSchemaVersionsResponse)
-> Either String (Maybe [SchemaVersionSummary])
-> Either String (Maybe Text -> Int -> ListSchemaVersionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (Maybe [SchemaVersionSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SchemaVersions" Either String (Maybe (Maybe [SchemaVersionSummary]))
-> Maybe [SchemaVersionSummary]
-> Either String (Maybe [SchemaVersionSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SchemaVersionSummary]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> ListSchemaVersionsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListSchemaVersionsResponse)
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 -> ListSchemaVersionsResponse)
-> Either String Int -> Either String ListSchemaVersionsResponse
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 ListSchemaVersions
instance Prelude.NFData ListSchemaVersions
instance Core.ToHeaders ListSchemaVersions where
toHeaders :: ListSchemaVersions -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListSchemaVersions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath ListSchemaVersions where
toPath :: ListSchemaVersions -> ByteString
toPath ListSchemaVersions' {Maybe Int
Maybe Text
Text
schemaName :: Text
registryName :: Text
limit :: Maybe Int
nextToken :: Maybe Text
$sel:schemaName:ListSchemaVersions' :: ListSchemaVersions -> Text
$sel:registryName:ListSchemaVersions' :: ListSchemaVersions -> Text
$sel:limit:ListSchemaVersions' :: ListSchemaVersions -> Maybe Int
$sel:nextToken:ListSchemaVersions' :: ListSchemaVersions -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v1/registries/name/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
registryName,
ByteString
"/schemas/name/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
schemaName,
ByteString
"/versions"
]
instance Core.ToQuery ListSchemaVersions where
toQuery :: ListSchemaVersions -> QueryString
toQuery ListSchemaVersions' {Maybe Int
Maybe Text
Text
schemaName :: Text
registryName :: Text
limit :: Maybe Int
nextToken :: Maybe Text
$sel:schemaName:ListSchemaVersions' :: ListSchemaVersions -> Text
$sel:registryName:ListSchemaVersions' :: ListSchemaVersions -> Text
$sel:limit:ListSchemaVersions' :: ListSchemaVersions -> Maybe Int
$sel:nextToken:ListSchemaVersions' :: ListSchemaVersions -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"limit" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
limit
]
data ListSchemaVersionsResponse = ListSchemaVersionsResponse'
{
ListSchemaVersionsResponse -> Maybe [SchemaVersionSummary]
schemaVersions :: Prelude.Maybe [SchemaVersionSummary],
ListSchemaVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListSchemaVersionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListSchemaVersionsResponse -> ListSchemaVersionsResponse -> Bool
(ListSchemaVersionsResponse -> ListSchemaVersionsResponse -> Bool)
-> (ListSchemaVersionsResponse
-> ListSchemaVersionsResponse -> Bool)
-> Eq ListSchemaVersionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSchemaVersionsResponse -> ListSchemaVersionsResponse -> Bool
$c/= :: ListSchemaVersionsResponse -> ListSchemaVersionsResponse -> Bool
== :: ListSchemaVersionsResponse -> ListSchemaVersionsResponse -> Bool
$c== :: ListSchemaVersionsResponse -> ListSchemaVersionsResponse -> Bool
Prelude.Eq, ReadPrec [ListSchemaVersionsResponse]
ReadPrec ListSchemaVersionsResponse
Int -> ReadS ListSchemaVersionsResponse
ReadS [ListSchemaVersionsResponse]
(Int -> ReadS ListSchemaVersionsResponse)
-> ReadS [ListSchemaVersionsResponse]
-> ReadPrec ListSchemaVersionsResponse
-> ReadPrec [ListSchemaVersionsResponse]
-> Read ListSchemaVersionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSchemaVersionsResponse]
$creadListPrec :: ReadPrec [ListSchemaVersionsResponse]
readPrec :: ReadPrec ListSchemaVersionsResponse
$creadPrec :: ReadPrec ListSchemaVersionsResponse
readList :: ReadS [ListSchemaVersionsResponse]
$creadList :: ReadS [ListSchemaVersionsResponse]
readsPrec :: Int -> ReadS ListSchemaVersionsResponse
$creadsPrec :: Int -> ReadS ListSchemaVersionsResponse
Prelude.Read, Int -> ListSchemaVersionsResponse -> ShowS
[ListSchemaVersionsResponse] -> ShowS
ListSchemaVersionsResponse -> String
(Int -> ListSchemaVersionsResponse -> ShowS)
-> (ListSchemaVersionsResponse -> String)
-> ([ListSchemaVersionsResponse] -> ShowS)
-> Show ListSchemaVersionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSchemaVersionsResponse] -> ShowS
$cshowList :: [ListSchemaVersionsResponse] -> ShowS
show :: ListSchemaVersionsResponse -> String
$cshow :: ListSchemaVersionsResponse -> String
showsPrec :: Int -> ListSchemaVersionsResponse -> ShowS
$cshowsPrec :: Int -> ListSchemaVersionsResponse -> ShowS
Prelude.Show, (forall x.
ListSchemaVersionsResponse -> Rep ListSchemaVersionsResponse x)
-> (forall x.
Rep ListSchemaVersionsResponse x -> ListSchemaVersionsResponse)
-> Generic ListSchemaVersionsResponse
forall x.
Rep ListSchemaVersionsResponse x -> ListSchemaVersionsResponse
forall x.
ListSchemaVersionsResponse -> Rep ListSchemaVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSchemaVersionsResponse x -> ListSchemaVersionsResponse
$cfrom :: forall x.
ListSchemaVersionsResponse -> Rep ListSchemaVersionsResponse x
Prelude.Generic)
newListSchemaVersionsResponse ::
Prelude.Int ->
ListSchemaVersionsResponse
newListSchemaVersionsResponse :: Int -> ListSchemaVersionsResponse
newListSchemaVersionsResponse Int
pHttpStatus_ =
ListSchemaVersionsResponse' :: Maybe [SchemaVersionSummary]
-> Maybe Text -> Int -> ListSchemaVersionsResponse
ListSchemaVersionsResponse'
{ $sel:schemaVersions:ListSchemaVersionsResponse' :: Maybe [SchemaVersionSummary]
schemaVersions =
Maybe [SchemaVersionSummary]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListSchemaVersionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListSchemaVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listSchemaVersionsResponse_schemaVersions :: Lens.Lens' ListSchemaVersionsResponse (Prelude.Maybe [SchemaVersionSummary])
listSchemaVersionsResponse_schemaVersions :: (Maybe [SchemaVersionSummary] -> f (Maybe [SchemaVersionSummary]))
-> ListSchemaVersionsResponse -> f ListSchemaVersionsResponse
listSchemaVersionsResponse_schemaVersions = (ListSchemaVersionsResponse -> Maybe [SchemaVersionSummary])
-> (ListSchemaVersionsResponse
-> Maybe [SchemaVersionSummary] -> ListSchemaVersionsResponse)
-> Lens' ListSchemaVersionsResponse (Maybe [SchemaVersionSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaVersionsResponse' {Maybe [SchemaVersionSummary]
schemaVersions :: Maybe [SchemaVersionSummary]
$sel:schemaVersions:ListSchemaVersionsResponse' :: ListSchemaVersionsResponse -> Maybe [SchemaVersionSummary]
schemaVersions} -> Maybe [SchemaVersionSummary]
schemaVersions) (\s :: ListSchemaVersionsResponse
s@ListSchemaVersionsResponse' {} Maybe [SchemaVersionSummary]
a -> ListSchemaVersionsResponse
s {$sel:schemaVersions:ListSchemaVersionsResponse' :: Maybe [SchemaVersionSummary]
schemaVersions = Maybe [SchemaVersionSummary]
a} :: ListSchemaVersionsResponse) ((Maybe [SchemaVersionSummary] -> f (Maybe [SchemaVersionSummary]))
-> ListSchemaVersionsResponse -> f ListSchemaVersionsResponse)
-> ((Maybe [SchemaVersionSummary]
-> f (Maybe [SchemaVersionSummary]))
-> Maybe [SchemaVersionSummary]
-> f (Maybe [SchemaVersionSummary]))
-> (Maybe [SchemaVersionSummary]
-> f (Maybe [SchemaVersionSummary]))
-> ListSchemaVersionsResponse
-> f ListSchemaVersionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SchemaVersionSummary]
[SchemaVersionSummary]
[SchemaVersionSummary]
[SchemaVersionSummary]
-> Iso
(Maybe [SchemaVersionSummary])
(Maybe [SchemaVersionSummary])
(Maybe [SchemaVersionSummary])
(Maybe [SchemaVersionSummary])
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
[SchemaVersionSummary]
[SchemaVersionSummary]
[SchemaVersionSummary]
[SchemaVersionSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listSchemaVersionsResponse_nextToken :: Lens.Lens' ListSchemaVersionsResponse (Prelude.Maybe Prelude.Text)
listSchemaVersionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSchemaVersionsResponse -> f ListSchemaVersionsResponse
listSchemaVersionsResponse_nextToken = (ListSchemaVersionsResponse -> Maybe Text)
-> (ListSchemaVersionsResponse
-> Maybe Text -> ListSchemaVersionsResponse)
-> Lens' ListSchemaVersionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSchemaVersionsResponse' :: ListSchemaVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSchemaVersionsResponse
s@ListSchemaVersionsResponse' {} Maybe Text
a -> ListSchemaVersionsResponse
s {$sel:nextToken:ListSchemaVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSchemaVersionsResponse)
listSchemaVersionsResponse_httpStatus :: Lens.Lens' ListSchemaVersionsResponse Prelude.Int
listSchemaVersionsResponse_httpStatus :: (Int -> f Int)
-> ListSchemaVersionsResponse -> f ListSchemaVersionsResponse
listSchemaVersionsResponse_httpStatus = (ListSchemaVersionsResponse -> Int)
-> (ListSchemaVersionsResponse
-> Int -> ListSchemaVersionsResponse)
-> Lens
ListSchemaVersionsResponse ListSchemaVersionsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchemaVersionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListSchemaVersionsResponse' :: ListSchemaVersionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListSchemaVersionsResponse
s@ListSchemaVersionsResponse' {} Int
a -> ListSchemaVersionsResponse
s {$sel:httpStatus:ListSchemaVersionsResponse' :: Int
httpStatus = Int
a} :: ListSchemaVersionsResponse)
instance Prelude.NFData ListSchemaVersionsResponse