{-# 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.ListAppliedSchemaArns
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists schema major versions applied to a directory. If @SchemaArn@ is
-- provided, lists the minor version.
--
-- This operation returns paginated results.
module Amazonka.CloudDirectory.ListAppliedSchemaArns
  ( -- * Creating a Request
    ListAppliedSchemaArns (..),
    newListAppliedSchemaArns,

    -- * Request Lenses
    listAppliedSchemaArns_maxResults,
    listAppliedSchemaArns_nextToken,
    listAppliedSchemaArns_schemaArn,
    listAppliedSchemaArns_directoryArn,

    -- * Destructuring the Response
    ListAppliedSchemaArnsResponse (..),
    newListAppliedSchemaArnsResponse,

    -- * Response Lenses
    listAppliedSchemaArnsResponse_nextToken,
    listAppliedSchemaArnsResponse_schemaArns,
    listAppliedSchemaArnsResponse_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

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

-- |
-- Create a value of 'ListAppliedSchemaArns' 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:
--
-- 'maxResults', 'listAppliedSchemaArns_maxResults' - The maximum number of results to retrieve.
--
-- 'nextToken', 'listAppliedSchemaArns_nextToken' - The pagination token.
--
-- 'schemaArn', 'listAppliedSchemaArns_schemaArn' - The response for @ListAppliedSchemaArns@ when this parameter is used
-- will list all minor version ARNs for a major version.
--
-- 'directoryArn', 'listAppliedSchemaArns_directoryArn' - The ARN of the directory you are listing.
newListAppliedSchemaArns ::
  -- | 'directoryArn'
  Prelude.Text ->
  ListAppliedSchemaArns
newListAppliedSchemaArns :: Text -> ListAppliedSchemaArns
newListAppliedSchemaArns Text
pDirectoryArn_ =
  ListAppliedSchemaArns'
    { $sel:maxResults:ListAppliedSchemaArns' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAppliedSchemaArns' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaArn:ListAppliedSchemaArns' :: Maybe Text
schemaArn = forall a. Maybe a
Prelude.Nothing,
      $sel:directoryArn:ListAppliedSchemaArns' :: Text
directoryArn = Text
pDirectoryArn_
    }

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

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

-- | The response for @ListAppliedSchemaArns@ when this parameter is used
-- will list all minor version ARNs for a major version.
listAppliedSchemaArns_schemaArn :: Lens.Lens' ListAppliedSchemaArns (Prelude.Maybe Prelude.Text)
listAppliedSchemaArns_schemaArn :: Lens' ListAppliedSchemaArns (Maybe Text)
listAppliedSchemaArns_schemaArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppliedSchemaArns' {Maybe Text
schemaArn :: Maybe Text
$sel:schemaArn:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Maybe Text
schemaArn} -> Maybe Text
schemaArn) (\s :: ListAppliedSchemaArns
s@ListAppliedSchemaArns' {} Maybe Text
a -> ListAppliedSchemaArns
s {$sel:schemaArn:ListAppliedSchemaArns' :: Maybe Text
schemaArn = Maybe Text
a} :: ListAppliedSchemaArns)

-- | The ARN of the directory you are listing.
listAppliedSchemaArns_directoryArn :: Lens.Lens' ListAppliedSchemaArns Prelude.Text
listAppliedSchemaArns_directoryArn :: Lens' ListAppliedSchemaArns Text
listAppliedSchemaArns_directoryArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppliedSchemaArns' {Text
directoryArn :: Text
$sel:directoryArn:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Text
directoryArn} -> Text
directoryArn) (\s :: ListAppliedSchemaArns
s@ListAppliedSchemaArns' {} Text
a -> ListAppliedSchemaArns
s {$sel:directoryArn:ListAppliedSchemaArns' :: Text
directoryArn = Text
a} :: ListAppliedSchemaArns)

instance Core.AWSPager ListAppliedSchemaArns where
  page :: ListAppliedSchemaArns
-> AWSResponse ListAppliedSchemaArns -> Maybe ListAppliedSchemaArns
page ListAppliedSchemaArns
rq AWSResponse ListAppliedSchemaArns
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAppliedSchemaArns
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAppliedSchemaArnsResponse (Maybe Text)
listAppliedSchemaArnsResponse_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 ListAppliedSchemaArns
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAppliedSchemaArnsResponse (Maybe [Text])
listAppliedSchemaArnsResponse_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.$ ListAppliedSchemaArns
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListAppliedSchemaArns (Maybe Text)
listAppliedSchemaArns_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAppliedSchemaArns
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAppliedSchemaArnsResponse (Maybe Text)
listAppliedSchemaArnsResponse_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 ListAppliedSchemaArns where
  type
    AWSResponse ListAppliedSchemaArns =
      ListAppliedSchemaArnsResponse
  request :: (Service -> Service)
-> ListAppliedSchemaArns -> Request ListAppliedSchemaArns
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 ListAppliedSchemaArns
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAppliedSchemaArns)))
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 -> ListAppliedSchemaArnsResponse
ListAppliedSchemaArnsResponse'
            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 ListAppliedSchemaArns where
  hashWithSalt :: Int -> ListAppliedSchemaArns -> Int
hashWithSalt Int
_salt ListAppliedSchemaArns' {Maybe Natural
Maybe Text
Text
directoryArn :: Text
schemaArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:directoryArn:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Text
$sel:schemaArn:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Maybe Text
$sel:nextToken:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Maybe Text
$sel:maxResults:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> 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
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
schemaArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
directoryArn

instance Prelude.NFData ListAppliedSchemaArns where
  rnf :: ListAppliedSchemaArns -> ()
rnf ListAppliedSchemaArns' {Maybe Natural
Maybe Text
Text
directoryArn :: Text
schemaArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:directoryArn:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Text
$sel:schemaArn:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Maybe Text
$sel:nextToken:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Maybe Text
$sel:maxResults:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> 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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
directoryArn

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

instance Data.ToJSON ListAppliedSchemaArns where
  toJSON :: ListAppliedSchemaArns -> Value
toJSON ListAppliedSchemaArns' {Maybe Natural
Maybe Text
Text
directoryArn :: Text
schemaArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:directoryArn:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Text
$sel:schemaArn:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Maybe Text
$sel:nextToken:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> Maybe Text
$sel:maxResults:ListAppliedSchemaArns' :: ListAppliedSchemaArns -> 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,
            (Key
"SchemaArn" 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
schemaArn,
            forall a. a -> Maybe a
Prelude.Just (Key
"DirectoryArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
directoryArn)
          ]
      )

instance Data.ToPath ListAppliedSchemaArns where
  toPath :: ListAppliedSchemaArns -> ByteString
toPath =
    forall a b. a -> b -> a
Prelude.const
      ByteString
"/amazonclouddirectory/2017-01-11/schema/applied"

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

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

-- |
-- Create a value of 'ListAppliedSchemaArnsResponse' 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', 'listAppliedSchemaArnsResponse_nextToken' - The pagination token.
--
-- 'schemaArns', 'listAppliedSchemaArnsResponse_schemaArns' - The ARNs of schemas that are applied to the directory.
--
-- 'httpStatus', 'listAppliedSchemaArnsResponse_httpStatus' - The response's http status code.
newListAppliedSchemaArnsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAppliedSchemaArnsResponse
newListAppliedSchemaArnsResponse :: Int -> ListAppliedSchemaArnsResponse
newListAppliedSchemaArnsResponse Int
pHttpStatus_ =
  ListAppliedSchemaArnsResponse'
    { $sel:nextToken:ListAppliedSchemaArnsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:schemaArns:ListAppliedSchemaArnsResponse' :: Maybe [Text]
schemaArns = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAppliedSchemaArnsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The ARNs of schemas that are applied to the directory.
listAppliedSchemaArnsResponse_schemaArns :: Lens.Lens' ListAppliedSchemaArnsResponse (Prelude.Maybe [Prelude.Text])
listAppliedSchemaArnsResponse_schemaArns :: Lens' ListAppliedSchemaArnsResponse (Maybe [Text])
listAppliedSchemaArnsResponse_schemaArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppliedSchemaArnsResponse' {Maybe [Text]
schemaArns :: Maybe [Text]
$sel:schemaArns:ListAppliedSchemaArnsResponse' :: ListAppliedSchemaArnsResponse -> Maybe [Text]
schemaArns} -> Maybe [Text]
schemaArns) (\s :: ListAppliedSchemaArnsResponse
s@ListAppliedSchemaArnsResponse' {} Maybe [Text]
a -> ListAppliedSchemaArnsResponse
s {$sel:schemaArns:ListAppliedSchemaArnsResponse' :: Maybe [Text]
schemaArns = Maybe [Text]
a} :: ListAppliedSchemaArnsResponse) 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

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

instance Prelude.NFData ListAppliedSchemaArnsResponse where
  rnf :: ListAppliedSchemaArnsResponse -> ()
rnf ListAppliedSchemaArnsResponse' {Int
Maybe [Text]
Maybe Text
httpStatus :: Int
schemaArns :: Maybe [Text]
nextToken :: Maybe Text
$sel:httpStatus:ListAppliedSchemaArnsResponse' :: ListAppliedSchemaArnsResponse -> Int
$sel:schemaArns:ListAppliedSchemaArnsResponse' :: ListAppliedSchemaArnsResponse -> Maybe [Text]
$sel:nextToken:ListAppliedSchemaArnsResponse' :: ListAppliedSchemaArnsResponse -> 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