{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Chime.Types.EngineTranscribeSettings
-- 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)
module Amazonka.Chime.Types.EngineTranscribeSettings where

import Amazonka.Chime.Types.TranscribeLanguageCode
import Amazonka.Chime.Types.TranscribeRegion
import Amazonka.Chime.Types.TranscribeVocabularyFilterMethod
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Settings specific to the Amazon Transcribe engine.
--
-- /See:/ 'newEngineTranscribeSettings' smart constructor.
data EngineTranscribeSettings = EngineTranscribeSettings'
  { -- | The name of the vocabulary passed to Amazon Transcribe.
    EngineTranscribeSettings -> Maybe Text
vocabularyName :: Prelude.Maybe Prelude.Text,
    -- | The name of the vocabulary filter passed to Amazon Transcribe.
    EngineTranscribeSettings -> Maybe Text
vocabularyFilterName :: Prelude.Maybe Prelude.Text,
    -- | The filtering method passed to Amazon Transcribe.
    EngineTranscribeSettings -> Maybe TranscribeVocabularyFilterMethod
vocabularyFilterMethod :: Prelude.Maybe TranscribeVocabularyFilterMethod,
    -- | The AWS Region passed to Amazon Transcribe. If you don\'t specify a
    -- Region, Amazon Chime uses the meeting\'s Region.
    EngineTranscribeSettings -> Maybe TranscribeRegion
region :: Prelude.Maybe TranscribeRegion,
    -- | The language code specified for the Amazon Transcribe engine.
    EngineTranscribeSettings -> TranscribeLanguageCode
languageCode :: TranscribeLanguageCode
  }
  deriving (EngineTranscribeSettings -> EngineTranscribeSettings -> Bool
(EngineTranscribeSettings -> EngineTranscribeSettings -> Bool)
-> (EngineTranscribeSettings -> EngineTranscribeSettings -> Bool)
-> Eq EngineTranscribeSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EngineTranscribeSettings -> EngineTranscribeSettings -> Bool
$c/= :: EngineTranscribeSettings -> EngineTranscribeSettings -> Bool
== :: EngineTranscribeSettings -> EngineTranscribeSettings -> Bool
$c== :: EngineTranscribeSettings -> EngineTranscribeSettings -> Bool
Prelude.Eq, ReadPrec [EngineTranscribeSettings]
ReadPrec EngineTranscribeSettings
Int -> ReadS EngineTranscribeSettings
ReadS [EngineTranscribeSettings]
(Int -> ReadS EngineTranscribeSettings)
-> ReadS [EngineTranscribeSettings]
-> ReadPrec EngineTranscribeSettings
-> ReadPrec [EngineTranscribeSettings]
-> Read EngineTranscribeSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EngineTranscribeSettings]
$creadListPrec :: ReadPrec [EngineTranscribeSettings]
readPrec :: ReadPrec EngineTranscribeSettings
$creadPrec :: ReadPrec EngineTranscribeSettings
readList :: ReadS [EngineTranscribeSettings]
$creadList :: ReadS [EngineTranscribeSettings]
readsPrec :: Int -> ReadS EngineTranscribeSettings
$creadsPrec :: Int -> ReadS EngineTranscribeSettings
Prelude.Read, Int -> EngineTranscribeSettings -> ShowS
[EngineTranscribeSettings] -> ShowS
EngineTranscribeSettings -> String
(Int -> EngineTranscribeSettings -> ShowS)
-> (EngineTranscribeSettings -> String)
-> ([EngineTranscribeSettings] -> ShowS)
-> Show EngineTranscribeSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EngineTranscribeSettings] -> ShowS
$cshowList :: [EngineTranscribeSettings] -> ShowS
show :: EngineTranscribeSettings -> String
$cshow :: EngineTranscribeSettings -> String
showsPrec :: Int -> EngineTranscribeSettings -> ShowS
$cshowsPrec :: Int -> EngineTranscribeSettings -> ShowS
Prelude.Show, (forall x.
 EngineTranscribeSettings -> Rep EngineTranscribeSettings x)
-> (forall x.
    Rep EngineTranscribeSettings x -> EngineTranscribeSettings)
-> Generic EngineTranscribeSettings
forall x.
Rep EngineTranscribeSettings x -> EngineTranscribeSettings
forall x.
EngineTranscribeSettings -> Rep EngineTranscribeSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EngineTranscribeSettings x -> EngineTranscribeSettings
$cfrom :: forall x.
EngineTranscribeSettings -> Rep EngineTranscribeSettings x
Prelude.Generic)

-- |
-- Create a value of 'EngineTranscribeSettings' 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', 'engineTranscribeSettings_vocabularyName' - The name of the vocabulary passed to Amazon Transcribe.
--
-- 'vocabularyFilterName', 'engineTranscribeSettings_vocabularyFilterName' - The name of the vocabulary filter passed to Amazon Transcribe.
--
-- 'vocabularyFilterMethod', 'engineTranscribeSettings_vocabularyFilterMethod' - The filtering method passed to Amazon Transcribe.
--
-- 'region', 'engineTranscribeSettings_region' - The AWS Region passed to Amazon Transcribe. If you don\'t specify a
-- Region, Amazon Chime uses the meeting\'s Region.
--
-- 'languageCode', 'engineTranscribeSettings_languageCode' - The language code specified for the Amazon Transcribe engine.
newEngineTranscribeSettings ::
  -- | 'languageCode'
  TranscribeLanguageCode ->
  EngineTranscribeSettings
newEngineTranscribeSettings :: TranscribeLanguageCode -> EngineTranscribeSettings
newEngineTranscribeSettings TranscribeLanguageCode
pLanguageCode_ =
  EngineTranscribeSettings' :: Maybe Text
-> Maybe Text
-> Maybe TranscribeVocabularyFilterMethod
-> Maybe TranscribeRegion
-> TranscribeLanguageCode
-> EngineTranscribeSettings
EngineTranscribeSettings'
    { $sel:vocabularyName:EngineTranscribeSettings' :: Maybe Text
vocabularyName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularyFilterName:EngineTranscribeSettings' :: Maybe Text
vocabularyFilterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularyFilterMethod:EngineTranscribeSettings' :: Maybe TranscribeVocabularyFilterMethod
vocabularyFilterMethod = Maybe TranscribeVocabularyFilterMethod
forall a. Maybe a
Prelude.Nothing,
      $sel:region:EngineTranscribeSettings' :: Maybe TranscribeRegion
region = Maybe TranscribeRegion
forall a. Maybe a
Prelude.Nothing,
      $sel:languageCode:EngineTranscribeSettings' :: TranscribeLanguageCode
languageCode = TranscribeLanguageCode
pLanguageCode_
    }

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

-- | The name of the vocabulary filter passed to Amazon Transcribe.
engineTranscribeSettings_vocabularyFilterName :: Lens.Lens' EngineTranscribeSettings (Prelude.Maybe Prelude.Text)
engineTranscribeSettings_vocabularyFilterName :: (Maybe Text -> f (Maybe Text))
-> EngineTranscribeSettings -> f EngineTranscribeSettings
engineTranscribeSettings_vocabularyFilterName = (EngineTranscribeSettings -> Maybe Text)
-> (EngineTranscribeSettings
    -> Maybe Text -> EngineTranscribeSettings)
-> Lens
     EngineTranscribeSettings
     EngineTranscribeSettings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EngineTranscribeSettings' {Maybe Text
vocabularyFilterName :: Maybe Text
$sel:vocabularyFilterName:EngineTranscribeSettings' :: EngineTranscribeSettings -> Maybe Text
vocabularyFilterName} -> Maybe Text
vocabularyFilterName) (\s :: EngineTranscribeSettings
s@EngineTranscribeSettings' {} Maybe Text
a -> EngineTranscribeSettings
s {$sel:vocabularyFilterName:EngineTranscribeSettings' :: Maybe Text
vocabularyFilterName = Maybe Text
a} :: EngineTranscribeSettings)

-- | The filtering method passed to Amazon Transcribe.
engineTranscribeSettings_vocabularyFilterMethod :: Lens.Lens' EngineTranscribeSettings (Prelude.Maybe TranscribeVocabularyFilterMethod)
engineTranscribeSettings_vocabularyFilterMethod :: (Maybe TranscribeVocabularyFilterMethod
 -> f (Maybe TranscribeVocabularyFilterMethod))
-> EngineTranscribeSettings -> f EngineTranscribeSettings
engineTranscribeSettings_vocabularyFilterMethod = (EngineTranscribeSettings
 -> Maybe TranscribeVocabularyFilterMethod)
-> (EngineTranscribeSettings
    -> Maybe TranscribeVocabularyFilterMethod
    -> EngineTranscribeSettings)
-> Lens
     EngineTranscribeSettings
     EngineTranscribeSettings
     (Maybe TranscribeVocabularyFilterMethod)
     (Maybe TranscribeVocabularyFilterMethod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EngineTranscribeSettings' {Maybe TranscribeVocabularyFilterMethod
vocabularyFilterMethod :: Maybe TranscribeVocabularyFilterMethod
$sel:vocabularyFilterMethod:EngineTranscribeSettings' :: EngineTranscribeSettings -> Maybe TranscribeVocabularyFilterMethod
vocabularyFilterMethod} -> Maybe TranscribeVocabularyFilterMethod
vocabularyFilterMethod) (\s :: EngineTranscribeSettings
s@EngineTranscribeSettings' {} Maybe TranscribeVocabularyFilterMethod
a -> EngineTranscribeSettings
s {$sel:vocabularyFilterMethod:EngineTranscribeSettings' :: Maybe TranscribeVocabularyFilterMethod
vocabularyFilterMethod = Maybe TranscribeVocabularyFilterMethod
a} :: EngineTranscribeSettings)

-- | The AWS Region passed to Amazon Transcribe. If you don\'t specify a
-- Region, Amazon Chime uses the meeting\'s Region.
engineTranscribeSettings_region :: Lens.Lens' EngineTranscribeSettings (Prelude.Maybe TranscribeRegion)
engineTranscribeSettings_region :: (Maybe TranscribeRegion -> f (Maybe TranscribeRegion))
-> EngineTranscribeSettings -> f EngineTranscribeSettings
engineTranscribeSettings_region = (EngineTranscribeSettings -> Maybe TranscribeRegion)
-> (EngineTranscribeSettings
    -> Maybe TranscribeRegion -> EngineTranscribeSettings)
-> Lens
     EngineTranscribeSettings
     EngineTranscribeSettings
     (Maybe TranscribeRegion)
     (Maybe TranscribeRegion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EngineTranscribeSettings' {Maybe TranscribeRegion
region :: Maybe TranscribeRegion
$sel:region:EngineTranscribeSettings' :: EngineTranscribeSettings -> Maybe TranscribeRegion
region} -> Maybe TranscribeRegion
region) (\s :: EngineTranscribeSettings
s@EngineTranscribeSettings' {} Maybe TranscribeRegion
a -> EngineTranscribeSettings
s {$sel:region:EngineTranscribeSettings' :: Maybe TranscribeRegion
region = Maybe TranscribeRegion
a} :: EngineTranscribeSettings)

-- | The language code specified for the Amazon Transcribe engine.
engineTranscribeSettings_languageCode :: Lens.Lens' EngineTranscribeSettings TranscribeLanguageCode
engineTranscribeSettings_languageCode :: (TranscribeLanguageCode -> f TranscribeLanguageCode)
-> EngineTranscribeSettings -> f EngineTranscribeSettings
engineTranscribeSettings_languageCode = (EngineTranscribeSettings -> TranscribeLanguageCode)
-> (EngineTranscribeSettings
    -> TranscribeLanguageCode -> EngineTranscribeSettings)
-> Lens
     EngineTranscribeSettings
     EngineTranscribeSettings
     TranscribeLanguageCode
     TranscribeLanguageCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EngineTranscribeSettings' {TranscribeLanguageCode
languageCode :: TranscribeLanguageCode
$sel:languageCode:EngineTranscribeSettings' :: EngineTranscribeSettings -> TranscribeLanguageCode
languageCode} -> TranscribeLanguageCode
languageCode) (\s :: EngineTranscribeSettings
s@EngineTranscribeSettings' {} TranscribeLanguageCode
a -> EngineTranscribeSettings
s {$sel:languageCode:EngineTranscribeSettings' :: TranscribeLanguageCode
languageCode = TranscribeLanguageCode
a} :: EngineTranscribeSettings)

instance Prelude.Hashable EngineTranscribeSettings

instance Prelude.NFData EngineTranscribeSettings

instance Core.ToJSON EngineTranscribeSettings where
  toJSON :: EngineTranscribeSettings -> Value
toJSON EngineTranscribeSettings' {Maybe Text
Maybe TranscribeRegion
Maybe TranscribeVocabularyFilterMethod
TranscribeLanguageCode
languageCode :: TranscribeLanguageCode
region :: Maybe TranscribeRegion
vocabularyFilterMethod :: Maybe TranscribeVocabularyFilterMethod
vocabularyFilterName :: Maybe Text
vocabularyName :: Maybe Text
$sel:languageCode:EngineTranscribeSettings' :: EngineTranscribeSettings -> TranscribeLanguageCode
$sel:region:EngineTranscribeSettings' :: EngineTranscribeSettings -> Maybe TranscribeRegion
$sel:vocabularyFilterMethod:EngineTranscribeSettings' :: EngineTranscribeSettings -> Maybe TranscribeVocabularyFilterMethod
$sel:vocabularyFilterName:EngineTranscribeSettings' :: EngineTranscribeSettings -> Maybe Text
$sel:vocabularyName:EngineTranscribeSettings' :: EngineTranscribeSettings -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"VocabularyName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vocabularyName,
            (Text
"VocabularyFilterName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vocabularyFilterName,
            (Text
"VocabularyFilterMethod" Text -> TranscribeVocabularyFilterMethod -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (TranscribeVocabularyFilterMethod -> Pair)
-> Maybe TranscribeVocabularyFilterMethod -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TranscribeVocabularyFilterMethod
vocabularyFilterMethod,
            (Text
"Region" Text -> TranscribeRegion -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TranscribeRegion -> Pair) -> Maybe TranscribeRegion -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TranscribeRegion
region,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"LanguageCode" Text -> TranscribeLanguageCode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= TranscribeLanguageCode
languageCode)
          ]
      )