{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Transcribe.Types.VocabularyInfo 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 Amazonka.Transcribe.Types.LanguageCode
import Amazonka.Transcribe.Types.VocabularyState
data VocabularyInfo = VocabularyInfo'
{
VocabularyInfo -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
VocabularyInfo -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
VocabularyInfo -> Maybe Text
vocabularyName :: Prelude.Maybe Prelude.Text,
VocabularyInfo -> Maybe VocabularyState
vocabularyState :: Prelude.Maybe VocabularyState
}
deriving (VocabularyInfo -> VocabularyInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VocabularyInfo -> VocabularyInfo -> Bool
$c/= :: VocabularyInfo -> VocabularyInfo -> Bool
== :: VocabularyInfo -> VocabularyInfo -> Bool
$c== :: VocabularyInfo -> VocabularyInfo -> Bool
Prelude.Eq, ReadPrec [VocabularyInfo]
ReadPrec VocabularyInfo
Int -> ReadS VocabularyInfo
ReadS [VocabularyInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VocabularyInfo]
$creadListPrec :: ReadPrec [VocabularyInfo]
readPrec :: ReadPrec VocabularyInfo
$creadPrec :: ReadPrec VocabularyInfo
readList :: ReadS [VocabularyInfo]
$creadList :: ReadS [VocabularyInfo]
readsPrec :: Int -> ReadS VocabularyInfo
$creadsPrec :: Int -> ReadS VocabularyInfo
Prelude.Read, Int -> VocabularyInfo -> ShowS
[VocabularyInfo] -> ShowS
VocabularyInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VocabularyInfo] -> ShowS
$cshowList :: [VocabularyInfo] -> ShowS
show :: VocabularyInfo -> String
$cshow :: VocabularyInfo -> String
showsPrec :: Int -> VocabularyInfo -> ShowS
$cshowsPrec :: Int -> VocabularyInfo -> ShowS
Prelude.Show, forall x. Rep VocabularyInfo x -> VocabularyInfo
forall x. VocabularyInfo -> Rep VocabularyInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VocabularyInfo x -> VocabularyInfo
$cfrom :: forall x. VocabularyInfo -> Rep VocabularyInfo x
Prelude.Generic)
newVocabularyInfo ::
VocabularyInfo
newVocabularyInfo :: VocabularyInfo
newVocabularyInfo =
VocabularyInfo'
{ $sel:languageCode:VocabularyInfo' :: Maybe LanguageCode
languageCode = forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTime:VocabularyInfo' :: Maybe POSIX
lastModifiedTime = forall a. Maybe a
Prelude.Nothing,
$sel:vocabularyName:VocabularyInfo' :: Maybe Text
vocabularyName = forall a. Maybe a
Prelude.Nothing,
$sel:vocabularyState:VocabularyInfo' :: Maybe VocabularyState
vocabularyState = forall a. Maybe a
Prelude.Nothing
}
vocabularyInfo_languageCode :: Lens.Lens' VocabularyInfo (Prelude.Maybe LanguageCode)
vocabularyInfo_languageCode :: Lens' VocabularyInfo (Maybe LanguageCode)
vocabularyInfo_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularyInfo' {Maybe LanguageCode
languageCode :: Maybe LanguageCode
$sel:languageCode:VocabularyInfo' :: VocabularyInfo -> Maybe LanguageCode
languageCode} -> Maybe LanguageCode
languageCode) (\s :: VocabularyInfo
s@VocabularyInfo' {} Maybe LanguageCode
a -> VocabularyInfo
s {$sel:languageCode:VocabularyInfo' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
a} :: VocabularyInfo)
vocabularyInfo_lastModifiedTime :: Lens.Lens' VocabularyInfo (Prelude.Maybe Prelude.UTCTime)
vocabularyInfo_lastModifiedTime :: Lens' VocabularyInfo (Maybe UTCTime)
vocabularyInfo_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularyInfo' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:VocabularyInfo' :: VocabularyInfo -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: VocabularyInfo
s@VocabularyInfo' {} Maybe POSIX
a -> VocabularyInfo
s {$sel:lastModifiedTime:VocabularyInfo' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: VocabularyInfo) 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
vocabularyInfo_vocabularyName :: Lens.Lens' VocabularyInfo (Prelude.Maybe Prelude.Text)
vocabularyInfo_vocabularyName :: Lens' VocabularyInfo (Maybe Text)
vocabularyInfo_vocabularyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularyInfo' {Maybe Text
vocabularyName :: Maybe Text
$sel:vocabularyName:VocabularyInfo' :: VocabularyInfo -> Maybe Text
vocabularyName} -> Maybe Text
vocabularyName) (\s :: VocabularyInfo
s@VocabularyInfo' {} Maybe Text
a -> VocabularyInfo
s {$sel:vocabularyName:VocabularyInfo' :: Maybe Text
vocabularyName = Maybe Text
a} :: VocabularyInfo)
vocabularyInfo_vocabularyState :: Lens.Lens' VocabularyInfo (Prelude.Maybe VocabularyState)
vocabularyInfo_vocabularyState :: Lens' VocabularyInfo (Maybe VocabularyState)
vocabularyInfo_vocabularyState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VocabularyInfo' {Maybe VocabularyState
vocabularyState :: Maybe VocabularyState
$sel:vocabularyState:VocabularyInfo' :: VocabularyInfo -> Maybe VocabularyState
vocabularyState} -> Maybe VocabularyState
vocabularyState) (\s :: VocabularyInfo
s@VocabularyInfo' {} Maybe VocabularyState
a -> VocabularyInfo
s {$sel:vocabularyState:VocabularyInfo' :: Maybe VocabularyState
vocabularyState = Maybe VocabularyState
a} :: VocabularyInfo)
instance Data.FromJSON VocabularyInfo where
parseJSON :: Value -> Parser VocabularyInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VocabularyInfo"
( \Object
x ->
Maybe LanguageCode
-> Maybe POSIX
-> Maybe Text
-> Maybe VocabularyState
-> VocabularyInfo
VocabularyInfo'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (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 -> Parser (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 -> Parser (Maybe a)
Data..:? Key
"VocabularyState")
)
instance Prelude.Hashable VocabularyInfo where
hashWithSalt :: Int -> VocabularyInfo -> Int
hashWithSalt Int
_salt VocabularyInfo' {Maybe Text
Maybe POSIX
Maybe LanguageCode
Maybe VocabularyState
vocabularyState :: Maybe VocabularyState
vocabularyName :: Maybe Text
lastModifiedTime :: Maybe POSIX
languageCode :: Maybe LanguageCode
$sel:vocabularyState:VocabularyInfo' :: VocabularyInfo -> Maybe VocabularyState
$sel:vocabularyName:VocabularyInfo' :: VocabularyInfo -> Maybe Text
$sel:lastModifiedTime:VocabularyInfo' :: VocabularyInfo -> Maybe POSIX
$sel:languageCode:VocabularyInfo' :: VocabularyInfo -> Maybe LanguageCode
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LanguageCode
languageCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vocabularyName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VocabularyState
vocabularyState
instance Prelude.NFData VocabularyInfo where
rnf :: VocabularyInfo -> ()
rnf VocabularyInfo' {Maybe Text
Maybe POSIX
Maybe LanguageCode
Maybe VocabularyState
vocabularyState :: Maybe VocabularyState
vocabularyName :: Maybe Text
lastModifiedTime :: Maybe POSIX
languageCode :: Maybe LanguageCode
$sel:vocabularyState:VocabularyInfo' :: VocabularyInfo -> Maybe VocabularyState
$sel:vocabularyName:VocabularyInfo' :: VocabularyInfo -> Maybe Text
$sel:lastModifiedTime:VocabularyInfo' :: VocabularyInfo -> Maybe POSIX
$sel:languageCode:VocabularyInfo' :: VocabularyInfo -> Maybe LanguageCode
..} =
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