{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.Transcribe.Types.Product where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Transcribe.Types.Sum
newtype Media = Media'
{ _mMediaFileURI :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
media
:: Media
media = Media' {_mMediaFileURI = Nothing}
mMediaFileURI :: Lens' Media (Maybe Text)
mMediaFileURI = lens _mMediaFileURI (\ s a -> s{_mMediaFileURI = a})
instance FromJSON Media where
parseJSON
= withObject "Media"
(\ x -> Media' <$> (x .:? "MediaFileUri"))
instance Hashable Media where
instance NFData Media where
instance ToJSON Media where
toJSON Media'{..}
= object
(catMaybes [("MediaFileUri" .=) <$> _mMediaFileURI])
data Settings = Settings'
{ _sVocabularyName :: !(Maybe Text)
, _sMaxSpeakerLabels :: !(Maybe Nat)
, _sShowSpeakerLabels :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
settings
:: Settings
settings =
Settings'
{ _sVocabularyName = Nothing
, _sMaxSpeakerLabels = Nothing
, _sShowSpeakerLabels = Nothing
}
sVocabularyName :: Lens' Settings (Maybe Text)
sVocabularyName = lens _sVocabularyName (\ s a -> s{_sVocabularyName = a})
sMaxSpeakerLabels :: Lens' Settings (Maybe Natural)
sMaxSpeakerLabels = lens _sMaxSpeakerLabels (\ s a -> s{_sMaxSpeakerLabels = a}) . mapping _Nat
sShowSpeakerLabels :: Lens' Settings (Maybe Bool)
sShowSpeakerLabels = lens _sShowSpeakerLabels (\ s a -> s{_sShowSpeakerLabels = a})
instance FromJSON Settings where
parseJSON
= withObject "Settings"
(\ x ->
Settings' <$>
(x .:? "VocabularyName") <*>
(x .:? "MaxSpeakerLabels")
<*> (x .:? "ShowSpeakerLabels"))
instance Hashable Settings where
instance NFData Settings where
instance ToJSON Settings where
toJSON Settings'{..}
= object
(catMaybes
[("VocabularyName" .=) <$> _sVocabularyName,
("MaxSpeakerLabels" .=) <$> _sMaxSpeakerLabels,
("ShowSpeakerLabels" .=) <$> _sShowSpeakerLabels])
newtype Transcript = Transcript'
{ _tTranscriptFileURI :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
transcript
:: Transcript
transcript = Transcript' {_tTranscriptFileURI = Nothing}
tTranscriptFileURI :: Lens' Transcript (Maybe Text)
tTranscriptFileURI = lens _tTranscriptFileURI (\ s a -> s{_tTranscriptFileURI = a})
instance FromJSON Transcript where
parseJSON
= withObject "Transcript"
(\ x -> Transcript' <$> (x .:? "TranscriptFileUri"))
instance Hashable Transcript where
instance NFData Transcript where
data TranscriptionJob = TranscriptionJob'
{ _tjCreationTime :: !(Maybe POSIX)
, _tjFailureReason :: !(Maybe Text)
, _tjLanguageCode :: !(Maybe LanguageCode)
, _tjSettings :: !(Maybe Settings)
, _tjCompletionTime :: !(Maybe POSIX)
, _tjMedia :: !(Maybe Media)
, _tjMediaFormat :: !(Maybe MediaFormat)
, _tjTranscriptionJobStatus :: !(Maybe TranscriptionJobStatus)
, _tjTranscriptionJobName :: !(Maybe Text)
, _tjTranscript :: !(Maybe Transcript)
, _tjMediaSampleRateHertz :: !(Maybe Nat)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
transcriptionJob
:: TranscriptionJob
transcriptionJob =
TranscriptionJob'
{ _tjCreationTime = Nothing
, _tjFailureReason = Nothing
, _tjLanguageCode = Nothing
, _tjSettings = Nothing
, _tjCompletionTime = Nothing
, _tjMedia = Nothing
, _tjMediaFormat = Nothing
, _tjTranscriptionJobStatus = Nothing
, _tjTranscriptionJobName = Nothing
, _tjTranscript = Nothing
, _tjMediaSampleRateHertz = Nothing
}
tjCreationTime :: Lens' TranscriptionJob (Maybe UTCTime)
tjCreationTime = lens _tjCreationTime (\ s a -> s{_tjCreationTime = a}) . mapping _Time
tjFailureReason :: Lens' TranscriptionJob (Maybe Text)
tjFailureReason = lens _tjFailureReason (\ s a -> s{_tjFailureReason = a})
tjLanguageCode :: Lens' TranscriptionJob (Maybe LanguageCode)
tjLanguageCode = lens _tjLanguageCode (\ s a -> s{_tjLanguageCode = a})
tjSettings :: Lens' TranscriptionJob (Maybe Settings)
tjSettings = lens _tjSettings (\ s a -> s{_tjSettings = a})
tjCompletionTime :: Lens' TranscriptionJob (Maybe UTCTime)
tjCompletionTime = lens _tjCompletionTime (\ s a -> s{_tjCompletionTime = a}) . mapping _Time
tjMedia :: Lens' TranscriptionJob (Maybe Media)
tjMedia = lens _tjMedia (\ s a -> s{_tjMedia = a})
tjMediaFormat :: Lens' TranscriptionJob (Maybe MediaFormat)
tjMediaFormat = lens _tjMediaFormat (\ s a -> s{_tjMediaFormat = a})
tjTranscriptionJobStatus :: Lens' TranscriptionJob (Maybe TranscriptionJobStatus)
tjTranscriptionJobStatus = lens _tjTranscriptionJobStatus (\ s a -> s{_tjTranscriptionJobStatus = a})
tjTranscriptionJobName :: Lens' TranscriptionJob (Maybe Text)
tjTranscriptionJobName = lens _tjTranscriptionJobName (\ s a -> s{_tjTranscriptionJobName = a})
tjTranscript :: Lens' TranscriptionJob (Maybe Transcript)
tjTranscript = lens _tjTranscript (\ s a -> s{_tjTranscript = a})
tjMediaSampleRateHertz :: Lens' TranscriptionJob (Maybe Natural)
tjMediaSampleRateHertz = lens _tjMediaSampleRateHertz (\ s a -> s{_tjMediaSampleRateHertz = a}) . mapping _Nat
instance FromJSON TranscriptionJob where
parseJSON
= withObject "TranscriptionJob"
(\ x ->
TranscriptionJob' <$>
(x .:? "CreationTime") <*> (x .:? "FailureReason")
<*> (x .:? "LanguageCode")
<*> (x .:? "Settings")
<*> (x .:? "CompletionTime")
<*> (x .:? "Media")
<*> (x .:? "MediaFormat")
<*> (x .:? "TranscriptionJobStatus")
<*> (x .:? "TranscriptionJobName")
<*> (x .:? "Transcript")
<*> (x .:? "MediaSampleRateHertz"))
instance Hashable TranscriptionJob where
instance NFData TranscriptionJob where
data TranscriptionJobSummary = TranscriptionJobSummary'
{ _tjsCreationTime :: !(Maybe POSIX)
, _tjsFailureReason :: !(Maybe Text)
, _tjsLanguageCode :: !(Maybe LanguageCode)
, _tjsCompletionTime :: !(Maybe POSIX)
, _tjsTranscriptionJobStatus :: !(Maybe TranscriptionJobStatus)
, _tjsTranscriptionJobName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
transcriptionJobSummary
:: TranscriptionJobSummary
transcriptionJobSummary =
TranscriptionJobSummary'
{ _tjsCreationTime = Nothing
, _tjsFailureReason = Nothing
, _tjsLanguageCode = Nothing
, _tjsCompletionTime = Nothing
, _tjsTranscriptionJobStatus = Nothing
, _tjsTranscriptionJobName = Nothing
}
tjsCreationTime :: Lens' TranscriptionJobSummary (Maybe UTCTime)
tjsCreationTime = lens _tjsCreationTime (\ s a -> s{_tjsCreationTime = a}) . mapping _Time
tjsFailureReason :: Lens' TranscriptionJobSummary (Maybe Text)
tjsFailureReason = lens _tjsFailureReason (\ s a -> s{_tjsFailureReason = a})
tjsLanguageCode :: Lens' TranscriptionJobSummary (Maybe LanguageCode)
tjsLanguageCode = lens _tjsLanguageCode (\ s a -> s{_tjsLanguageCode = a})
tjsCompletionTime :: Lens' TranscriptionJobSummary (Maybe UTCTime)
tjsCompletionTime = lens _tjsCompletionTime (\ s a -> s{_tjsCompletionTime = a}) . mapping _Time
tjsTranscriptionJobStatus :: Lens' TranscriptionJobSummary (Maybe TranscriptionJobStatus)
tjsTranscriptionJobStatus = lens _tjsTranscriptionJobStatus (\ s a -> s{_tjsTranscriptionJobStatus = a})
tjsTranscriptionJobName :: Lens' TranscriptionJobSummary (Maybe Text)
tjsTranscriptionJobName = lens _tjsTranscriptionJobName (\ s a -> s{_tjsTranscriptionJobName = a})
instance FromJSON TranscriptionJobSummary where
parseJSON
= withObject "TranscriptionJobSummary"
(\ x ->
TranscriptionJobSummary' <$>
(x .:? "CreationTime") <*> (x .:? "FailureReason")
<*> (x .:? "LanguageCode")
<*> (x .:? "CompletionTime")
<*> (x .:? "TranscriptionJobStatus")
<*> (x .:? "TranscriptionJobName"))
instance Hashable TranscriptionJobSummary where
instance NFData TranscriptionJobSummary where
data VocabularyInfo = VocabularyInfo'
{ _viLanguageCode :: !(Maybe LanguageCode)
, _viVocabularyName :: !(Maybe Text)
, _viLastModifiedTime :: !(Maybe POSIX)
, _viVocabularyState :: !(Maybe VocabularyState)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
vocabularyInfo
:: VocabularyInfo
vocabularyInfo =
VocabularyInfo'
{ _viLanguageCode = Nothing
, _viVocabularyName = Nothing
, _viLastModifiedTime = Nothing
, _viVocabularyState = Nothing
}
viLanguageCode :: Lens' VocabularyInfo (Maybe LanguageCode)
viLanguageCode = lens _viLanguageCode (\ s a -> s{_viLanguageCode = a})
viVocabularyName :: Lens' VocabularyInfo (Maybe Text)
viVocabularyName = lens _viVocabularyName (\ s a -> s{_viVocabularyName = a})
viLastModifiedTime :: Lens' VocabularyInfo (Maybe UTCTime)
viLastModifiedTime = lens _viLastModifiedTime (\ s a -> s{_viLastModifiedTime = a}) . mapping _Time
viVocabularyState :: Lens' VocabularyInfo (Maybe VocabularyState)
viVocabularyState = lens _viVocabularyState (\ s a -> s{_viVocabularyState = a})
instance FromJSON VocabularyInfo where
parseJSON
= withObject "VocabularyInfo"
(\ x ->
VocabularyInfo' <$>
(x .:? "LanguageCode") <*> (x .:? "VocabularyName")
<*> (x .:? "LastModifiedTime")
<*> (x .:? "VocabularyState"))
instance Hashable VocabularyInfo where
instance NFData VocabularyInfo where