{-# 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.ListMedicalVocabularies
-- 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)
--
-- Returns a list of vocabularies that match the specified criteria. If you
-- don\'t enter a value in any of the request parameters, returns the
-- entire list of vocabularies.
module Amazonka.Transcribe.ListMedicalVocabularies
  ( -- * Creating a Request
    ListMedicalVocabularies (..),
    newListMedicalVocabularies,

    -- * Request Lenses
    listMedicalVocabularies_nameContains,
    listMedicalVocabularies_nextToken,
    listMedicalVocabularies_stateEquals,
    listMedicalVocabularies_maxResults,

    -- * Destructuring the Response
    ListMedicalVocabulariesResponse (..),
    newListMedicalVocabulariesResponse,

    -- * Response Lenses
    listMedicalVocabulariesResponse_vocabularies,
    listMedicalVocabulariesResponse_status,
    listMedicalVocabulariesResponse_nextToken,
    listMedicalVocabulariesResponse_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.Transcribe.Types

-- | /See:/ 'newListMedicalVocabularies' smart constructor.
data ListMedicalVocabularies = ListMedicalVocabularies'
  { -- | Returns vocabularies whose names contain the specified string. The
    -- search is not case sensitive. @ListMedicalVocabularies@ returns both
    -- \"@vocabularyname@\" and \"@VocabularyName@\".
    ListMedicalVocabularies -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
    -- | If the result of your previous request to @ListMedicalVocabularies@ was
    -- truncated, include the @NextToken@ to fetch the next set of
    -- vocabularies.
    ListMedicalVocabularies -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | When specified, returns only vocabularies with the @VocabularyState@
    -- equal to the specified vocabulary state. Use this field to see which
    -- vocabularies are ready for your medical transcription jobs.
    ListMedicalVocabularies -> Maybe VocabularyState
stateEquals :: Prelude.Maybe VocabularyState,
    -- | The maximum number of vocabularies to return in each page of results. If
    -- there are fewer results than the value you specify, only the actual
    -- results are returned. If you do not specify a value, the default of 5 is
    -- used.
    ListMedicalVocabularies -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListMedicalVocabularies -> ListMedicalVocabularies -> Bool
(ListMedicalVocabularies -> ListMedicalVocabularies -> Bool)
-> (ListMedicalVocabularies -> ListMedicalVocabularies -> Bool)
-> Eq ListMedicalVocabularies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMedicalVocabularies -> ListMedicalVocabularies -> Bool
$c/= :: ListMedicalVocabularies -> ListMedicalVocabularies -> Bool
== :: ListMedicalVocabularies -> ListMedicalVocabularies -> Bool
$c== :: ListMedicalVocabularies -> ListMedicalVocabularies -> Bool
Prelude.Eq, ReadPrec [ListMedicalVocabularies]
ReadPrec ListMedicalVocabularies
Int -> ReadS ListMedicalVocabularies
ReadS [ListMedicalVocabularies]
(Int -> ReadS ListMedicalVocabularies)
-> ReadS [ListMedicalVocabularies]
-> ReadPrec ListMedicalVocabularies
-> ReadPrec [ListMedicalVocabularies]
-> Read ListMedicalVocabularies
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMedicalVocabularies]
$creadListPrec :: ReadPrec [ListMedicalVocabularies]
readPrec :: ReadPrec ListMedicalVocabularies
$creadPrec :: ReadPrec ListMedicalVocabularies
readList :: ReadS [ListMedicalVocabularies]
$creadList :: ReadS [ListMedicalVocabularies]
readsPrec :: Int -> ReadS ListMedicalVocabularies
$creadsPrec :: Int -> ReadS ListMedicalVocabularies
Prelude.Read, Int -> ListMedicalVocabularies -> ShowS
[ListMedicalVocabularies] -> ShowS
ListMedicalVocabularies -> String
(Int -> ListMedicalVocabularies -> ShowS)
-> (ListMedicalVocabularies -> String)
-> ([ListMedicalVocabularies] -> ShowS)
-> Show ListMedicalVocabularies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMedicalVocabularies] -> ShowS
$cshowList :: [ListMedicalVocabularies] -> ShowS
show :: ListMedicalVocabularies -> String
$cshow :: ListMedicalVocabularies -> String
showsPrec :: Int -> ListMedicalVocabularies -> ShowS
$cshowsPrec :: Int -> ListMedicalVocabularies -> ShowS
Prelude.Show, (forall x.
 ListMedicalVocabularies -> Rep ListMedicalVocabularies x)
-> (forall x.
    Rep ListMedicalVocabularies x -> ListMedicalVocabularies)
-> Generic ListMedicalVocabularies
forall x. Rep ListMedicalVocabularies x -> ListMedicalVocabularies
forall x. ListMedicalVocabularies -> Rep ListMedicalVocabularies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMedicalVocabularies x -> ListMedicalVocabularies
$cfrom :: forall x. ListMedicalVocabularies -> Rep ListMedicalVocabularies x
Prelude.Generic)

-- |
-- Create a value of 'ListMedicalVocabularies' 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:
--
-- 'nameContains', 'listMedicalVocabularies_nameContains' - Returns vocabularies whose names contain the specified string. The
-- search is not case sensitive. @ListMedicalVocabularies@ returns both
-- \"@vocabularyname@\" and \"@VocabularyName@\".
--
-- 'nextToken', 'listMedicalVocabularies_nextToken' - If the result of your previous request to @ListMedicalVocabularies@ was
-- truncated, include the @NextToken@ to fetch the next set of
-- vocabularies.
--
-- 'stateEquals', 'listMedicalVocabularies_stateEquals' - When specified, returns only vocabularies with the @VocabularyState@
-- equal to the specified vocabulary state. Use this field to see which
-- vocabularies are ready for your medical transcription jobs.
--
-- 'maxResults', 'listMedicalVocabularies_maxResults' - The maximum number of vocabularies to return in each page of results. If
-- there are fewer results than the value you specify, only the actual
-- results are returned. If you do not specify a value, the default of 5 is
-- used.
newListMedicalVocabularies ::
  ListMedicalVocabularies
newListMedicalVocabularies :: ListMedicalVocabularies
newListMedicalVocabularies =
  ListMedicalVocabularies' :: Maybe Text
-> Maybe Text
-> Maybe VocabularyState
-> Maybe Natural
-> ListMedicalVocabularies
ListMedicalVocabularies'
    { $sel:nameContains:ListMedicalVocabularies' :: Maybe Text
nameContains =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMedicalVocabularies' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stateEquals:ListMedicalVocabularies' :: Maybe VocabularyState
stateEquals = Maybe VocabularyState
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMedicalVocabularies' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Returns vocabularies whose names contain the specified string. The
-- search is not case sensitive. @ListMedicalVocabularies@ returns both
-- \"@vocabularyname@\" and \"@VocabularyName@\".
listMedicalVocabularies_nameContains :: Lens.Lens' ListMedicalVocabularies (Prelude.Maybe Prelude.Text)
listMedicalVocabularies_nameContains :: (Maybe Text -> f (Maybe Text))
-> ListMedicalVocabularies -> f ListMedicalVocabularies
listMedicalVocabularies_nameContains = (ListMedicalVocabularies -> Maybe Text)
-> (ListMedicalVocabularies
    -> Maybe Text -> ListMedicalVocabularies)
-> Lens
     ListMedicalVocabularies
     ListMedicalVocabularies
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalVocabularies' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListMedicalVocabularies
s@ListMedicalVocabularies' {} Maybe Text
a -> ListMedicalVocabularies
s {$sel:nameContains:ListMedicalVocabularies' :: Maybe Text
nameContains = Maybe Text
a} :: ListMedicalVocabularies)

-- | If the result of your previous request to @ListMedicalVocabularies@ was
-- truncated, include the @NextToken@ to fetch the next set of
-- vocabularies.
listMedicalVocabularies_nextToken :: Lens.Lens' ListMedicalVocabularies (Prelude.Maybe Prelude.Text)
listMedicalVocabularies_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMedicalVocabularies -> f ListMedicalVocabularies
listMedicalVocabularies_nextToken = (ListMedicalVocabularies -> Maybe Text)
-> (ListMedicalVocabularies
    -> Maybe Text -> ListMedicalVocabularies)
-> Lens
     ListMedicalVocabularies
     ListMedicalVocabularies
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalVocabularies' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMedicalVocabularies
s@ListMedicalVocabularies' {} Maybe Text
a -> ListMedicalVocabularies
s {$sel:nextToken:ListMedicalVocabularies' :: Maybe Text
nextToken = Maybe Text
a} :: ListMedicalVocabularies)

-- | When specified, returns only vocabularies with the @VocabularyState@
-- equal to the specified vocabulary state. Use this field to see which
-- vocabularies are ready for your medical transcription jobs.
listMedicalVocabularies_stateEquals :: Lens.Lens' ListMedicalVocabularies (Prelude.Maybe VocabularyState)
listMedicalVocabularies_stateEquals :: (Maybe VocabularyState -> f (Maybe VocabularyState))
-> ListMedicalVocabularies -> f ListMedicalVocabularies
listMedicalVocabularies_stateEquals = (ListMedicalVocabularies -> Maybe VocabularyState)
-> (ListMedicalVocabularies
    -> Maybe VocabularyState -> ListMedicalVocabularies)
-> Lens
     ListMedicalVocabularies
     ListMedicalVocabularies
     (Maybe VocabularyState)
     (Maybe VocabularyState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalVocabularies' {Maybe VocabularyState
stateEquals :: Maybe VocabularyState
$sel:stateEquals:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe VocabularyState
stateEquals} -> Maybe VocabularyState
stateEquals) (\s :: ListMedicalVocabularies
s@ListMedicalVocabularies' {} Maybe VocabularyState
a -> ListMedicalVocabularies
s {$sel:stateEquals:ListMedicalVocabularies' :: Maybe VocabularyState
stateEquals = Maybe VocabularyState
a} :: ListMedicalVocabularies)

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

instance Core.AWSRequest ListMedicalVocabularies where
  type
    AWSResponse ListMedicalVocabularies =
      ListMedicalVocabulariesResponse
  request :: ListMedicalVocabularies -> Request ListMedicalVocabularies
request = Service
-> ListMedicalVocabularies -> Request ListMedicalVocabularies
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListMedicalVocabularies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListMedicalVocabularies)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListMedicalVocabularies))
-> Logger
-> Service
-> Proxy ListMedicalVocabularies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListMedicalVocabularies)))
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 [VocabularyInfo]
-> Maybe VocabularyState
-> Maybe Text
-> Int
-> ListMedicalVocabulariesResponse
ListMedicalVocabulariesResponse'
            (Maybe [VocabularyInfo]
 -> Maybe VocabularyState
 -> Maybe Text
 -> Int
 -> ListMedicalVocabulariesResponse)
-> Either String (Maybe [VocabularyInfo])
-> Either
     String
     (Maybe VocabularyState
      -> Maybe Text -> Int -> ListMedicalVocabulariesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [VocabularyInfo]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Vocabularies" Either String (Maybe (Maybe [VocabularyInfo]))
-> Maybe [VocabularyInfo] -> Either String (Maybe [VocabularyInfo])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [VocabularyInfo]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe VocabularyState
   -> Maybe Text -> Int -> ListMedicalVocabulariesResponse)
-> Either String (Maybe VocabularyState)
-> Either
     String (Maybe Text -> Int -> ListMedicalVocabulariesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe VocabularyState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String (Maybe Text -> Int -> ListMedicalVocabulariesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListMedicalVocabulariesResponse)
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 -> ListMedicalVocabulariesResponse)
-> Either String Int
-> Either String ListMedicalVocabulariesResponse
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 ListMedicalVocabularies

instance Prelude.NFData ListMedicalVocabularies

instance Core.ToHeaders ListMedicalVocabularies where
  toHeaders :: ListMedicalVocabularies -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListMedicalVocabularies -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Transcribe.ListMedicalVocabularies" ::
                          Prelude.ByteString
                      ),
            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.ToJSON ListMedicalVocabularies where
  toJSON :: ListMedicalVocabularies -> Value
toJSON ListMedicalVocabularies' {Maybe Natural
Maybe Text
Maybe VocabularyState
maxResults :: Maybe Natural
stateEquals :: Maybe VocabularyState
nextToken :: Maybe Text
nameContains :: Maybe Text
$sel:maxResults:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Natural
$sel:stateEquals:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe VocabularyState
$sel:nextToken:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Text
$sel:nameContains:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NameContains" 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
nameContains,
            (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
"StateEquals" Text -> VocabularyState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VocabularyState -> Pair) -> Maybe VocabularyState -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VocabularyState
stateEquals,
            (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 ListMedicalVocabularies where
  toPath :: ListMedicalVocabularies -> ByteString
toPath = ByteString -> ListMedicalVocabularies -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListMedicalVocabulariesResponse' smart constructor.
data ListMedicalVocabulariesResponse = ListMedicalVocabulariesResponse'
  { -- | A list of objects that describe the vocabularies that match your search
    -- criteria.
    ListMedicalVocabulariesResponse -> Maybe [VocabularyInfo]
vocabularies :: Prelude.Maybe [VocabularyInfo],
    -- | The requested vocabulary state.
    ListMedicalVocabulariesResponse -> Maybe VocabularyState
status :: Prelude.Maybe VocabularyState,
    -- | The @ListMedicalVocabularies@ operation returns a page of vocabularies
    -- at a time. You set the maximum number of vocabularies to return on a
    -- page with the @MaxResults@ parameter. If there are more jobs in the list
    -- will fit on a page, Amazon Transcribe Medical returns the @NextPage@
    -- token. To return the next page of vocabularies, include the token in the
    -- next request to the @ListMedicalVocabularies@ operation .
    ListMedicalVocabulariesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListMedicalVocabulariesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMedicalVocabulariesResponse
-> ListMedicalVocabulariesResponse -> Bool
(ListMedicalVocabulariesResponse
 -> ListMedicalVocabulariesResponse -> Bool)
-> (ListMedicalVocabulariesResponse
    -> ListMedicalVocabulariesResponse -> Bool)
-> Eq ListMedicalVocabulariesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMedicalVocabulariesResponse
-> ListMedicalVocabulariesResponse -> Bool
$c/= :: ListMedicalVocabulariesResponse
-> ListMedicalVocabulariesResponse -> Bool
== :: ListMedicalVocabulariesResponse
-> ListMedicalVocabulariesResponse -> Bool
$c== :: ListMedicalVocabulariesResponse
-> ListMedicalVocabulariesResponse -> Bool
Prelude.Eq, ReadPrec [ListMedicalVocabulariesResponse]
ReadPrec ListMedicalVocabulariesResponse
Int -> ReadS ListMedicalVocabulariesResponse
ReadS [ListMedicalVocabulariesResponse]
(Int -> ReadS ListMedicalVocabulariesResponse)
-> ReadS [ListMedicalVocabulariesResponse]
-> ReadPrec ListMedicalVocabulariesResponse
-> ReadPrec [ListMedicalVocabulariesResponse]
-> Read ListMedicalVocabulariesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMedicalVocabulariesResponse]
$creadListPrec :: ReadPrec [ListMedicalVocabulariesResponse]
readPrec :: ReadPrec ListMedicalVocabulariesResponse
$creadPrec :: ReadPrec ListMedicalVocabulariesResponse
readList :: ReadS [ListMedicalVocabulariesResponse]
$creadList :: ReadS [ListMedicalVocabulariesResponse]
readsPrec :: Int -> ReadS ListMedicalVocabulariesResponse
$creadsPrec :: Int -> ReadS ListMedicalVocabulariesResponse
Prelude.Read, Int -> ListMedicalVocabulariesResponse -> ShowS
[ListMedicalVocabulariesResponse] -> ShowS
ListMedicalVocabulariesResponse -> String
(Int -> ListMedicalVocabulariesResponse -> ShowS)
-> (ListMedicalVocabulariesResponse -> String)
-> ([ListMedicalVocabulariesResponse] -> ShowS)
-> Show ListMedicalVocabulariesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMedicalVocabulariesResponse] -> ShowS
$cshowList :: [ListMedicalVocabulariesResponse] -> ShowS
show :: ListMedicalVocabulariesResponse -> String
$cshow :: ListMedicalVocabulariesResponse -> String
showsPrec :: Int -> ListMedicalVocabulariesResponse -> ShowS
$cshowsPrec :: Int -> ListMedicalVocabulariesResponse -> ShowS
Prelude.Show, (forall x.
 ListMedicalVocabulariesResponse
 -> Rep ListMedicalVocabulariesResponse x)
-> (forall x.
    Rep ListMedicalVocabulariesResponse x
    -> ListMedicalVocabulariesResponse)
-> Generic ListMedicalVocabulariesResponse
forall x.
Rep ListMedicalVocabulariesResponse x
-> ListMedicalVocabulariesResponse
forall x.
ListMedicalVocabulariesResponse
-> Rep ListMedicalVocabulariesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMedicalVocabulariesResponse x
-> ListMedicalVocabulariesResponse
$cfrom :: forall x.
ListMedicalVocabulariesResponse
-> Rep ListMedicalVocabulariesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMedicalVocabulariesResponse' 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:
--
-- 'vocabularies', 'listMedicalVocabulariesResponse_vocabularies' - A list of objects that describe the vocabularies that match your search
-- criteria.
--
-- 'status', 'listMedicalVocabulariesResponse_status' - The requested vocabulary state.
--
-- 'nextToken', 'listMedicalVocabulariesResponse_nextToken' - The @ListMedicalVocabularies@ operation returns a page of vocabularies
-- at a time. You set the maximum number of vocabularies to return on a
-- page with the @MaxResults@ parameter. If there are more jobs in the list
-- will fit on a page, Amazon Transcribe Medical returns the @NextPage@
-- token. To return the next page of vocabularies, include the token in the
-- next request to the @ListMedicalVocabularies@ operation .
--
-- 'httpStatus', 'listMedicalVocabulariesResponse_httpStatus' - The response's http status code.
newListMedicalVocabulariesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMedicalVocabulariesResponse
newListMedicalVocabulariesResponse :: Int -> ListMedicalVocabulariesResponse
newListMedicalVocabulariesResponse Int
pHttpStatus_ =
  ListMedicalVocabulariesResponse' :: Maybe [VocabularyInfo]
-> Maybe VocabularyState
-> Maybe Text
-> Int
-> ListMedicalVocabulariesResponse
ListMedicalVocabulariesResponse'
    { $sel:vocabularies:ListMedicalVocabulariesResponse' :: Maybe [VocabularyInfo]
vocabularies =
        Maybe [VocabularyInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListMedicalVocabulariesResponse' :: Maybe VocabularyState
status = Maybe VocabularyState
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMedicalVocabulariesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMedicalVocabulariesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of objects that describe the vocabularies that match your search
-- criteria.
listMedicalVocabulariesResponse_vocabularies :: Lens.Lens' ListMedicalVocabulariesResponse (Prelude.Maybe [VocabularyInfo])
listMedicalVocabulariesResponse_vocabularies :: (Maybe [VocabularyInfo] -> f (Maybe [VocabularyInfo]))
-> ListMedicalVocabulariesResponse
-> f ListMedicalVocabulariesResponse
listMedicalVocabulariesResponse_vocabularies = (ListMedicalVocabulariesResponse -> Maybe [VocabularyInfo])
-> (ListMedicalVocabulariesResponse
    -> Maybe [VocabularyInfo] -> ListMedicalVocabulariesResponse)
-> Lens
     ListMedicalVocabulariesResponse
     ListMedicalVocabulariesResponse
     (Maybe [VocabularyInfo])
     (Maybe [VocabularyInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalVocabulariesResponse' {Maybe [VocabularyInfo]
vocabularies :: Maybe [VocabularyInfo]
$sel:vocabularies:ListMedicalVocabulariesResponse' :: ListMedicalVocabulariesResponse -> Maybe [VocabularyInfo]
vocabularies} -> Maybe [VocabularyInfo]
vocabularies) (\s :: ListMedicalVocabulariesResponse
s@ListMedicalVocabulariesResponse' {} Maybe [VocabularyInfo]
a -> ListMedicalVocabulariesResponse
s {$sel:vocabularies:ListMedicalVocabulariesResponse' :: Maybe [VocabularyInfo]
vocabularies = Maybe [VocabularyInfo]
a} :: ListMedicalVocabulariesResponse) ((Maybe [VocabularyInfo] -> f (Maybe [VocabularyInfo]))
 -> ListMedicalVocabulariesResponse
 -> f ListMedicalVocabulariesResponse)
-> ((Maybe [VocabularyInfo] -> f (Maybe [VocabularyInfo]))
    -> Maybe [VocabularyInfo] -> f (Maybe [VocabularyInfo]))
-> (Maybe [VocabularyInfo] -> f (Maybe [VocabularyInfo]))
-> ListMedicalVocabulariesResponse
-> f ListMedicalVocabulariesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [VocabularyInfo] [VocabularyInfo] [VocabularyInfo] [VocabularyInfo]
-> Iso
     (Maybe [VocabularyInfo])
     (Maybe [VocabularyInfo])
     (Maybe [VocabularyInfo])
     (Maybe [VocabularyInfo])
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
  [VocabularyInfo] [VocabularyInfo] [VocabularyInfo] [VocabularyInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The requested vocabulary state.
listMedicalVocabulariesResponse_status :: Lens.Lens' ListMedicalVocabulariesResponse (Prelude.Maybe VocabularyState)
listMedicalVocabulariesResponse_status :: (Maybe VocabularyState -> f (Maybe VocabularyState))
-> ListMedicalVocabulariesResponse
-> f ListMedicalVocabulariesResponse
listMedicalVocabulariesResponse_status = (ListMedicalVocabulariesResponse -> Maybe VocabularyState)
-> (ListMedicalVocabulariesResponse
    -> Maybe VocabularyState -> ListMedicalVocabulariesResponse)
-> Lens
     ListMedicalVocabulariesResponse
     ListMedicalVocabulariesResponse
     (Maybe VocabularyState)
     (Maybe VocabularyState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalVocabulariesResponse' {Maybe VocabularyState
status :: Maybe VocabularyState
$sel:status:ListMedicalVocabulariesResponse' :: ListMedicalVocabulariesResponse -> Maybe VocabularyState
status} -> Maybe VocabularyState
status) (\s :: ListMedicalVocabulariesResponse
s@ListMedicalVocabulariesResponse' {} Maybe VocabularyState
a -> ListMedicalVocabulariesResponse
s {$sel:status:ListMedicalVocabulariesResponse' :: Maybe VocabularyState
status = Maybe VocabularyState
a} :: ListMedicalVocabulariesResponse)

-- | The @ListMedicalVocabularies@ operation returns a page of vocabularies
-- at a time. You set the maximum number of vocabularies to return on a
-- page with the @MaxResults@ parameter. If there are more jobs in the list
-- will fit on a page, Amazon Transcribe Medical returns the @NextPage@
-- token. To return the next page of vocabularies, include the token in the
-- next request to the @ListMedicalVocabularies@ operation .
listMedicalVocabulariesResponse_nextToken :: Lens.Lens' ListMedicalVocabulariesResponse (Prelude.Maybe Prelude.Text)
listMedicalVocabulariesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMedicalVocabulariesResponse
-> f ListMedicalVocabulariesResponse
listMedicalVocabulariesResponse_nextToken = (ListMedicalVocabulariesResponse -> Maybe Text)
-> (ListMedicalVocabulariesResponse
    -> Maybe Text -> ListMedicalVocabulariesResponse)
-> Lens
     ListMedicalVocabulariesResponse
     ListMedicalVocabulariesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMedicalVocabulariesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMedicalVocabulariesResponse' :: ListMedicalVocabulariesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMedicalVocabulariesResponse
s@ListMedicalVocabulariesResponse' {} Maybe Text
a -> ListMedicalVocabulariesResponse
s {$sel:nextToken:ListMedicalVocabulariesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMedicalVocabulariesResponse)

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

instance
  Prelude.NFData
    ListMedicalVocabulariesResponse