{-# 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.Transcribe.ListVocabularies
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Provides a list of custom vocabularies that match the specified
-- criteria. If no criteria are specified, all custom vocabularies are
-- returned.
--
-- To get detailed information about a specific custom vocabulary, use the
-- operation.
module Amazonka.Transcribe.ListVocabularies
  ( -- * Creating a Request
    ListVocabularies (..),
    newListVocabularies,

    -- * Request Lenses
    listVocabularies_maxResults,
    listVocabularies_nameContains,
    listVocabularies_nextToken,
    listVocabularies_stateEquals,

    -- * Destructuring the Response
    ListVocabulariesResponse (..),
    newListVocabulariesResponse,

    -- * Response Lenses
    listVocabulariesResponse_nextToken,
    listVocabulariesResponse_status,
    listVocabulariesResponse_vocabularies,
    listVocabulariesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListVocabularies' smart constructor.
data ListVocabularies = ListVocabularies'
  { -- | The maximum number of custom vocabularies to return in each page of
    -- results. If there are fewer results than the value that you specify,
    -- only the actual results are returned. If you don\'t specify a value, a
    -- default of 5 is used.
    ListVocabularies -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Returns only the custom vocabularies that contain the specified string.
    -- The search is not case sensitive.
    ListVocabularies -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
    -- | If your @ListVocabularies@ request returns more results than can be
    -- displayed, @NextToken@ is displayed in the response with an associated
    -- string. To get the next page of results, copy this string and repeat
    -- your request, including @NextToken@ with the value of the copied string.
    -- Repeat as needed to view all your results.
    ListVocabularies -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Returns only custom vocabularies with the specified state. Vocabularies
    -- are ordered by creation date, with the newest vocabulary first. If you
    -- don\'t include @StateEquals@, all custom medical vocabularies are
    -- returned.
    ListVocabularies -> Maybe VocabularyState
stateEquals :: Prelude.Maybe VocabularyState
  }
  deriving (ListVocabularies -> ListVocabularies -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListVocabularies -> ListVocabularies -> Bool
$c/= :: ListVocabularies -> ListVocabularies -> Bool
== :: ListVocabularies -> ListVocabularies -> Bool
$c== :: ListVocabularies -> ListVocabularies -> Bool
Prelude.Eq, ReadPrec [ListVocabularies]
ReadPrec ListVocabularies
Int -> ReadS ListVocabularies
ReadS [ListVocabularies]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListVocabularies]
$creadListPrec :: ReadPrec [ListVocabularies]
readPrec :: ReadPrec ListVocabularies
$creadPrec :: ReadPrec ListVocabularies
readList :: ReadS [ListVocabularies]
$creadList :: ReadS [ListVocabularies]
readsPrec :: Int -> ReadS ListVocabularies
$creadsPrec :: Int -> ReadS ListVocabularies
Prelude.Read, Int -> ListVocabularies -> ShowS
[ListVocabularies] -> ShowS
ListVocabularies -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListVocabularies] -> ShowS
$cshowList :: [ListVocabularies] -> ShowS
show :: ListVocabularies -> String
$cshow :: ListVocabularies -> String
showsPrec :: Int -> ListVocabularies -> ShowS
$cshowsPrec :: Int -> ListVocabularies -> ShowS
Prelude.Show, forall x. Rep ListVocabularies x -> ListVocabularies
forall x. ListVocabularies -> Rep ListVocabularies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListVocabularies x -> ListVocabularies
$cfrom :: forall x. ListVocabularies -> Rep ListVocabularies x
Prelude.Generic)

-- |
-- Create a value of 'ListVocabularies' 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', 'listVocabularies_maxResults' - The maximum number of custom vocabularies to return in each page of
-- results. If there are fewer results than the value that you specify,
-- only the actual results are returned. If you don\'t specify a value, a
-- default of 5 is used.
--
-- 'nameContains', 'listVocabularies_nameContains' - Returns only the custom vocabularies that contain the specified string.
-- The search is not case sensitive.
--
-- 'nextToken', 'listVocabularies_nextToken' - If your @ListVocabularies@ request returns more results than can be
-- displayed, @NextToken@ is displayed in the response with an associated
-- string. To get the next page of results, copy this string and repeat
-- your request, including @NextToken@ with the value of the copied string.
-- Repeat as needed to view all your results.
--
-- 'stateEquals', 'listVocabularies_stateEquals' - Returns only custom vocabularies with the specified state. Vocabularies
-- are ordered by creation date, with the newest vocabulary first. If you
-- don\'t include @StateEquals@, all custom medical vocabularies are
-- returned.
newListVocabularies ::
  ListVocabularies
newListVocabularies :: ListVocabularies
newListVocabularies =
  ListVocabularies'
    { $sel:maxResults:ListVocabularies' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nameContains:ListVocabularies' :: Maybe Text
nameContains = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListVocabularies' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:stateEquals:ListVocabularies' :: Maybe VocabularyState
stateEquals = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of custom vocabularies to return in each page of
-- results. If there are fewer results than the value that you specify,
-- only the actual results are returned. If you don\'t specify a value, a
-- default of 5 is used.
listVocabularies_maxResults :: Lens.Lens' ListVocabularies (Prelude.Maybe Prelude.Natural)
listVocabularies_maxResults :: Lens' ListVocabularies (Maybe Natural)
listVocabularies_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVocabularies' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListVocabularies' :: ListVocabularies -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListVocabularies
s@ListVocabularies' {} Maybe Natural
a -> ListVocabularies
s {$sel:maxResults:ListVocabularies' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListVocabularies)

-- | Returns only the custom vocabularies that contain the specified string.
-- The search is not case sensitive.
listVocabularies_nameContains :: Lens.Lens' ListVocabularies (Prelude.Maybe Prelude.Text)
listVocabularies_nameContains :: Lens' ListVocabularies (Maybe Text)
listVocabularies_nameContains = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVocabularies' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListVocabularies' :: ListVocabularies -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListVocabularies
s@ListVocabularies' {} Maybe Text
a -> ListVocabularies
s {$sel:nameContains:ListVocabularies' :: Maybe Text
nameContains = Maybe Text
a} :: ListVocabularies)

-- | If your @ListVocabularies@ request returns more results than can be
-- displayed, @NextToken@ is displayed in the response with an associated
-- string. To get the next page of results, copy this string and repeat
-- your request, including @NextToken@ with the value of the copied string.
-- Repeat as needed to view all your results.
listVocabularies_nextToken :: Lens.Lens' ListVocabularies (Prelude.Maybe Prelude.Text)
listVocabularies_nextToken :: Lens' ListVocabularies (Maybe Text)
listVocabularies_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVocabularies' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListVocabularies' :: ListVocabularies -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListVocabularies
s@ListVocabularies' {} Maybe Text
a -> ListVocabularies
s {$sel:nextToken:ListVocabularies' :: Maybe Text
nextToken = Maybe Text
a} :: ListVocabularies)

-- | Returns only custom vocabularies with the specified state. Vocabularies
-- are ordered by creation date, with the newest vocabulary first. If you
-- don\'t include @StateEquals@, all custom medical vocabularies are
-- returned.
listVocabularies_stateEquals :: Lens.Lens' ListVocabularies (Prelude.Maybe VocabularyState)
listVocabularies_stateEquals :: Lens' ListVocabularies (Maybe VocabularyState)
listVocabularies_stateEquals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVocabularies' {Maybe VocabularyState
stateEquals :: Maybe VocabularyState
$sel:stateEquals:ListVocabularies' :: ListVocabularies -> Maybe VocabularyState
stateEquals} -> Maybe VocabularyState
stateEquals) (\s :: ListVocabularies
s@ListVocabularies' {} Maybe VocabularyState
a -> ListVocabularies
s {$sel:stateEquals:ListVocabularies' :: Maybe VocabularyState
stateEquals = Maybe VocabularyState
a} :: ListVocabularies)

instance Core.AWSRequest ListVocabularies where
  type
    AWSResponse ListVocabularies =
      ListVocabulariesResponse
  request :: (Service -> Service)
-> ListVocabularies -> Request ListVocabularies
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 ListVocabularies
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListVocabularies)))
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 VocabularyState
-> Maybe [VocabularyInfo]
-> Int
-> ListVocabulariesResponse
ListVocabulariesResponse'
            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
"Status")
            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
"Vocabularies" 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 ListVocabularies where
  hashWithSalt :: Int -> ListVocabularies -> Int
hashWithSalt Int
_salt ListVocabularies' {Maybe Natural
Maybe Text
Maybe VocabularyState
stateEquals :: Maybe VocabularyState
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
$sel:stateEquals:ListVocabularies' :: ListVocabularies -> Maybe VocabularyState
$sel:nextToken:ListVocabularies' :: ListVocabularies -> Maybe Text
$sel:nameContains:ListVocabularies' :: ListVocabularies -> Maybe Text
$sel:maxResults:ListVocabularies' :: ListVocabularies -> 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
nameContains
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VocabularyState
stateEquals

instance Prelude.NFData ListVocabularies where
  rnf :: ListVocabularies -> ()
rnf ListVocabularies' {Maybe Natural
Maybe Text
Maybe VocabularyState
stateEquals :: Maybe VocabularyState
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
$sel:stateEquals:ListVocabularies' :: ListVocabularies -> Maybe VocabularyState
$sel:nextToken:ListVocabularies' :: ListVocabularies -> Maybe Text
$sel:nameContains:ListVocabularies' :: ListVocabularies -> Maybe Text
$sel:maxResults:ListVocabularies' :: ListVocabularies -> 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
nameContains
      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 VocabularyState
stateEquals

instance Data.ToHeaders ListVocabularies where
  toHeaders :: ListVocabularies -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"Transcribe.ListVocabularies" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListVocabularies where
  toJSON :: ListVocabularies -> Value
toJSON ListVocabularies' {Maybe Natural
Maybe Text
Maybe VocabularyState
stateEquals :: Maybe VocabularyState
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
$sel:stateEquals:ListVocabularies' :: ListVocabularies -> Maybe VocabularyState
$sel:nextToken:ListVocabularies' :: ListVocabularies -> Maybe Text
$sel:nameContains:ListVocabularies' :: ListVocabularies -> Maybe Text
$sel:maxResults:ListVocabularies' :: ListVocabularies -> 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
"NameContains" 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
nameContains,
            (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
"StateEquals" 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 VocabularyState
stateEquals
          ]
      )

instance Data.ToPath ListVocabularies where
  toPath :: ListVocabularies -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListVocabulariesResponse' smart constructor.
data ListVocabulariesResponse = ListVocabulariesResponse'
  { -- | If @NextToken@ is present in your response, it indicates that not all
    -- results are displayed. To view the next set of results, copy the string
    -- associated with the @NextToken@ parameter in your results output, then
    -- run your request again including @NextToken@ with the value of the
    -- copied string. Repeat as needed to view all your results.
    ListVocabulariesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Lists all custom vocabularies that have the status specified in your
    -- request. Vocabularies are ordered by creation date, with the newest
    -- vocabulary first.
    ListVocabulariesResponse -> Maybe VocabularyState
status :: Prelude.Maybe VocabularyState,
    -- | Provides information about the custom vocabularies that match the
    -- criteria specified in your request.
    ListVocabulariesResponse -> Maybe [VocabularyInfo]
vocabularies :: Prelude.Maybe [VocabularyInfo],
    -- | The response's http status code.
    ListVocabulariesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListVocabulariesResponse -> ListVocabulariesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListVocabulariesResponse -> ListVocabulariesResponse -> Bool
$c/= :: ListVocabulariesResponse -> ListVocabulariesResponse -> Bool
== :: ListVocabulariesResponse -> ListVocabulariesResponse -> Bool
$c== :: ListVocabulariesResponse -> ListVocabulariesResponse -> Bool
Prelude.Eq, ReadPrec [ListVocabulariesResponse]
ReadPrec ListVocabulariesResponse
Int -> ReadS ListVocabulariesResponse
ReadS [ListVocabulariesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListVocabulariesResponse]
$creadListPrec :: ReadPrec [ListVocabulariesResponse]
readPrec :: ReadPrec ListVocabulariesResponse
$creadPrec :: ReadPrec ListVocabulariesResponse
readList :: ReadS [ListVocabulariesResponse]
$creadList :: ReadS [ListVocabulariesResponse]
readsPrec :: Int -> ReadS ListVocabulariesResponse
$creadsPrec :: Int -> ReadS ListVocabulariesResponse
Prelude.Read, Int -> ListVocabulariesResponse -> ShowS
[ListVocabulariesResponse] -> ShowS
ListVocabulariesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListVocabulariesResponse] -> ShowS
$cshowList :: [ListVocabulariesResponse] -> ShowS
show :: ListVocabulariesResponse -> String
$cshow :: ListVocabulariesResponse -> String
showsPrec :: Int -> ListVocabulariesResponse -> ShowS
$cshowsPrec :: Int -> ListVocabulariesResponse -> ShowS
Prelude.Show, forall x.
Rep ListVocabulariesResponse x -> ListVocabulariesResponse
forall x.
ListVocabulariesResponse -> Rep ListVocabulariesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListVocabulariesResponse x -> ListVocabulariesResponse
$cfrom :: forall x.
ListVocabulariesResponse -> Rep ListVocabulariesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListVocabulariesResponse' 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', 'listVocabulariesResponse_nextToken' - If @NextToken@ is present in your response, it indicates that not all
-- results are displayed. To view the next set of results, copy the string
-- associated with the @NextToken@ parameter in your results output, then
-- run your request again including @NextToken@ with the value of the
-- copied string. Repeat as needed to view all your results.
--
-- 'status', 'listVocabulariesResponse_status' - Lists all custom vocabularies that have the status specified in your
-- request. Vocabularies are ordered by creation date, with the newest
-- vocabulary first.
--
-- 'vocabularies', 'listVocabulariesResponse_vocabularies' - Provides information about the custom vocabularies that match the
-- criteria specified in your request.
--
-- 'httpStatus', 'listVocabulariesResponse_httpStatus' - The response's http status code.
newListVocabulariesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListVocabulariesResponse
newListVocabulariesResponse :: Int -> ListVocabulariesResponse
newListVocabulariesResponse Int
pHttpStatus_ =
  ListVocabulariesResponse'
    { $sel:nextToken:ListVocabulariesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListVocabulariesResponse' :: Maybe VocabularyState
status = forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularies:ListVocabulariesResponse' :: Maybe [VocabularyInfo]
vocabularies = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListVocabulariesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If @NextToken@ is present in your response, it indicates that not all
-- results are displayed. To view the next set of results, copy the string
-- associated with the @NextToken@ parameter in your results output, then
-- run your request again including @NextToken@ with the value of the
-- copied string. Repeat as needed to view all your results.
listVocabulariesResponse_nextToken :: Lens.Lens' ListVocabulariesResponse (Prelude.Maybe Prelude.Text)
listVocabulariesResponse_nextToken :: Lens' ListVocabulariesResponse (Maybe Text)
listVocabulariesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVocabulariesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListVocabulariesResponse' :: ListVocabulariesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListVocabulariesResponse
s@ListVocabulariesResponse' {} Maybe Text
a -> ListVocabulariesResponse
s {$sel:nextToken:ListVocabulariesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListVocabulariesResponse)

-- | Lists all custom vocabularies that have the status specified in your
-- request. Vocabularies are ordered by creation date, with the newest
-- vocabulary first.
listVocabulariesResponse_status :: Lens.Lens' ListVocabulariesResponse (Prelude.Maybe VocabularyState)
listVocabulariesResponse_status :: Lens' ListVocabulariesResponse (Maybe VocabularyState)
listVocabulariesResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVocabulariesResponse' {Maybe VocabularyState
status :: Maybe VocabularyState
$sel:status:ListVocabulariesResponse' :: ListVocabulariesResponse -> Maybe VocabularyState
status} -> Maybe VocabularyState
status) (\s :: ListVocabulariesResponse
s@ListVocabulariesResponse' {} Maybe VocabularyState
a -> ListVocabulariesResponse
s {$sel:status:ListVocabulariesResponse' :: Maybe VocabularyState
status = Maybe VocabularyState
a} :: ListVocabulariesResponse)

-- | Provides information about the custom vocabularies that match the
-- criteria specified in your request.
listVocabulariesResponse_vocabularies :: Lens.Lens' ListVocabulariesResponse (Prelude.Maybe [VocabularyInfo])
listVocabulariesResponse_vocabularies :: Lens' ListVocabulariesResponse (Maybe [VocabularyInfo])
listVocabulariesResponse_vocabularies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVocabulariesResponse' {Maybe [VocabularyInfo]
vocabularies :: Maybe [VocabularyInfo]
$sel:vocabularies:ListVocabulariesResponse' :: ListVocabulariesResponse -> Maybe [VocabularyInfo]
vocabularies} -> Maybe [VocabularyInfo]
vocabularies) (\s :: ListVocabulariesResponse
s@ListVocabulariesResponse' {} Maybe [VocabularyInfo]
a -> ListVocabulariesResponse
s {$sel:vocabularies:ListVocabulariesResponse' :: Maybe [VocabularyInfo]
vocabularies = Maybe [VocabularyInfo]
a} :: ListVocabulariesResponse) 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.
listVocabulariesResponse_httpStatus :: Lens.Lens' ListVocabulariesResponse Prelude.Int
listVocabulariesResponse_httpStatus :: Lens' ListVocabulariesResponse Int
listVocabulariesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVocabulariesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListVocabulariesResponse' :: ListVocabulariesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListVocabulariesResponse
s@ListVocabulariesResponse' {} Int
a -> ListVocabulariesResponse
s {$sel:httpStatus:ListVocabulariesResponse' :: Int
httpStatus = Int
a} :: ListVocabulariesResponse)

instance Prelude.NFData ListVocabulariesResponse where
  rnf :: ListVocabulariesResponse -> ()
rnf ListVocabulariesResponse' {Int
Maybe [VocabularyInfo]
Maybe Text
Maybe VocabularyState
httpStatus :: Int
vocabularies :: Maybe [VocabularyInfo]
status :: Maybe VocabularyState
nextToken :: Maybe Text
$sel:httpStatus:ListVocabulariesResponse' :: ListVocabulariesResponse -> Int
$sel:vocabularies:ListVocabulariesResponse' :: ListVocabulariesResponse -> Maybe [VocabularyInfo]
$sel:status:ListVocabulariesResponse' :: ListVocabulariesResponse -> Maybe VocabularyState
$sel:nextToken:ListVocabulariesResponse' :: ListVocabulariesResponse -> 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 VocabularyState
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [VocabularyInfo]
vocabularies
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus