{-# 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-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 medical vocabularies that match the specified
-- criteria. If no criteria are specified, all custom medical vocabularies
-- are returned.
--
-- To get detailed information about a specific custom medical vocabulary,
-- use the operation.
module Amazonka.Transcribe.ListMedicalVocabularies
  ( -- * Creating a Request
    ListMedicalVocabularies (..),
    newListMedicalVocabularies,

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

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

    -- * Response Lenses
    listMedicalVocabulariesResponse_nextToken,
    listMedicalVocabulariesResponse_status,
    listMedicalVocabulariesResponse_vocabularies,
    listMedicalVocabulariesResponse_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:/ 'newListMedicalVocabularies' smart constructor.
data ListMedicalVocabularies = ListMedicalVocabularies'
  { -- | The maximum number of custom medical 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.
    ListMedicalVocabularies -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Returns only the custom medical vocabularies that contain the specified
    -- string. The search is not case sensitive.
    ListMedicalVocabularies -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
    -- | If your @ListMedicalVocabularies@ 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.
    ListMedicalVocabularies -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Returns only custom medical vocabularies with the specified state.
    -- Custom vocabularies are ordered by creation date, with the newest
    -- vocabulary first. If you don\'t include @StateEquals@, all custom
    -- medical vocabularies are returned.
    ListMedicalVocabularies -> Maybe VocabularyState
stateEquals :: Prelude.Maybe VocabularyState
  }
  deriving (ListMedicalVocabularies -> ListMedicalVocabularies -> Bool
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]
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
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. 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:
--
-- 'maxResults', 'listMedicalVocabularies_maxResults' - The maximum number of custom medical 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', 'listMedicalVocabularies_nameContains' - Returns only the custom medical vocabularies that contain the specified
-- string. The search is not case sensitive.
--
-- 'nextToken', 'listMedicalVocabularies_nextToken' - If your @ListMedicalVocabularies@ 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', 'listMedicalVocabularies_stateEquals' - Returns only custom medical vocabularies with the specified state.
-- Custom vocabularies are ordered by creation date, with the newest
-- vocabulary first. If you don\'t include @StateEquals@, all custom
-- medical vocabularies are returned.
newListMedicalVocabularies ::
  ListMedicalVocabularies
newListMedicalVocabularies :: ListMedicalVocabularies
newListMedicalVocabularies =
  ListMedicalVocabularies'
    { $sel:maxResults:ListMedicalVocabularies' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nameContains:ListMedicalVocabularies' :: Maybe Text
nameContains = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMedicalVocabularies' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:stateEquals:ListMedicalVocabularies' :: Maybe VocabularyState
stateEquals = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of custom medical 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.
listMedicalVocabularies_maxResults :: Lens.Lens' ListMedicalVocabularies (Prelude.Maybe Prelude.Natural)
listMedicalVocabularies_maxResults :: Lens' ListMedicalVocabularies (Maybe Natural)
listMedicalVocabularies_maxResults = 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)

-- | Returns only the custom medical vocabularies that contain the specified
-- string. The search is not case sensitive.
listMedicalVocabularies_nameContains :: Lens.Lens' ListMedicalVocabularies (Prelude.Maybe Prelude.Text)
listMedicalVocabularies_nameContains :: Lens' ListMedicalVocabularies (Maybe Text)
listMedicalVocabularies_nameContains = 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 your @ListMedicalVocabularies@ 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.
listMedicalVocabularies_nextToken :: Lens.Lens' ListMedicalVocabularies (Prelude.Maybe Prelude.Text)
listMedicalVocabularies_nextToken :: Lens' ListMedicalVocabularies (Maybe Text)
listMedicalVocabularies_nextToken = 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)

-- | Returns only custom medical vocabularies with the specified state.
-- Custom vocabularies are ordered by creation date, with the newest
-- vocabulary first. If you don\'t include @StateEquals@, all custom
-- medical vocabularies are returned.
listMedicalVocabularies_stateEquals :: Lens.Lens' ListMedicalVocabularies (Prelude.Maybe VocabularyState)
listMedicalVocabularies_stateEquals :: Lens' ListMedicalVocabularies (Maybe VocabularyState)
listMedicalVocabularies_stateEquals = 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)

instance Core.AWSRequest ListMedicalVocabularies where
  type
    AWSResponse ListMedicalVocabularies =
      ListMedicalVocabulariesResponse
  request :: (Service -> Service)
-> ListMedicalVocabularies -> Request ListMedicalVocabularies
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 ListMedicalVocabularies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListMedicalVocabularies)))
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
-> ListMedicalVocabulariesResponse
ListMedicalVocabulariesResponse'
            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 ListMedicalVocabularies where
  hashWithSalt :: Int -> ListMedicalVocabularies -> Int
hashWithSalt Int
_salt ListMedicalVocabularies' {Maybe Natural
Maybe Text
Maybe VocabularyState
stateEquals :: Maybe VocabularyState
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
$sel:stateEquals:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe VocabularyState
$sel:nextToken:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Text
$sel:nameContains:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Text
$sel:maxResults:ListMedicalVocabularies' :: ListMedicalVocabularies -> 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 ListMedicalVocabularies where
  rnf :: ListMedicalVocabularies -> ()
rnf ListMedicalVocabularies' {Maybe Natural
Maybe Text
Maybe VocabularyState
stateEquals :: Maybe VocabularyState
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
$sel:stateEquals:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe VocabularyState
$sel:nextToken:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Text
$sel:nameContains:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Text
$sel:maxResults:ListMedicalVocabularies' :: ListMedicalVocabularies -> 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 ListMedicalVocabularies where
  toHeaders :: ListMedicalVocabularies -> 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.ListMedicalVocabularies" ::
                          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 ListMedicalVocabularies where
  toJSON :: ListMedicalVocabularies -> Value
toJSON ListMedicalVocabularies' {Maybe Natural
Maybe Text
Maybe VocabularyState
stateEquals :: Maybe VocabularyState
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
$sel:stateEquals:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe VocabularyState
$sel:nextToken:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Text
$sel:nameContains:ListMedicalVocabularies' :: ListMedicalVocabularies -> Maybe Text
$sel:maxResults:ListMedicalVocabularies' :: ListMedicalVocabularies -> 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 ListMedicalVocabularies where
  toPath :: ListMedicalVocabularies -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newListMedicalVocabulariesResponse' smart constructor.
data ListMedicalVocabulariesResponse = ListMedicalVocabulariesResponse'
  { -- | 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.
    ListMedicalVocabulariesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Lists all custom medical vocabularies that have the status specified in
    -- your request. Custom vocabularies are ordered by creation date, with the
    -- newest vocabulary first.
    ListMedicalVocabulariesResponse -> Maybe VocabularyState
status :: Prelude.Maybe VocabularyState,
    -- | Provides information about the custom medical vocabularies that match
    -- the criteria specified in your request.
    ListMedicalVocabulariesResponse -> Maybe [VocabularyInfo]
vocabularies :: Prelude.Maybe [VocabularyInfo],
    -- | The response's http status code.
    ListMedicalVocabulariesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMedicalVocabulariesResponse
-> ListMedicalVocabulariesResponse -> Bool
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]
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
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.
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:
--
-- 'nextToken', 'listMedicalVocabulariesResponse_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', 'listMedicalVocabulariesResponse_status' - Lists all custom medical vocabularies that have the status specified in
-- your request. Custom vocabularies are ordered by creation date, with the
-- newest vocabulary first.
--
-- 'vocabularies', 'listMedicalVocabulariesResponse_vocabularies' - Provides information about the custom medical vocabularies that match
-- the criteria specified in your request.
--
-- 'httpStatus', 'listMedicalVocabulariesResponse_httpStatus' - The response's http status code.
newListMedicalVocabulariesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMedicalVocabulariesResponse
newListMedicalVocabulariesResponse :: Int -> ListMedicalVocabulariesResponse
newListMedicalVocabulariesResponse Int
pHttpStatus_ =
  ListMedicalVocabulariesResponse'
    { $sel:nextToken:ListMedicalVocabulariesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListMedicalVocabulariesResponse' :: Maybe VocabularyState
status = forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularies:ListMedicalVocabulariesResponse' :: Maybe [VocabularyInfo]
vocabularies = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMedicalVocabulariesResponse' :: 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.
listMedicalVocabulariesResponse_nextToken :: Lens.Lens' ListMedicalVocabulariesResponse (Prelude.Maybe Prelude.Text)
listMedicalVocabulariesResponse_nextToken :: Lens' ListMedicalVocabulariesResponse (Maybe Text)
listMedicalVocabulariesResponse_nextToken = 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)

-- | Lists all custom medical vocabularies that have the status specified in
-- your request. Custom vocabularies are ordered by creation date, with the
-- newest vocabulary first.
listMedicalVocabulariesResponse_status :: Lens.Lens' ListMedicalVocabulariesResponse (Prelude.Maybe VocabularyState)
listMedicalVocabulariesResponse_status :: Lens' ListMedicalVocabulariesResponse (Maybe VocabularyState)
listMedicalVocabulariesResponse_status = 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)

-- | Provides information about the custom medical vocabularies that match
-- the criteria specified in your request.
listMedicalVocabulariesResponse_vocabularies :: Lens.Lens' ListMedicalVocabulariesResponse (Prelude.Maybe [VocabularyInfo])
listMedicalVocabulariesResponse_vocabularies :: Lens' ListMedicalVocabulariesResponse (Maybe [VocabularyInfo])
listMedicalVocabulariesResponse_vocabularies = 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) 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.
listMedicalVocabulariesResponse_httpStatus :: Lens.Lens' ListMedicalVocabulariesResponse Prelude.Int
listMedicalVocabulariesResponse_httpStatus :: Lens' ListMedicalVocabulariesResponse Int
listMedicalVocabulariesResponse_httpStatus = 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
  where
  rnf :: ListMedicalVocabulariesResponse -> ()
rnf ListMedicalVocabulariesResponse' {Int
Maybe [VocabularyInfo]
Maybe Text
Maybe VocabularyState
httpStatus :: Int
vocabularies :: Maybe [VocabularyInfo]
status :: Maybe VocabularyState
nextToken :: Maybe Text
$sel:httpStatus:ListMedicalVocabulariesResponse' :: ListMedicalVocabulariesResponse -> Int
$sel:vocabularies:ListMedicalVocabulariesResponse' :: ListMedicalVocabulariesResponse -> Maybe [VocabularyInfo]
$sel:status:ListMedicalVocabulariesResponse' :: ListMedicalVocabulariesResponse -> Maybe VocabularyState
$sel:nextToken:ListMedicalVocabulariesResponse' :: ListMedicalVocabulariesResponse -> 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