{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudDirectory.ListManagedSchemaArns
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the major version families of each managed schema. If a major
-- version ARN is provided as SchemaArn, the minor version revisions in
-- that family are listed instead.
--
-- This operation returns paginated results.
module Amazonka.CloudDirectory.ListManagedSchemaArns
  ( -- * Creating a Request
    ListManagedSchemaArns (..),
    newListManagedSchemaArns,

    -- * Request Lenses
    listManagedSchemaArns_nextToken,
    listManagedSchemaArns_schemaArn,
    listManagedSchemaArns_maxResults,

    -- * Destructuring the Response
    ListManagedSchemaArnsResponse (..),
    newListManagedSchemaArnsResponse,

    -- * Response Lenses
    listManagedSchemaArnsResponse_schemaArns,
    listManagedSchemaArnsResponse_nextToken,
    listManagedSchemaArnsResponse_httpStatus,
  )
where

import Amazonka.CloudDirectory.Types
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

-- | /See:/ 'newListManagedSchemaArns' smart constructor.
data ListManagedSchemaArns = ListManagedSchemaArns'
  { -- | The pagination token.
    ListManagedSchemaArns -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response for ListManagedSchemaArns. When this parameter is used, all
    -- minor version ARNs for a major version are listed.
    ListManagedSchemaArns -> Maybe Text
schemaArn :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to retrieve.
    ListManagedSchemaArns -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListManagedSchemaArns -> ListManagedSchemaArns -> Bool
(ListManagedSchemaArns -> ListManagedSchemaArns -> Bool)
-> (ListManagedSchemaArns -> ListManagedSchemaArns -> Bool)
-> Eq ListManagedSchemaArns
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListManagedSchemaArns -> ListManagedSchemaArns -> Bool
$c/= :: ListManagedSchemaArns -> ListManagedSchemaArns -> Bool
== :: ListManagedSchemaArns -> ListManagedSchemaArns -> Bool
$c== :: ListManagedSchemaArns -> ListManagedSchemaArns -> Bool
Prelude.Eq, ReadPrec [ListManagedSchemaArns]
ReadPrec ListManagedSchemaArns
Int -> ReadS ListManagedSchemaArns
ReadS [ListManagedSchemaArns]
(Int -> ReadS ListManagedSchemaArns)
-> ReadS [ListManagedSchemaArns]
-> ReadPrec ListManagedSchemaArns
-> ReadPrec [ListManagedSchemaArns]
-> Read ListManagedSchemaArns
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListManagedSchemaArns]
$creadListPrec :: ReadPrec [ListManagedSchemaArns]
readPrec :: ReadPrec ListManagedSchemaArns
$creadPrec :: ReadPrec ListManagedSchemaArns
readList :: ReadS [ListManagedSchemaArns]
$creadList :: ReadS [ListManagedSchemaArns]
readsPrec :: Int -> ReadS ListManagedSchemaArns
$creadsPrec :: Int -> ReadS ListManagedSchemaArns
Prelude.Read, Int -> ListManagedSchemaArns -> ShowS
[ListManagedSchemaArns] -> ShowS
ListManagedSchemaArns -> String
(Int -> ListManagedSchemaArns -> ShowS)
-> (ListManagedSchemaArns -> String)
-> ([ListManagedSchemaArns] -> ShowS)
-> Show ListManagedSchemaArns
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListManagedSchemaArns] -> ShowS
$cshowList :: [ListManagedSchemaArns] -> ShowS
show :: ListManagedSchemaArns -> String
$cshow :: ListManagedSchemaArns -> String
showsPrec :: Int -> ListManagedSchemaArns -> ShowS
$cshowsPrec :: Int -> ListManagedSchemaArns -> ShowS
Prelude.Show, (forall x. ListManagedSchemaArns -> Rep ListManagedSchemaArns x)
-> (forall x. Rep ListManagedSchemaArns x -> ListManagedSchemaArns)
-> Generic ListManagedSchemaArns
forall x. Rep ListManagedSchemaArns x -> ListManagedSchemaArns
forall x. ListManagedSchemaArns -> Rep ListManagedSchemaArns x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListManagedSchemaArns x -> ListManagedSchemaArns
$cfrom :: forall x. ListManagedSchemaArns -> Rep ListManagedSchemaArns x
Prelude.Generic)

-- |
-- Create a value of 'ListManagedSchemaArns' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listManagedSchemaArns_nextToken' - The pagination token.
--
-- 'schemaArn', 'listManagedSchemaArns_schemaArn' - The response for ListManagedSchemaArns. When this parameter is used, all
-- minor version ARNs for a major version are listed.
--
-- 'maxResults', 'listManagedSchemaArns_maxResults' - The maximum number of results to retrieve.
newListManagedSchemaArns ::
  ListManagedSchemaArns
newListManagedSchemaArns :: ListManagedSchemaArns
newListManagedSchemaArns =
  ListManagedSchemaArns' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListManagedSchemaArns
ListManagedSchemaArns'
    { $sel:nextToken:ListManagedSchemaArns' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaArn:ListManagedSchemaArns' :: Maybe Text
schemaArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListManagedSchemaArns' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The pagination token.
listManagedSchemaArns_nextToken :: Lens.Lens' ListManagedSchemaArns (Prelude.Maybe Prelude.Text)
listManagedSchemaArns_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListManagedSchemaArns -> f ListManagedSchemaArns
listManagedSchemaArns_nextToken = (ListManagedSchemaArns -> Maybe Text)
-> (ListManagedSchemaArns -> Maybe Text -> ListManagedSchemaArns)
-> Lens
     ListManagedSchemaArns
     ListManagedSchemaArns
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListManagedSchemaArns' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListManagedSchemaArns' :: ListManagedSchemaArns -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListManagedSchemaArns
s@ListManagedSchemaArns' {} Maybe Text
a -> ListManagedSchemaArns
s {$sel:nextToken:ListManagedSchemaArns' :: Maybe Text
nextToken = Maybe Text
a} :: ListManagedSchemaArns)

-- | The response for ListManagedSchemaArns. When this parameter is used, all
-- minor version ARNs for a major version are listed.
listManagedSchemaArns_schemaArn :: Lens.Lens' ListManagedSchemaArns (Prelude.Maybe Prelude.Text)
listManagedSchemaArns_schemaArn :: (Maybe Text -> f (Maybe Text))
-> ListManagedSchemaArns -> f ListManagedSchemaArns
listManagedSchemaArns_schemaArn = (ListManagedSchemaArns -> Maybe Text)
-> (ListManagedSchemaArns -> Maybe Text -> ListManagedSchemaArns)
-> Lens
     ListManagedSchemaArns
     ListManagedSchemaArns
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListManagedSchemaArns' {Maybe Text
schemaArn :: Maybe Text
$sel:schemaArn:ListManagedSchemaArns' :: ListManagedSchemaArns -> Maybe Text
schemaArn} -> Maybe Text
schemaArn) (\s :: ListManagedSchemaArns
s@ListManagedSchemaArns' {} Maybe Text
a -> ListManagedSchemaArns
s {$sel:schemaArn:ListManagedSchemaArns' :: Maybe Text
schemaArn = Maybe Text
a} :: ListManagedSchemaArns)

-- | The maximum number of results to retrieve.
listManagedSchemaArns_maxResults :: Lens.Lens' ListManagedSchemaArns (Prelude.Maybe Prelude.Natural)
listManagedSchemaArns_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListManagedSchemaArns -> f ListManagedSchemaArns
listManagedSchemaArns_maxResults = (ListManagedSchemaArns -> Maybe Natural)
-> (ListManagedSchemaArns
    -> Maybe Natural -> ListManagedSchemaArns)
-> Lens
     ListManagedSchemaArns
     ListManagedSchemaArns
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListManagedSchemaArns' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListManagedSchemaArns' :: ListManagedSchemaArns -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListManagedSchemaArns
s@ListManagedSchemaArns' {} Maybe Natural
a -> ListManagedSchemaArns
s {$sel:maxResults:ListManagedSchemaArns' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListManagedSchemaArns)

instance Core.AWSPager ListManagedSchemaArns where
  page :: ListManagedSchemaArns
-> AWSResponse ListManagedSchemaArns -> Maybe ListManagedSchemaArns
page ListManagedSchemaArns
rq AWSResponse ListManagedSchemaArns
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListManagedSchemaArns
ListManagedSchemaArnsResponse
rs
            ListManagedSchemaArnsResponse
-> Getting (First Text) ListManagedSchemaArnsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListManagedSchemaArnsResponse
-> Const (First Text) ListManagedSchemaArnsResponse
Lens' ListManagedSchemaArnsResponse (Maybe Text)
listManagedSchemaArnsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListManagedSchemaArnsResponse
 -> Const (First Text) ListManagedSchemaArnsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListManagedSchemaArnsResponse 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 ListManagedSchemaArns
forall a. Maybe a
Prelude.Nothing
    | Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListManagedSchemaArns
ListManagedSchemaArnsResponse
rs
            ListManagedSchemaArnsResponse
-> Getting (First [Text]) ListManagedSchemaArnsResponse [Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> ListManagedSchemaArnsResponse
-> Const (First [Text]) ListManagedSchemaArnsResponse
Lens' ListManagedSchemaArnsResponse (Maybe [Text])
listManagedSchemaArnsResponse_schemaArns
              ((Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
 -> ListManagedSchemaArnsResponse
 -> Const (First [Text]) ListManagedSchemaArnsResponse)
-> (([Text] -> Const (First [Text]) [Text])
    -> Maybe [Text] -> Const (First [Text]) (Maybe [Text]))
-> Getting (First [Text]) ListManagedSchemaArnsResponse [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 ListManagedSchemaArns
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListManagedSchemaArns -> Maybe ListManagedSchemaArns
forall a. a -> Maybe a
Prelude.Just (ListManagedSchemaArns -> Maybe ListManagedSchemaArns)
-> ListManagedSchemaArns -> Maybe ListManagedSchemaArns
forall a b. (a -> b) -> a -> b
Prelude.$
        ListManagedSchemaArns
rq
          ListManagedSchemaArns
-> (ListManagedSchemaArns -> ListManagedSchemaArns)
-> ListManagedSchemaArns
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListManagedSchemaArns -> Identity ListManagedSchemaArns
Lens
  ListManagedSchemaArns
  ListManagedSchemaArns
  (Maybe Text)
  (Maybe Text)
listManagedSchemaArns_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListManagedSchemaArns -> Identity ListManagedSchemaArns)
-> Maybe Text -> ListManagedSchemaArns -> ListManagedSchemaArns
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListManagedSchemaArns
ListManagedSchemaArnsResponse
rs
          ListManagedSchemaArnsResponse
-> Getting (First Text) ListManagedSchemaArnsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListManagedSchemaArnsResponse
-> Const (First Text) ListManagedSchemaArnsResponse
Lens' ListManagedSchemaArnsResponse (Maybe Text)
listManagedSchemaArnsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListManagedSchemaArnsResponse
 -> Const (First Text) ListManagedSchemaArnsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListManagedSchemaArnsResponse 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 ListManagedSchemaArns where
  type
    AWSResponse ListManagedSchemaArns =
      ListManagedSchemaArnsResponse
  request :: ListManagedSchemaArns -> Request ListManagedSchemaArns
request = Service -> ListManagedSchemaArns -> Request ListManagedSchemaArns
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListManagedSchemaArns
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListManagedSchemaArns)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListManagedSchemaArns))
-> Logger
-> Service
-> Proxy ListManagedSchemaArns
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListManagedSchemaArns)))
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 Text -> Int -> ListManagedSchemaArnsResponse
ListManagedSchemaArnsResponse'
            (Maybe [Text]
 -> Maybe Text -> Int -> ListManagedSchemaArnsResponse)
-> Either String (Maybe [Text])
-> Either
     String (Maybe Text -> Int -> ListManagedSchemaArnsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SchemaArns" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListManagedSchemaArnsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListManagedSchemaArnsResponse)
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 -> ListManagedSchemaArnsResponse)
-> Either String Int -> Either String ListManagedSchemaArnsResponse
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 ListManagedSchemaArns

instance Prelude.NFData ListManagedSchemaArns

instance Core.ToHeaders ListManagedSchemaArns where
  toHeaders :: ListManagedSchemaArns -> ResponseHeaders
toHeaders = ResponseHeaders -> ListManagedSchemaArns -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON ListManagedSchemaArns where
  toJSON :: ListManagedSchemaArns -> Value
toJSON ListManagedSchemaArns' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
schemaArn :: Maybe Text
nextToken :: Maybe Text
$sel:maxResults:ListManagedSchemaArns' :: ListManagedSchemaArns -> Maybe Natural
$sel:schemaArn:ListManagedSchemaArns' :: ListManagedSchemaArns -> Maybe Text
$sel:nextToken:ListManagedSchemaArns' :: ListManagedSchemaArns -> 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
"SchemaArn" 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
schemaArn,
            (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
          ]
      )

instance Core.ToPath ListManagedSchemaArns where
  toPath :: ListManagedSchemaArns -> ByteString
toPath =
    ByteString -> ListManagedSchemaArns -> ByteString
forall a b. a -> b -> a
Prelude.const
      ByteString
"/amazonclouddirectory/2017-01-11/schema/managed"

instance Core.ToQuery ListManagedSchemaArns where
  toQuery :: ListManagedSchemaArns -> QueryString
toQuery = QueryString -> ListManagedSchemaArns -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListManagedSchemaArnsResponse' smart constructor.
data ListManagedSchemaArnsResponse = ListManagedSchemaArnsResponse'
  { -- | The ARNs for all AWS managed schemas.
    ListManagedSchemaArnsResponse -> Maybe [Text]
schemaArns :: Prelude.Maybe [Prelude.Text],
    -- | The pagination token.
    ListManagedSchemaArnsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListManagedSchemaArnsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListManagedSchemaArnsResponse
-> ListManagedSchemaArnsResponse -> Bool
(ListManagedSchemaArnsResponse
 -> ListManagedSchemaArnsResponse -> Bool)
-> (ListManagedSchemaArnsResponse
    -> ListManagedSchemaArnsResponse -> Bool)
-> Eq ListManagedSchemaArnsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListManagedSchemaArnsResponse
-> ListManagedSchemaArnsResponse -> Bool
$c/= :: ListManagedSchemaArnsResponse
-> ListManagedSchemaArnsResponse -> Bool
== :: ListManagedSchemaArnsResponse
-> ListManagedSchemaArnsResponse -> Bool
$c== :: ListManagedSchemaArnsResponse
-> ListManagedSchemaArnsResponse -> Bool
Prelude.Eq, ReadPrec [ListManagedSchemaArnsResponse]
ReadPrec ListManagedSchemaArnsResponse
Int -> ReadS ListManagedSchemaArnsResponse
ReadS [ListManagedSchemaArnsResponse]
(Int -> ReadS ListManagedSchemaArnsResponse)
-> ReadS [ListManagedSchemaArnsResponse]
-> ReadPrec ListManagedSchemaArnsResponse
-> ReadPrec [ListManagedSchemaArnsResponse]
-> Read ListManagedSchemaArnsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListManagedSchemaArnsResponse]
$creadListPrec :: ReadPrec [ListManagedSchemaArnsResponse]
readPrec :: ReadPrec ListManagedSchemaArnsResponse
$creadPrec :: ReadPrec ListManagedSchemaArnsResponse
readList :: ReadS [ListManagedSchemaArnsResponse]
$creadList :: ReadS [ListManagedSchemaArnsResponse]
readsPrec :: Int -> ReadS ListManagedSchemaArnsResponse
$creadsPrec :: Int -> ReadS ListManagedSchemaArnsResponse
Prelude.Read, Int -> ListManagedSchemaArnsResponse -> ShowS
[ListManagedSchemaArnsResponse] -> ShowS
ListManagedSchemaArnsResponse -> String
(Int -> ListManagedSchemaArnsResponse -> ShowS)
-> (ListManagedSchemaArnsResponse -> String)
-> ([ListManagedSchemaArnsResponse] -> ShowS)
-> Show ListManagedSchemaArnsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListManagedSchemaArnsResponse] -> ShowS
$cshowList :: [ListManagedSchemaArnsResponse] -> ShowS
show :: ListManagedSchemaArnsResponse -> String
$cshow :: ListManagedSchemaArnsResponse -> String
showsPrec :: Int -> ListManagedSchemaArnsResponse -> ShowS
$cshowsPrec :: Int -> ListManagedSchemaArnsResponse -> ShowS
Prelude.Show, (forall x.
 ListManagedSchemaArnsResponse
 -> Rep ListManagedSchemaArnsResponse x)
-> (forall x.
    Rep ListManagedSchemaArnsResponse x
    -> ListManagedSchemaArnsResponse)
-> Generic ListManagedSchemaArnsResponse
forall x.
Rep ListManagedSchemaArnsResponse x
-> ListManagedSchemaArnsResponse
forall x.
ListManagedSchemaArnsResponse
-> Rep ListManagedSchemaArnsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListManagedSchemaArnsResponse x
-> ListManagedSchemaArnsResponse
$cfrom :: forall x.
ListManagedSchemaArnsResponse
-> Rep ListManagedSchemaArnsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListManagedSchemaArnsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'schemaArns', 'listManagedSchemaArnsResponse_schemaArns' - The ARNs for all AWS managed schemas.
--
-- 'nextToken', 'listManagedSchemaArnsResponse_nextToken' - The pagination token.
--
-- 'httpStatus', 'listManagedSchemaArnsResponse_httpStatus' - The response's http status code.
newListManagedSchemaArnsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListManagedSchemaArnsResponse
newListManagedSchemaArnsResponse :: Int -> ListManagedSchemaArnsResponse
newListManagedSchemaArnsResponse Int
pHttpStatus_ =
  ListManagedSchemaArnsResponse' :: Maybe [Text] -> Maybe Text -> Int -> ListManagedSchemaArnsResponse
ListManagedSchemaArnsResponse'
    { $sel:schemaArns:ListManagedSchemaArnsResponse' :: Maybe [Text]
schemaArns =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListManagedSchemaArnsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListManagedSchemaArnsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARNs for all AWS managed schemas.
listManagedSchemaArnsResponse_schemaArns :: Lens.Lens' ListManagedSchemaArnsResponse (Prelude.Maybe [Prelude.Text])
listManagedSchemaArnsResponse_schemaArns :: (Maybe [Text] -> f (Maybe [Text]))
-> ListManagedSchemaArnsResponse -> f ListManagedSchemaArnsResponse
listManagedSchemaArnsResponse_schemaArns = (ListManagedSchemaArnsResponse -> Maybe [Text])
-> (ListManagedSchemaArnsResponse
    -> Maybe [Text] -> ListManagedSchemaArnsResponse)
-> Lens' ListManagedSchemaArnsResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListManagedSchemaArnsResponse' {Maybe [Text]
schemaArns :: Maybe [Text]
$sel:schemaArns:ListManagedSchemaArnsResponse' :: ListManagedSchemaArnsResponse -> Maybe [Text]
schemaArns} -> Maybe [Text]
schemaArns) (\s :: ListManagedSchemaArnsResponse
s@ListManagedSchemaArnsResponse' {} Maybe [Text]
a -> ListManagedSchemaArnsResponse
s {$sel:schemaArns:ListManagedSchemaArnsResponse' :: Maybe [Text]
schemaArns = Maybe [Text]
a} :: ListManagedSchemaArnsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListManagedSchemaArnsResponse
 -> f ListManagedSchemaArnsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListManagedSchemaArnsResponse
-> f ListManagedSchemaArnsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token.
listManagedSchemaArnsResponse_nextToken :: Lens.Lens' ListManagedSchemaArnsResponse (Prelude.Maybe Prelude.Text)
listManagedSchemaArnsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListManagedSchemaArnsResponse -> f ListManagedSchemaArnsResponse
listManagedSchemaArnsResponse_nextToken = (ListManagedSchemaArnsResponse -> Maybe Text)
-> (ListManagedSchemaArnsResponse
    -> Maybe Text -> ListManagedSchemaArnsResponse)
-> Lens' ListManagedSchemaArnsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListManagedSchemaArnsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListManagedSchemaArnsResponse' :: ListManagedSchemaArnsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListManagedSchemaArnsResponse
s@ListManagedSchemaArnsResponse' {} Maybe Text
a -> ListManagedSchemaArnsResponse
s {$sel:nextToken:ListManagedSchemaArnsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListManagedSchemaArnsResponse)

-- | The response's http status code.
listManagedSchemaArnsResponse_httpStatus :: Lens.Lens' ListManagedSchemaArnsResponse Prelude.Int
listManagedSchemaArnsResponse_httpStatus :: (Int -> f Int)
-> ListManagedSchemaArnsResponse -> f ListManagedSchemaArnsResponse
listManagedSchemaArnsResponse_httpStatus = (ListManagedSchemaArnsResponse -> Int)
-> (ListManagedSchemaArnsResponse
    -> Int -> ListManagedSchemaArnsResponse)
-> Lens
     ListManagedSchemaArnsResponse ListManagedSchemaArnsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListManagedSchemaArnsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListManagedSchemaArnsResponse' :: ListManagedSchemaArnsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListManagedSchemaArnsResponse
s@ListManagedSchemaArnsResponse' {} Int
a -> ListManagedSchemaArnsResponse
s {$sel:httpStatus:ListManagedSchemaArnsResponse' :: Int
httpStatus = Int
a} :: ListManagedSchemaArnsResponse)

instance Prelude.NFData ListManagedSchemaArnsResponse