{-# 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 #-}
module Amazonka.Transcribe.CreateVocabulary
(
CreateVocabulary (..),
newCreateVocabulary,
createVocabulary_phrases,
createVocabulary_tags,
createVocabulary_vocabularyFileUri,
createVocabulary_vocabularyName,
createVocabulary_languageCode,
CreateVocabularyResponse (..),
newCreateVocabularyResponse,
createVocabularyResponse_failureReason,
createVocabularyResponse_languageCode,
createVocabularyResponse_lastModifiedTime,
createVocabularyResponse_vocabularyName,
createVocabularyResponse_vocabularyState,
createVocabularyResponse_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
data CreateVocabulary = CreateVocabulary'
{
CreateVocabulary -> Maybe [Text]
phrases :: Prelude.Maybe [Prelude.Text],
CreateVocabulary -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
CreateVocabulary -> Maybe Text
vocabularyFileUri :: Prelude.Maybe Prelude.Text,
CreateVocabulary -> Text
vocabularyName :: Prelude.Text,
CreateVocabulary -> LanguageCode
languageCode :: LanguageCode
}
deriving (CreateVocabulary -> CreateVocabulary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVocabulary -> CreateVocabulary -> Bool
$c/= :: CreateVocabulary -> CreateVocabulary -> Bool
== :: CreateVocabulary -> CreateVocabulary -> Bool
$c== :: CreateVocabulary -> CreateVocabulary -> Bool
Prelude.Eq, ReadPrec [CreateVocabulary]
ReadPrec CreateVocabulary
Int -> ReadS CreateVocabulary
ReadS [CreateVocabulary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVocabulary]
$creadListPrec :: ReadPrec [CreateVocabulary]
readPrec :: ReadPrec CreateVocabulary
$creadPrec :: ReadPrec CreateVocabulary
readList :: ReadS [CreateVocabulary]
$creadList :: ReadS [CreateVocabulary]
readsPrec :: Int -> ReadS CreateVocabulary
$creadsPrec :: Int -> ReadS CreateVocabulary
Prelude.Read, Int -> CreateVocabulary -> ShowS
[CreateVocabulary] -> ShowS
CreateVocabulary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVocabulary] -> ShowS
$cshowList :: [CreateVocabulary] -> ShowS
show :: CreateVocabulary -> String
$cshow :: CreateVocabulary -> String
showsPrec :: Int -> CreateVocabulary -> ShowS
$cshowsPrec :: Int -> CreateVocabulary -> ShowS
Prelude.Show, forall x. Rep CreateVocabulary x -> CreateVocabulary
forall x. CreateVocabulary -> Rep CreateVocabulary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateVocabulary x -> CreateVocabulary
$cfrom :: forall x. CreateVocabulary -> Rep CreateVocabulary x
Prelude.Generic)
newCreateVocabulary ::
Prelude.Text ->
LanguageCode ->
CreateVocabulary
newCreateVocabulary :: Text -> LanguageCode -> CreateVocabulary
newCreateVocabulary Text
pVocabularyName_ LanguageCode
pLanguageCode_ =
CreateVocabulary'
{ $sel:phrases:CreateVocabulary' :: Maybe [Text]
phrases = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateVocabulary' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:vocabularyFileUri:CreateVocabulary' :: Maybe Text
vocabularyFileUri = forall a. Maybe a
Prelude.Nothing,
$sel:vocabularyName:CreateVocabulary' :: Text
vocabularyName = Text
pVocabularyName_,
$sel:languageCode:CreateVocabulary' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
}
createVocabulary_phrases :: Lens.Lens' CreateVocabulary (Prelude.Maybe [Prelude.Text])
createVocabulary_phrases :: Lens' CreateVocabulary (Maybe [Text])
createVocabulary_phrases = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabulary' {Maybe [Text]
phrases :: Maybe [Text]
$sel:phrases:CreateVocabulary' :: CreateVocabulary -> Maybe [Text]
phrases} -> Maybe [Text]
phrases) (\s :: CreateVocabulary
s@CreateVocabulary' {} Maybe [Text]
a -> CreateVocabulary
s {$sel:phrases:CreateVocabulary' :: Maybe [Text]
phrases = Maybe [Text]
a} :: CreateVocabulary) 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
createVocabulary_tags :: Lens.Lens' CreateVocabulary (Prelude.Maybe (Prelude.NonEmpty Tag))
createVocabulary_tags :: Lens' CreateVocabulary (Maybe (NonEmpty Tag))
createVocabulary_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabulary' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateVocabulary' :: CreateVocabulary -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateVocabulary
s@CreateVocabulary' {} Maybe (NonEmpty Tag)
a -> CreateVocabulary
s {$sel:tags:CreateVocabulary' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateVocabulary) 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
createVocabulary_vocabularyFileUri :: Lens.Lens' CreateVocabulary (Prelude.Maybe Prelude.Text)
createVocabulary_vocabularyFileUri :: Lens' CreateVocabulary (Maybe Text)
createVocabulary_vocabularyFileUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabulary' {Maybe Text
vocabularyFileUri :: Maybe Text
$sel:vocabularyFileUri:CreateVocabulary' :: CreateVocabulary -> Maybe Text
vocabularyFileUri} -> Maybe Text
vocabularyFileUri) (\s :: CreateVocabulary
s@CreateVocabulary' {} Maybe Text
a -> CreateVocabulary
s {$sel:vocabularyFileUri:CreateVocabulary' :: Maybe Text
vocabularyFileUri = Maybe Text
a} :: CreateVocabulary)
createVocabulary_vocabularyName :: Lens.Lens' CreateVocabulary Prelude.Text
createVocabulary_vocabularyName :: Lens' CreateVocabulary Text
createVocabulary_vocabularyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabulary' {Text
vocabularyName :: Text
$sel:vocabularyName:CreateVocabulary' :: CreateVocabulary -> Text
vocabularyName} -> Text
vocabularyName) (\s :: CreateVocabulary
s@CreateVocabulary' {} Text
a -> CreateVocabulary
s {$sel:vocabularyName:CreateVocabulary' :: Text
vocabularyName = Text
a} :: CreateVocabulary)
createVocabulary_languageCode :: Lens.Lens' CreateVocabulary LanguageCode
createVocabulary_languageCode :: Lens' CreateVocabulary LanguageCode
createVocabulary_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabulary' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:CreateVocabulary' :: CreateVocabulary -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: CreateVocabulary
s@CreateVocabulary' {} LanguageCode
a -> CreateVocabulary
s {$sel:languageCode:CreateVocabulary' :: LanguageCode
languageCode = LanguageCode
a} :: CreateVocabulary)
instance Core.AWSRequest CreateVocabulary where
type
AWSResponse CreateVocabulary =
CreateVocabularyResponse
request :: (Service -> Service)
-> CreateVocabulary -> Request CreateVocabulary
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 CreateVocabulary
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateVocabulary)))
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 LanguageCode
-> Maybe POSIX
-> Maybe Text
-> Maybe VocabularyState
-> Int
-> CreateVocabularyResponse
CreateVocabularyResponse'
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
"FailureReason")
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
"LanguageCode")
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
"LastModifiedTime")
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
"VocabularyName")
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
"VocabularyState")
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 CreateVocabulary where
hashWithSalt :: Int -> CreateVocabulary -> Int
hashWithSalt Int
_salt CreateVocabulary' {Maybe [Text]
Maybe (NonEmpty Tag)
Maybe Text
Text
LanguageCode
languageCode :: LanguageCode
vocabularyName :: Text
vocabularyFileUri :: Maybe Text
tags :: Maybe (NonEmpty Tag)
phrases :: Maybe [Text]
$sel:languageCode:CreateVocabulary' :: CreateVocabulary -> LanguageCode
$sel:vocabularyName:CreateVocabulary' :: CreateVocabulary -> Text
$sel:vocabularyFileUri:CreateVocabulary' :: CreateVocabulary -> Maybe Text
$sel:tags:CreateVocabulary' :: CreateVocabulary -> Maybe (NonEmpty Tag)
$sel:phrases:CreateVocabulary' :: CreateVocabulary -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
phrases
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vocabularyFileUri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vocabularyName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LanguageCode
languageCode
instance Prelude.NFData CreateVocabulary where
rnf :: CreateVocabulary -> ()
rnf CreateVocabulary' {Maybe [Text]
Maybe (NonEmpty Tag)
Maybe Text
Text
LanguageCode
languageCode :: LanguageCode
vocabularyName :: Text
vocabularyFileUri :: Maybe Text
tags :: Maybe (NonEmpty Tag)
phrases :: Maybe [Text]
$sel:languageCode:CreateVocabulary' :: CreateVocabulary -> LanguageCode
$sel:vocabularyName:CreateVocabulary' :: CreateVocabulary -> Text
$sel:vocabularyFileUri:CreateVocabulary' :: CreateVocabulary -> Maybe Text
$sel:tags:CreateVocabulary' :: CreateVocabulary -> Maybe (NonEmpty Tag)
$sel:phrases:CreateVocabulary' :: CreateVocabulary -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
phrases
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vocabularyFileUri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vocabularyName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LanguageCode
languageCode
instance Data.ToHeaders CreateVocabulary where
toHeaders :: CreateVocabulary -> 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.CreateVocabulary" ::
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 CreateVocabulary where
toJSON :: CreateVocabulary -> Value
toJSON CreateVocabulary' {Maybe [Text]
Maybe (NonEmpty Tag)
Maybe Text
Text
LanguageCode
languageCode :: LanguageCode
vocabularyName :: Text
vocabularyFileUri :: Maybe Text
tags :: Maybe (NonEmpty Tag)
phrases :: Maybe [Text]
$sel:languageCode:CreateVocabulary' :: CreateVocabulary -> LanguageCode
$sel:vocabularyName:CreateVocabulary' :: CreateVocabulary -> Text
$sel:vocabularyFileUri:CreateVocabulary' :: CreateVocabulary -> Maybe Text
$sel:tags:CreateVocabulary' :: CreateVocabulary -> Maybe (NonEmpty Tag)
$sel:phrases:CreateVocabulary' :: CreateVocabulary -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Phrases" 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]
phrases,
(Key
"Tags" 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 (NonEmpty Tag)
tags,
(Key
"VocabularyFileUri" 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
vocabularyFileUri,
forall a. a -> Maybe a
Prelude.Just
(Key
"VocabularyName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
vocabularyName),
forall a. a -> Maybe a
Prelude.Just (Key
"LanguageCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= LanguageCode
languageCode)
]
)
instance Data.ToPath CreateVocabulary where
toPath :: CreateVocabulary -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateVocabulary where
toQuery :: CreateVocabulary -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateVocabularyResponse = CreateVocabularyResponse'
{
CreateVocabularyResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
CreateVocabularyResponse -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
CreateVocabularyResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
CreateVocabularyResponse -> Maybe Text
vocabularyName :: Prelude.Maybe Prelude.Text,
CreateVocabularyResponse -> Maybe VocabularyState
vocabularyState :: Prelude.Maybe VocabularyState,
CreateVocabularyResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateVocabularyResponse -> CreateVocabularyResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVocabularyResponse -> CreateVocabularyResponse -> Bool
$c/= :: CreateVocabularyResponse -> CreateVocabularyResponse -> Bool
== :: CreateVocabularyResponse -> CreateVocabularyResponse -> Bool
$c== :: CreateVocabularyResponse -> CreateVocabularyResponse -> Bool
Prelude.Eq, ReadPrec [CreateVocabularyResponse]
ReadPrec CreateVocabularyResponse
Int -> ReadS CreateVocabularyResponse
ReadS [CreateVocabularyResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVocabularyResponse]
$creadListPrec :: ReadPrec [CreateVocabularyResponse]
readPrec :: ReadPrec CreateVocabularyResponse
$creadPrec :: ReadPrec CreateVocabularyResponse
readList :: ReadS [CreateVocabularyResponse]
$creadList :: ReadS [CreateVocabularyResponse]
readsPrec :: Int -> ReadS CreateVocabularyResponse
$creadsPrec :: Int -> ReadS CreateVocabularyResponse
Prelude.Read, Int -> CreateVocabularyResponse -> ShowS
[CreateVocabularyResponse] -> ShowS
CreateVocabularyResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVocabularyResponse] -> ShowS
$cshowList :: [CreateVocabularyResponse] -> ShowS
show :: CreateVocabularyResponse -> String
$cshow :: CreateVocabularyResponse -> String
showsPrec :: Int -> CreateVocabularyResponse -> ShowS
$cshowsPrec :: Int -> CreateVocabularyResponse -> ShowS
Prelude.Show, forall x.
Rep CreateVocabularyResponse x -> CreateVocabularyResponse
forall x.
CreateVocabularyResponse -> Rep CreateVocabularyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVocabularyResponse x -> CreateVocabularyResponse
$cfrom :: forall x.
CreateVocabularyResponse -> Rep CreateVocabularyResponse x
Prelude.Generic)
newCreateVocabularyResponse ::
Prelude.Int ->
CreateVocabularyResponse
newCreateVocabularyResponse :: Int -> CreateVocabularyResponse
newCreateVocabularyResponse Int
pHttpStatus_ =
CreateVocabularyResponse'
{ $sel:failureReason:CreateVocabularyResponse' :: Maybe Text
failureReason =
forall a. Maybe a
Prelude.Nothing,
$sel:languageCode:CreateVocabularyResponse' :: Maybe LanguageCode
languageCode = forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTime:CreateVocabularyResponse' :: Maybe POSIX
lastModifiedTime = forall a. Maybe a
Prelude.Nothing,
$sel:vocabularyName:CreateVocabularyResponse' :: Maybe Text
vocabularyName = forall a. Maybe a
Prelude.Nothing,
$sel:vocabularyState:CreateVocabularyResponse' :: Maybe VocabularyState
vocabularyState = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateVocabularyResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createVocabularyResponse_failureReason :: Lens.Lens' CreateVocabularyResponse (Prelude.Maybe Prelude.Text)
createVocabularyResponse_failureReason :: Lens' CreateVocabularyResponse (Maybe Text)
createVocabularyResponse_failureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabularyResponse' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:CreateVocabularyResponse' :: CreateVocabularyResponse -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: CreateVocabularyResponse
s@CreateVocabularyResponse' {} Maybe Text
a -> CreateVocabularyResponse
s {$sel:failureReason:CreateVocabularyResponse' :: Maybe Text
failureReason = Maybe Text
a} :: CreateVocabularyResponse)
createVocabularyResponse_languageCode :: Lens.Lens' CreateVocabularyResponse (Prelude.Maybe LanguageCode)
createVocabularyResponse_languageCode :: Lens' CreateVocabularyResponse (Maybe LanguageCode)
createVocabularyResponse_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabularyResponse' {Maybe LanguageCode
languageCode :: Maybe LanguageCode
$sel:languageCode:CreateVocabularyResponse' :: CreateVocabularyResponse -> Maybe LanguageCode
languageCode} -> Maybe LanguageCode
languageCode) (\s :: CreateVocabularyResponse
s@CreateVocabularyResponse' {} Maybe LanguageCode
a -> CreateVocabularyResponse
s {$sel:languageCode:CreateVocabularyResponse' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
a} :: CreateVocabularyResponse)
createVocabularyResponse_lastModifiedTime :: Lens.Lens' CreateVocabularyResponse (Prelude.Maybe Prelude.UTCTime)
createVocabularyResponse_lastModifiedTime :: Lens' CreateVocabularyResponse (Maybe UTCTime)
createVocabularyResponse_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabularyResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:CreateVocabularyResponse' :: CreateVocabularyResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: CreateVocabularyResponse
s@CreateVocabularyResponse' {} Maybe POSIX
a -> CreateVocabularyResponse
s {$sel:lastModifiedTime:CreateVocabularyResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: CreateVocabularyResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
createVocabularyResponse_vocabularyName :: Lens.Lens' CreateVocabularyResponse (Prelude.Maybe Prelude.Text)
createVocabularyResponse_vocabularyName :: Lens' CreateVocabularyResponse (Maybe Text)
createVocabularyResponse_vocabularyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabularyResponse' {Maybe Text
vocabularyName :: Maybe Text
$sel:vocabularyName:CreateVocabularyResponse' :: CreateVocabularyResponse -> Maybe Text
vocabularyName} -> Maybe Text
vocabularyName) (\s :: CreateVocabularyResponse
s@CreateVocabularyResponse' {} Maybe Text
a -> CreateVocabularyResponse
s {$sel:vocabularyName:CreateVocabularyResponse' :: Maybe Text
vocabularyName = Maybe Text
a} :: CreateVocabularyResponse)
createVocabularyResponse_vocabularyState :: Lens.Lens' CreateVocabularyResponse (Prelude.Maybe VocabularyState)
createVocabularyResponse_vocabularyState :: Lens' CreateVocabularyResponse (Maybe VocabularyState)
createVocabularyResponse_vocabularyState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabularyResponse' {Maybe VocabularyState
vocabularyState :: Maybe VocabularyState
$sel:vocabularyState:CreateVocabularyResponse' :: CreateVocabularyResponse -> Maybe VocabularyState
vocabularyState} -> Maybe VocabularyState
vocabularyState) (\s :: CreateVocabularyResponse
s@CreateVocabularyResponse' {} Maybe VocabularyState
a -> CreateVocabularyResponse
s {$sel:vocabularyState:CreateVocabularyResponse' :: Maybe VocabularyState
vocabularyState = Maybe VocabularyState
a} :: CreateVocabularyResponse)
createVocabularyResponse_httpStatus :: Lens.Lens' CreateVocabularyResponse Prelude.Int
createVocabularyResponse_httpStatus :: Lens' CreateVocabularyResponse Int
createVocabularyResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVocabularyResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateVocabularyResponse' :: CreateVocabularyResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateVocabularyResponse
s@CreateVocabularyResponse' {} Int
a -> CreateVocabularyResponse
s {$sel:httpStatus:CreateVocabularyResponse' :: Int
httpStatus = Int
a} :: CreateVocabularyResponse)
instance Prelude.NFData CreateVocabularyResponse where
rnf :: CreateVocabularyResponse -> ()
rnf CreateVocabularyResponse' {Int
Maybe Text
Maybe POSIX
Maybe LanguageCode
Maybe VocabularyState
httpStatus :: Int
vocabularyState :: Maybe VocabularyState
vocabularyName :: Maybe Text
lastModifiedTime :: Maybe POSIX
languageCode :: Maybe LanguageCode
failureReason :: Maybe Text
$sel:httpStatus:CreateVocabularyResponse' :: CreateVocabularyResponse -> Int
$sel:vocabularyState:CreateVocabularyResponse' :: CreateVocabularyResponse -> Maybe VocabularyState
$sel:vocabularyName:CreateVocabularyResponse' :: CreateVocabularyResponse -> Maybe Text
$sel:lastModifiedTime:CreateVocabularyResponse' :: CreateVocabularyResponse -> Maybe POSIX
$sel:languageCode:CreateVocabularyResponse' :: CreateVocabularyResponse -> Maybe LanguageCode
$sel:failureReason:CreateVocabularyResponse' :: CreateVocabularyResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureReason
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LanguageCode
languageCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vocabularyName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VocabularyState
vocabularyState
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus