{-# 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.GetVocabulary
-- 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)
--
-- Gets information about a vocabulary.
module Amazonka.Transcribe.GetVocabulary
  ( -- * Creating a Request
    GetVocabulary (..),
    newGetVocabulary,

    -- * Request Lenses
    getVocabulary_vocabularyName,

    -- * Destructuring the Response
    GetVocabularyResponse (..),
    newGetVocabularyResponse,

    -- * Response Lenses
    getVocabularyResponse_failureReason,
    getVocabularyResponse_languageCode,
    getVocabularyResponse_downloadUri,
    getVocabularyResponse_vocabularyName,
    getVocabularyResponse_lastModifiedTime,
    getVocabularyResponse_vocabularyState,
    getVocabularyResponse_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:/ 'newGetVocabulary' smart constructor.
data GetVocabulary = GetVocabulary'
  { -- | The name of the vocabulary to return information about. The name is case
    -- sensitive.
    GetVocabulary -> Text
vocabularyName :: Prelude.Text
  }
  deriving (GetVocabulary -> GetVocabulary -> Bool
(GetVocabulary -> GetVocabulary -> Bool)
-> (GetVocabulary -> GetVocabulary -> Bool) -> Eq GetVocabulary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVocabulary -> GetVocabulary -> Bool
$c/= :: GetVocabulary -> GetVocabulary -> Bool
== :: GetVocabulary -> GetVocabulary -> Bool
$c== :: GetVocabulary -> GetVocabulary -> Bool
Prelude.Eq, ReadPrec [GetVocabulary]
ReadPrec GetVocabulary
Int -> ReadS GetVocabulary
ReadS [GetVocabulary]
(Int -> ReadS GetVocabulary)
-> ReadS [GetVocabulary]
-> ReadPrec GetVocabulary
-> ReadPrec [GetVocabulary]
-> Read GetVocabulary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetVocabulary]
$creadListPrec :: ReadPrec [GetVocabulary]
readPrec :: ReadPrec GetVocabulary
$creadPrec :: ReadPrec GetVocabulary
readList :: ReadS [GetVocabulary]
$creadList :: ReadS [GetVocabulary]
readsPrec :: Int -> ReadS GetVocabulary
$creadsPrec :: Int -> ReadS GetVocabulary
Prelude.Read, Int -> GetVocabulary -> ShowS
[GetVocabulary] -> ShowS
GetVocabulary -> String
(Int -> GetVocabulary -> ShowS)
-> (GetVocabulary -> String)
-> ([GetVocabulary] -> ShowS)
-> Show GetVocabulary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetVocabulary] -> ShowS
$cshowList :: [GetVocabulary] -> ShowS
show :: GetVocabulary -> String
$cshow :: GetVocabulary -> String
showsPrec :: Int -> GetVocabulary -> ShowS
$cshowsPrec :: Int -> GetVocabulary -> ShowS
Prelude.Show, (forall x. GetVocabulary -> Rep GetVocabulary x)
-> (forall x. Rep GetVocabulary x -> GetVocabulary)
-> Generic GetVocabulary
forall x. Rep GetVocabulary x -> GetVocabulary
forall x. GetVocabulary -> Rep GetVocabulary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetVocabulary x -> GetVocabulary
$cfrom :: forall x. GetVocabulary -> Rep GetVocabulary x
Prelude.Generic)

-- |
-- Create a value of 'GetVocabulary' 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:
--
-- 'vocabularyName', 'getVocabulary_vocabularyName' - The name of the vocabulary to return information about. The name is case
-- sensitive.
newGetVocabulary ::
  -- | 'vocabularyName'
  Prelude.Text ->
  GetVocabulary
newGetVocabulary :: Text -> GetVocabulary
newGetVocabulary Text
pVocabularyName_ =
  GetVocabulary' :: Text -> GetVocabulary
GetVocabulary' {$sel:vocabularyName:GetVocabulary' :: Text
vocabularyName = Text
pVocabularyName_}

-- | The name of the vocabulary to return information about. The name is case
-- sensitive.
getVocabulary_vocabularyName :: Lens.Lens' GetVocabulary Prelude.Text
getVocabulary_vocabularyName :: (Text -> f Text) -> GetVocabulary -> f GetVocabulary
getVocabulary_vocabularyName = (GetVocabulary -> Text)
-> (GetVocabulary -> Text -> GetVocabulary)
-> Lens GetVocabulary GetVocabulary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVocabulary' {Text
vocabularyName :: Text
$sel:vocabularyName:GetVocabulary' :: GetVocabulary -> Text
vocabularyName} -> Text
vocabularyName) (\s :: GetVocabulary
s@GetVocabulary' {} Text
a -> GetVocabulary
s {$sel:vocabularyName:GetVocabulary' :: Text
vocabularyName = Text
a} :: GetVocabulary)

instance Core.AWSRequest GetVocabulary where
  type
    AWSResponse GetVocabulary =
      GetVocabularyResponse
  request :: GetVocabulary -> Request GetVocabulary
request = Service -> GetVocabulary -> Request GetVocabulary
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetVocabulary
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetVocabulary)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetVocabulary))
-> Logger
-> Service
-> Proxy GetVocabulary
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetVocabulary)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe LanguageCode
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe VocabularyState
-> Int
-> GetVocabularyResponse
GetVocabularyResponse'
            (Maybe Text
 -> Maybe LanguageCode
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe VocabularyState
 -> Int
 -> GetVocabularyResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe LanguageCode
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe VocabularyState
      -> Int
      -> GetVocabularyResponse)
forall (f :: * -> *) a b. Functor 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
"FailureReason")
            Either
  String
  (Maybe LanguageCode
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe VocabularyState
   -> Int
   -> GetVocabularyResponse)
-> Either String (Maybe LanguageCode)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe VocabularyState
      -> Int
      -> GetVocabularyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe LanguageCode)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LanguageCode")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe VocabularyState
   -> Int
   -> GetVocabularyResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe VocabularyState
      -> Int
      -> GetVocabularyResponse)
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
"DownloadUri")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe VocabularyState
   -> Int
   -> GetVocabularyResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe VocabularyState -> Int -> GetVocabularyResponse)
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
"VocabularyName")
            Either
  String
  (Maybe POSIX
   -> Maybe VocabularyState -> Int -> GetVocabularyResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe VocabularyState -> Int -> GetVocabularyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModifiedTime")
            Either
  String (Maybe VocabularyState -> Int -> GetVocabularyResponse)
-> Either String (Maybe VocabularyState)
-> Either String (Int -> GetVocabularyResponse)
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
"VocabularyState")
            Either String (Int -> GetVocabularyResponse)
-> Either String Int -> Either String GetVocabularyResponse
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 GetVocabulary

instance Prelude.NFData GetVocabulary

instance Core.ToHeaders GetVocabulary where
  toHeaders :: GetVocabulary -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetVocabulary -> 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.GetVocabulary" :: 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 GetVocabulary where
  toJSON :: GetVocabulary -> Value
toJSON GetVocabulary' {Text
vocabularyName :: Text
$sel:vocabularyName:GetVocabulary' :: GetVocabulary -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"VocabularyName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vocabularyName)
          ]
      )

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

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

-- | /See:/ 'newGetVocabularyResponse' smart constructor.
data GetVocabularyResponse = GetVocabularyResponse'
  { -- | If the @VocabularyState@ field is @FAILED@, this field contains
    -- information about why the job failed.
    GetVocabularyResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The language code of the vocabulary entries.
    GetVocabularyResponse -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
    -- | The S3 location where the vocabulary is stored. Use this URI to get the
    -- contents of the vocabulary. The URI is available for a limited time.
    GetVocabularyResponse -> Maybe Text
downloadUri :: Prelude.Maybe Prelude.Text,
    -- | The name of the vocabulary to return.
    GetVocabularyResponse -> Maybe Text
vocabularyName :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the vocabulary was last modified.
    GetVocabularyResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The processing state of the vocabulary.
    GetVocabularyResponse -> Maybe VocabularyState
vocabularyState :: Prelude.Maybe VocabularyState,
    -- | The response's http status code.
    GetVocabularyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetVocabularyResponse -> GetVocabularyResponse -> Bool
(GetVocabularyResponse -> GetVocabularyResponse -> Bool)
-> (GetVocabularyResponse -> GetVocabularyResponse -> Bool)
-> Eq GetVocabularyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVocabularyResponse -> GetVocabularyResponse -> Bool
$c/= :: GetVocabularyResponse -> GetVocabularyResponse -> Bool
== :: GetVocabularyResponse -> GetVocabularyResponse -> Bool
$c== :: GetVocabularyResponse -> GetVocabularyResponse -> Bool
Prelude.Eq, ReadPrec [GetVocabularyResponse]
ReadPrec GetVocabularyResponse
Int -> ReadS GetVocabularyResponse
ReadS [GetVocabularyResponse]
(Int -> ReadS GetVocabularyResponse)
-> ReadS [GetVocabularyResponse]
-> ReadPrec GetVocabularyResponse
-> ReadPrec [GetVocabularyResponse]
-> Read GetVocabularyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetVocabularyResponse]
$creadListPrec :: ReadPrec [GetVocabularyResponse]
readPrec :: ReadPrec GetVocabularyResponse
$creadPrec :: ReadPrec GetVocabularyResponse
readList :: ReadS [GetVocabularyResponse]
$creadList :: ReadS [GetVocabularyResponse]
readsPrec :: Int -> ReadS GetVocabularyResponse
$creadsPrec :: Int -> ReadS GetVocabularyResponse
Prelude.Read, Int -> GetVocabularyResponse -> ShowS
[GetVocabularyResponse] -> ShowS
GetVocabularyResponse -> String
(Int -> GetVocabularyResponse -> ShowS)
-> (GetVocabularyResponse -> String)
-> ([GetVocabularyResponse] -> ShowS)
-> Show GetVocabularyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetVocabularyResponse] -> ShowS
$cshowList :: [GetVocabularyResponse] -> ShowS
show :: GetVocabularyResponse -> String
$cshow :: GetVocabularyResponse -> String
showsPrec :: Int -> GetVocabularyResponse -> ShowS
$cshowsPrec :: Int -> GetVocabularyResponse -> ShowS
Prelude.Show, (forall x. GetVocabularyResponse -> Rep GetVocabularyResponse x)
-> (forall x. Rep GetVocabularyResponse x -> GetVocabularyResponse)
-> Generic GetVocabularyResponse
forall x. Rep GetVocabularyResponse x -> GetVocabularyResponse
forall x. GetVocabularyResponse -> Rep GetVocabularyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetVocabularyResponse x -> GetVocabularyResponse
$cfrom :: forall x. GetVocabularyResponse -> Rep GetVocabularyResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetVocabularyResponse' 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:
--
-- 'failureReason', 'getVocabularyResponse_failureReason' - If the @VocabularyState@ field is @FAILED@, this field contains
-- information about why the job failed.
--
-- 'languageCode', 'getVocabularyResponse_languageCode' - The language code of the vocabulary entries.
--
-- 'downloadUri', 'getVocabularyResponse_downloadUri' - The S3 location where the vocabulary is stored. Use this URI to get the
-- contents of the vocabulary. The URI is available for a limited time.
--
-- 'vocabularyName', 'getVocabularyResponse_vocabularyName' - The name of the vocabulary to return.
--
-- 'lastModifiedTime', 'getVocabularyResponse_lastModifiedTime' - The date and time that the vocabulary was last modified.
--
-- 'vocabularyState', 'getVocabularyResponse_vocabularyState' - The processing state of the vocabulary.
--
-- 'httpStatus', 'getVocabularyResponse_httpStatus' - The response's http status code.
newGetVocabularyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetVocabularyResponse
newGetVocabularyResponse :: Int -> GetVocabularyResponse
newGetVocabularyResponse Int
pHttpStatus_ =
  GetVocabularyResponse' :: Maybe Text
-> Maybe LanguageCode
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe VocabularyState
-> Int
-> GetVocabularyResponse
GetVocabularyResponse'
    { $sel:failureReason:GetVocabularyResponse' :: Maybe Text
failureReason =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:languageCode:GetVocabularyResponse' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
forall a. Maybe a
Prelude.Nothing,
      $sel:downloadUri:GetVocabularyResponse' :: Maybe Text
downloadUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularyName:GetVocabularyResponse' :: Maybe Text
vocabularyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:GetVocabularyResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularyState:GetVocabularyResponse' :: Maybe VocabularyState
vocabularyState = Maybe VocabularyState
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetVocabularyResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the @VocabularyState@ field is @FAILED@, this field contains
-- information about why the job failed.
getVocabularyResponse_failureReason :: Lens.Lens' GetVocabularyResponse (Prelude.Maybe Prelude.Text)
getVocabularyResponse_failureReason :: (Maybe Text -> f (Maybe Text))
-> GetVocabularyResponse -> f GetVocabularyResponse
getVocabularyResponse_failureReason = (GetVocabularyResponse -> Maybe Text)
-> (GetVocabularyResponse -> Maybe Text -> GetVocabularyResponse)
-> Lens
     GetVocabularyResponse
     GetVocabularyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVocabularyResponse' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:GetVocabularyResponse' :: GetVocabularyResponse -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: GetVocabularyResponse
s@GetVocabularyResponse' {} Maybe Text
a -> GetVocabularyResponse
s {$sel:failureReason:GetVocabularyResponse' :: Maybe Text
failureReason = Maybe Text
a} :: GetVocabularyResponse)

-- | The language code of the vocabulary entries.
getVocabularyResponse_languageCode :: Lens.Lens' GetVocabularyResponse (Prelude.Maybe LanguageCode)
getVocabularyResponse_languageCode :: (Maybe LanguageCode -> f (Maybe LanguageCode))
-> GetVocabularyResponse -> f GetVocabularyResponse
getVocabularyResponse_languageCode = (GetVocabularyResponse -> Maybe LanguageCode)
-> (GetVocabularyResponse
    -> Maybe LanguageCode -> GetVocabularyResponse)
-> Lens
     GetVocabularyResponse
     GetVocabularyResponse
     (Maybe LanguageCode)
     (Maybe LanguageCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVocabularyResponse' {Maybe LanguageCode
languageCode :: Maybe LanguageCode
$sel:languageCode:GetVocabularyResponse' :: GetVocabularyResponse -> Maybe LanguageCode
languageCode} -> Maybe LanguageCode
languageCode) (\s :: GetVocabularyResponse
s@GetVocabularyResponse' {} Maybe LanguageCode
a -> GetVocabularyResponse
s {$sel:languageCode:GetVocabularyResponse' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
a} :: GetVocabularyResponse)

-- | The S3 location where the vocabulary is stored. Use this URI to get the
-- contents of the vocabulary. The URI is available for a limited time.
getVocabularyResponse_downloadUri :: Lens.Lens' GetVocabularyResponse (Prelude.Maybe Prelude.Text)
getVocabularyResponse_downloadUri :: (Maybe Text -> f (Maybe Text))
-> GetVocabularyResponse -> f GetVocabularyResponse
getVocabularyResponse_downloadUri = (GetVocabularyResponse -> Maybe Text)
-> (GetVocabularyResponse -> Maybe Text -> GetVocabularyResponse)
-> Lens
     GetVocabularyResponse
     GetVocabularyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVocabularyResponse' {Maybe Text
downloadUri :: Maybe Text
$sel:downloadUri:GetVocabularyResponse' :: GetVocabularyResponse -> Maybe Text
downloadUri} -> Maybe Text
downloadUri) (\s :: GetVocabularyResponse
s@GetVocabularyResponse' {} Maybe Text
a -> GetVocabularyResponse
s {$sel:downloadUri:GetVocabularyResponse' :: Maybe Text
downloadUri = Maybe Text
a} :: GetVocabularyResponse)

-- | The name of the vocabulary to return.
getVocabularyResponse_vocabularyName :: Lens.Lens' GetVocabularyResponse (Prelude.Maybe Prelude.Text)
getVocabularyResponse_vocabularyName :: (Maybe Text -> f (Maybe Text))
-> GetVocabularyResponse -> f GetVocabularyResponse
getVocabularyResponse_vocabularyName = (GetVocabularyResponse -> Maybe Text)
-> (GetVocabularyResponse -> Maybe Text -> GetVocabularyResponse)
-> Lens
     GetVocabularyResponse
     GetVocabularyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVocabularyResponse' {Maybe Text
vocabularyName :: Maybe Text
$sel:vocabularyName:GetVocabularyResponse' :: GetVocabularyResponse -> Maybe Text
vocabularyName} -> Maybe Text
vocabularyName) (\s :: GetVocabularyResponse
s@GetVocabularyResponse' {} Maybe Text
a -> GetVocabularyResponse
s {$sel:vocabularyName:GetVocabularyResponse' :: Maybe Text
vocabularyName = Maybe Text
a} :: GetVocabularyResponse)

-- | The date and time that the vocabulary was last modified.
getVocabularyResponse_lastModifiedTime :: Lens.Lens' GetVocabularyResponse (Prelude.Maybe Prelude.UTCTime)
getVocabularyResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetVocabularyResponse -> f GetVocabularyResponse
getVocabularyResponse_lastModifiedTime = (GetVocabularyResponse -> Maybe POSIX)
-> (GetVocabularyResponse -> Maybe POSIX -> GetVocabularyResponse)
-> Lens
     GetVocabularyResponse
     GetVocabularyResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVocabularyResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:GetVocabularyResponse' :: GetVocabularyResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: GetVocabularyResponse
s@GetVocabularyResponse' {} Maybe POSIX
a -> GetVocabularyResponse
s {$sel:lastModifiedTime:GetVocabularyResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: GetVocabularyResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetVocabularyResponse -> f GetVocabularyResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetVocabularyResponse
-> f GetVocabularyResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The processing state of the vocabulary.
getVocabularyResponse_vocabularyState :: Lens.Lens' GetVocabularyResponse (Prelude.Maybe VocabularyState)
getVocabularyResponse_vocabularyState :: (Maybe VocabularyState -> f (Maybe VocabularyState))
-> GetVocabularyResponse -> f GetVocabularyResponse
getVocabularyResponse_vocabularyState = (GetVocabularyResponse -> Maybe VocabularyState)
-> (GetVocabularyResponse
    -> Maybe VocabularyState -> GetVocabularyResponse)
-> Lens
     GetVocabularyResponse
     GetVocabularyResponse
     (Maybe VocabularyState)
     (Maybe VocabularyState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVocabularyResponse' {Maybe VocabularyState
vocabularyState :: Maybe VocabularyState
$sel:vocabularyState:GetVocabularyResponse' :: GetVocabularyResponse -> Maybe VocabularyState
vocabularyState} -> Maybe VocabularyState
vocabularyState) (\s :: GetVocabularyResponse
s@GetVocabularyResponse' {} Maybe VocabularyState
a -> GetVocabularyResponse
s {$sel:vocabularyState:GetVocabularyResponse' :: Maybe VocabularyState
vocabularyState = Maybe VocabularyState
a} :: GetVocabularyResponse)

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

instance Prelude.NFData GetVocabularyResponse