{-# 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.Settings 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.VocabularyFilterMethod
data Settings = Settings'
{
Settings -> Maybe Bool
channelIdentification :: Prelude.Maybe Prelude.Bool,
Settings -> Maybe Natural
maxAlternatives :: Prelude.Maybe Prelude.Natural,
Settings -> Maybe Natural
maxSpeakerLabels :: Prelude.Maybe Prelude.Natural,
Settings -> Maybe Bool
showAlternatives :: Prelude.Maybe Prelude.Bool,
Settings -> Maybe Bool
showSpeakerLabels :: Prelude.Maybe Prelude.Bool,
Settings -> Maybe VocabularyFilterMethod
vocabularyFilterMethod :: Prelude.Maybe VocabularyFilterMethod,
Settings -> Maybe Text
vocabularyFilterName :: Prelude.Maybe Prelude.Text,
Settings -> Maybe Text
vocabularyName :: Prelude.Maybe Prelude.Text
}
deriving (Settings -> Settings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Settings -> Settings -> Bool
$c/= :: Settings -> Settings -> Bool
== :: Settings -> Settings -> Bool
$c== :: Settings -> Settings -> Bool
Prelude.Eq, ReadPrec [Settings]
ReadPrec Settings
Int -> ReadS Settings
ReadS [Settings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Settings]
$creadListPrec :: ReadPrec [Settings]
readPrec :: ReadPrec Settings
$creadPrec :: ReadPrec Settings
readList :: ReadS [Settings]
$creadList :: ReadS [Settings]
readsPrec :: Int -> ReadS Settings
$creadsPrec :: Int -> ReadS Settings
Prelude.Read, Int -> Settings -> ShowS
[Settings] -> ShowS
Settings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Settings] -> ShowS
$cshowList :: [Settings] -> ShowS
show :: Settings -> String
$cshow :: Settings -> String
showsPrec :: Int -> Settings -> ShowS
$cshowsPrec :: Int -> Settings -> ShowS
Prelude.Show, forall x. Rep Settings x -> Settings
forall x. Settings -> Rep Settings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Settings x -> Settings
$cfrom :: forall x. Settings -> Rep Settings x
Prelude.Generic)
newSettings ::
Settings
newSettings :: Settings
newSettings =
Settings'
{ $sel:channelIdentification:Settings' :: Maybe Bool
channelIdentification = forall a. Maybe a
Prelude.Nothing,
$sel:maxAlternatives:Settings' :: Maybe Natural
maxAlternatives = forall a. Maybe a
Prelude.Nothing,
$sel:maxSpeakerLabels:Settings' :: Maybe Natural
maxSpeakerLabels = forall a. Maybe a
Prelude.Nothing,
$sel:showAlternatives:Settings' :: Maybe Bool
showAlternatives = forall a. Maybe a
Prelude.Nothing,
$sel:showSpeakerLabels:Settings' :: Maybe Bool
showSpeakerLabels = forall a. Maybe a
Prelude.Nothing,
$sel:vocabularyFilterMethod:Settings' :: Maybe VocabularyFilterMethod
vocabularyFilterMethod = forall a. Maybe a
Prelude.Nothing,
$sel:vocabularyFilterName:Settings' :: Maybe Text
vocabularyFilterName = forall a. Maybe a
Prelude.Nothing,
$sel:vocabularyName:Settings' :: Maybe Text
vocabularyName = forall a. Maybe a
Prelude.Nothing
}
settings_channelIdentification :: Lens.Lens' Settings (Prelude.Maybe Prelude.Bool)
settings_channelIdentification :: Lens' Settings (Maybe Bool)
settings_channelIdentification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Settings' {Maybe Bool
channelIdentification :: Maybe Bool
$sel:channelIdentification:Settings' :: Settings -> Maybe Bool
channelIdentification} -> Maybe Bool
channelIdentification) (\s :: Settings
s@Settings' {} Maybe Bool
a -> Settings
s {$sel:channelIdentification:Settings' :: Maybe Bool
channelIdentification = Maybe Bool
a} :: Settings)
settings_maxAlternatives :: Lens.Lens' Settings (Prelude.Maybe Prelude.Natural)
settings_maxAlternatives :: Lens' Settings (Maybe Natural)
settings_maxAlternatives = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Settings' {Maybe Natural
maxAlternatives :: Maybe Natural
$sel:maxAlternatives:Settings' :: Settings -> Maybe Natural
maxAlternatives} -> Maybe Natural
maxAlternatives) (\s :: Settings
s@Settings' {} Maybe Natural
a -> Settings
s {$sel:maxAlternatives:Settings' :: Maybe Natural
maxAlternatives = Maybe Natural
a} :: Settings)
settings_maxSpeakerLabels :: Lens.Lens' Settings (Prelude.Maybe Prelude.Natural)
settings_maxSpeakerLabels :: Lens' Settings (Maybe Natural)
settings_maxSpeakerLabels = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Settings' {Maybe Natural
maxSpeakerLabels :: Maybe Natural
$sel:maxSpeakerLabels:Settings' :: Settings -> Maybe Natural
maxSpeakerLabels} -> Maybe Natural
maxSpeakerLabels) (\s :: Settings
s@Settings' {} Maybe Natural
a -> Settings
s {$sel:maxSpeakerLabels:Settings' :: Maybe Natural
maxSpeakerLabels = Maybe Natural
a} :: Settings)
settings_showAlternatives :: Lens.Lens' Settings (Prelude.Maybe Prelude.Bool)
settings_showAlternatives :: Lens' Settings (Maybe Bool)
settings_showAlternatives = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Settings' {Maybe Bool
showAlternatives :: Maybe Bool
$sel:showAlternatives:Settings' :: Settings -> Maybe Bool
showAlternatives} -> Maybe Bool
showAlternatives) (\s :: Settings
s@Settings' {} Maybe Bool
a -> Settings
s {$sel:showAlternatives:Settings' :: Maybe Bool
showAlternatives = Maybe Bool
a} :: Settings)
settings_showSpeakerLabels :: Lens.Lens' Settings (Prelude.Maybe Prelude.Bool)
settings_showSpeakerLabels :: Lens' Settings (Maybe Bool)
settings_showSpeakerLabels = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Settings' {Maybe Bool
showSpeakerLabels :: Maybe Bool
$sel:showSpeakerLabels:Settings' :: Settings -> Maybe Bool
showSpeakerLabels} -> Maybe Bool
showSpeakerLabels) (\s :: Settings
s@Settings' {} Maybe Bool
a -> Settings
s {$sel:showSpeakerLabels:Settings' :: Maybe Bool
showSpeakerLabels = Maybe Bool
a} :: Settings)
settings_vocabularyFilterMethod :: Lens.Lens' Settings (Prelude.Maybe VocabularyFilterMethod)
settings_vocabularyFilterMethod :: Lens' Settings (Maybe VocabularyFilterMethod)
settings_vocabularyFilterMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Settings' {Maybe VocabularyFilterMethod
vocabularyFilterMethod :: Maybe VocabularyFilterMethod
$sel:vocabularyFilterMethod:Settings' :: Settings -> Maybe VocabularyFilterMethod
vocabularyFilterMethod} -> Maybe VocabularyFilterMethod
vocabularyFilterMethod) (\s :: Settings
s@Settings' {} Maybe VocabularyFilterMethod
a -> Settings
s {$sel:vocabularyFilterMethod:Settings' :: Maybe VocabularyFilterMethod
vocabularyFilterMethod = Maybe VocabularyFilterMethod
a} :: Settings)
settings_vocabularyFilterName :: Lens.Lens' Settings (Prelude.Maybe Prelude.Text)
settings_vocabularyFilterName :: Lens' Settings (Maybe Text)
settings_vocabularyFilterName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Settings' {Maybe Text
vocabularyFilterName :: Maybe Text
$sel:vocabularyFilterName:Settings' :: Settings -> Maybe Text
vocabularyFilterName} -> Maybe Text
vocabularyFilterName) (\s :: Settings
s@Settings' {} Maybe Text
a -> Settings
s {$sel:vocabularyFilterName:Settings' :: Maybe Text
vocabularyFilterName = Maybe Text
a} :: Settings)
settings_vocabularyName :: Lens.Lens' Settings (Prelude.Maybe Prelude.Text)
settings_vocabularyName :: Lens' Settings (Maybe Text)
settings_vocabularyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Settings' {Maybe Text
vocabularyName :: Maybe Text
$sel:vocabularyName:Settings' :: Settings -> Maybe Text
vocabularyName} -> Maybe Text
vocabularyName) (\s :: Settings
s@Settings' {} Maybe Text
a -> Settings
s {$sel:vocabularyName:Settings' :: Maybe Text
vocabularyName = Maybe Text
a} :: Settings)
instance Data.FromJSON Settings where
parseJSON :: Value -> Parser Settings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Settings"
( \Object
x ->
Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Bool
-> Maybe VocabularyFilterMethod
-> Maybe Text
-> Maybe Text
-> Settings
Settings'
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
"ChannelIdentification")
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
"MaxAlternatives")
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
"MaxSpeakerLabels")
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
"ShowAlternatives")
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
"ShowSpeakerLabels")
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
"VocabularyFilterMethod")
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
"VocabularyFilterName")
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")
)
instance Prelude.Hashable Settings where
hashWithSalt :: Int -> Settings -> Int
hashWithSalt Int
_salt Settings' {Maybe Bool
Maybe Natural
Maybe Text
Maybe VocabularyFilterMethod
vocabularyName :: Maybe Text
vocabularyFilterName :: Maybe Text
vocabularyFilterMethod :: Maybe VocabularyFilterMethod
showSpeakerLabels :: Maybe Bool
showAlternatives :: Maybe Bool
maxSpeakerLabels :: Maybe Natural
maxAlternatives :: Maybe Natural
channelIdentification :: Maybe Bool
$sel:vocabularyName:Settings' :: Settings -> Maybe Text
$sel:vocabularyFilterName:Settings' :: Settings -> Maybe Text
$sel:vocabularyFilterMethod:Settings' :: Settings -> Maybe VocabularyFilterMethod
$sel:showSpeakerLabels:Settings' :: Settings -> Maybe Bool
$sel:showAlternatives:Settings' :: Settings -> Maybe Bool
$sel:maxSpeakerLabels:Settings' :: Settings -> Maybe Natural
$sel:maxAlternatives:Settings' :: Settings -> Maybe Natural
$sel:channelIdentification:Settings' :: Settings -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
channelIdentification
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxAlternatives
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxSpeakerLabels
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
showAlternatives
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
showSpeakerLabels
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VocabularyFilterMethod
vocabularyFilterMethod
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vocabularyFilterName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vocabularyName
instance Prelude.NFData Settings where
rnf :: Settings -> ()
rnf Settings' {Maybe Bool
Maybe Natural
Maybe Text
Maybe VocabularyFilterMethod
vocabularyName :: Maybe Text
vocabularyFilterName :: Maybe Text
vocabularyFilterMethod :: Maybe VocabularyFilterMethod
showSpeakerLabels :: Maybe Bool
showAlternatives :: Maybe Bool
maxSpeakerLabels :: Maybe Natural
maxAlternatives :: Maybe Natural
channelIdentification :: Maybe Bool
$sel:vocabularyName:Settings' :: Settings -> Maybe Text
$sel:vocabularyFilterName:Settings' :: Settings -> Maybe Text
$sel:vocabularyFilterMethod:Settings' :: Settings -> Maybe VocabularyFilterMethod
$sel:showSpeakerLabels:Settings' :: Settings -> Maybe Bool
$sel:showAlternatives:Settings' :: Settings -> Maybe Bool
$sel:maxSpeakerLabels:Settings' :: Settings -> Maybe Natural
$sel:maxAlternatives:Settings' :: Settings -> Maybe Natural
$sel:channelIdentification:Settings' :: Settings -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
channelIdentification
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxAlternatives
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxSpeakerLabels
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
showAlternatives
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
showSpeakerLabels
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VocabularyFilterMethod
vocabularyFilterMethod
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vocabularyFilterName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vocabularyName
instance Data.ToJSON Settings where
toJSON :: Settings -> Value
toJSON Settings' {Maybe Bool
Maybe Natural
Maybe Text
Maybe VocabularyFilterMethod
vocabularyName :: Maybe Text
vocabularyFilterName :: Maybe Text
vocabularyFilterMethod :: Maybe VocabularyFilterMethod
showSpeakerLabels :: Maybe Bool
showAlternatives :: Maybe Bool
maxSpeakerLabels :: Maybe Natural
maxAlternatives :: Maybe Natural
channelIdentification :: Maybe Bool
$sel:vocabularyName:Settings' :: Settings -> Maybe Text
$sel:vocabularyFilterName:Settings' :: Settings -> Maybe Text
$sel:vocabularyFilterMethod:Settings' :: Settings -> Maybe VocabularyFilterMethod
$sel:showSpeakerLabels:Settings' :: Settings -> Maybe Bool
$sel:showAlternatives:Settings' :: Settings -> Maybe Bool
$sel:maxSpeakerLabels:Settings' :: Settings -> Maybe Natural
$sel:maxAlternatives:Settings' :: Settings -> Maybe Natural
$sel:channelIdentification:Settings' :: Settings -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ChannelIdentification" 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 Bool
channelIdentification,
(Key
"MaxAlternatives" 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
maxAlternatives,
(Key
"MaxSpeakerLabels" 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
maxSpeakerLabels,
(Key
"ShowAlternatives" 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 Bool
showAlternatives,
(Key
"ShowSpeakerLabels" 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 Bool
showSpeakerLabels,
(Key
"VocabularyFilterMethod" 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 VocabularyFilterMethod
vocabularyFilterMethod,
(Key
"VocabularyFilterName" 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
vocabularyFilterName,
(Key
"VocabularyName" 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
vocabularyName
]
)