{-# 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.LexV2Models.Types.BotLocaleImportSpecification where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexV2Models.Types.VoiceSettings
import qualified Amazonka.Prelude as Prelude
data BotLocaleImportSpecification = BotLocaleImportSpecification'
{
BotLocaleImportSpecification -> Maybe Double
nluIntentConfidenceThreshold :: Prelude.Maybe Prelude.Double,
BotLocaleImportSpecification -> Maybe VoiceSettings
voiceSettings :: Prelude.Maybe VoiceSettings,
BotLocaleImportSpecification -> Text
botId :: Prelude.Text,
BotLocaleImportSpecification -> Text
botVersion :: Prelude.Text,
BotLocaleImportSpecification -> Text
localeId :: Prelude.Text
}
deriving (BotLocaleImportSpecification
-> BotLocaleImportSpecification -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BotLocaleImportSpecification
-> BotLocaleImportSpecification -> Bool
$c/= :: BotLocaleImportSpecification
-> BotLocaleImportSpecification -> Bool
== :: BotLocaleImportSpecification
-> BotLocaleImportSpecification -> Bool
$c== :: BotLocaleImportSpecification
-> BotLocaleImportSpecification -> Bool
Prelude.Eq, ReadPrec [BotLocaleImportSpecification]
ReadPrec BotLocaleImportSpecification
Int -> ReadS BotLocaleImportSpecification
ReadS [BotLocaleImportSpecification]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BotLocaleImportSpecification]
$creadListPrec :: ReadPrec [BotLocaleImportSpecification]
readPrec :: ReadPrec BotLocaleImportSpecification
$creadPrec :: ReadPrec BotLocaleImportSpecification
readList :: ReadS [BotLocaleImportSpecification]
$creadList :: ReadS [BotLocaleImportSpecification]
readsPrec :: Int -> ReadS BotLocaleImportSpecification
$creadsPrec :: Int -> ReadS BotLocaleImportSpecification
Prelude.Read, Int -> BotLocaleImportSpecification -> ShowS
[BotLocaleImportSpecification] -> ShowS
BotLocaleImportSpecification -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BotLocaleImportSpecification] -> ShowS
$cshowList :: [BotLocaleImportSpecification] -> ShowS
show :: BotLocaleImportSpecification -> String
$cshow :: BotLocaleImportSpecification -> String
showsPrec :: Int -> BotLocaleImportSpecification -> ShowS
$cshowsPrec :: Int -> BotLocaleImportSpecification -> ShowS
Prelude.Show, forall x.
Rep BotLocaleImportSpecification x -> BotLocaleImportSpecification
forall x.
BotLocaleImportSpecification -> Rep BotLocaleImportSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BotLocaleImportSpecification x -> BotLocaleImportSpecification
$cfrom :: forall x.
BotLocaleImportSpecification -> Rep BotLocaleImportSpecification x
Prelude.Generic)
newBotLocaleImportSpecification ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
BotLocaleImportSpecification
newBotLocaleImportSpecification :: Text -> Text -> Text -> BotLocaleImportSpecification
newBotLocaleImportSpecification
Text
pBotId_
Text
pBotVersion_
Text
pLocaleId_ =
BotLocaleImportSpecification'
{ $sel:nluIntentConfidenceThreshold:BotLocaleImportSpecification' :: Maybe Double
nluIntentConfidenceThreshold =
forall a. Maybe a
Prelude.Nothing,
$sel:voiceSettings:BotLocaleImportSpecification' :: Maybe VoiceSettings
voiceSettings = forall a. Maybe a
Prelude.Nothing,
$sel:botId:BotLocaleImportSpecification' :: Text
botId = Text
pBotId_,
$sel:botVersion:BotLocaleImportSpecification' :: Text
botVersion = Text
pBotVersion_,
$sel:localeId:BotLocaleImportSpecification' :: Text
localeId = Text
pLocaleId_
}
botLocaleImportSpecification_nluIntentConfidenceThreshold :: Lens.Lens' BotLocaleImportSpecification (Prelude.Maybe Prelude.Double)
botLocaleImportSpecification_nluIntentConfidenceThreshold :: Lens' BotLocaleImportSpecification (Maybe Double)
botLocaleImportSpecification_nluIntentConfidenceThreshold = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotLocaleImportSpecification' {Maybe Double
nluIntentConfidenceThreshold :: Maybe Double
$sel:nluIntentConfidenceThreshold:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Maybe Double
nluIntentConfidenceThreshold} -> Maybe Double
nluIntentConfidenceThreshold) (\s :: BotLocaleImportSpecification
s@BotLocaleImportSpecification' {} Maybe Double
a -> BotLocaleImportSpecification
s {$sel:nluIntentConfidenceThreshold:BotLocaleImportSpecification' :: Maybe Double
nluIntentConfidenceThreshold = Maybe Double
a} :: BotLocaleImportSpecification)
botLocaleImportSpecification_voiceSettings :: Lens.Lens' BotLocaleImportSpecification (Prelude.Maybe VoiceSettings)
botLocaleImportSpecification_voiceSettings :: Lens' BotLocaleImportSpecification (Maybe VoiceSettings)
botLocaleImportSpecification_voiceSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotLocaleImportSpecification' {Maybe VoiceSettings
voiceSettings :: Maybe VoiceSettings
$sel:voiceSettings:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Maybe VoiceSettings
voiceSettings} -> Maybe VoiceSettings
voiceSettings) (\s :: BotLocaleImportSpecification
s@BotLocaleImportSpecification' {} Maybe VoiceSettings
a -> BotLocaleImportSpecification
s {$sel:voiceSettings:BotLocaleImportSpecification' :: Maybe VoiceSettings
voiceSettings = Maybe VoiceSettings
a} :: BotLocaleImportSpecification)
botLocaleImportSpecification_botId :: Lens.Lens' BotLocaleImportSpecification Prelude.Text
botLocaleImportSpecification_botId :: Lens' BotLocaleImportSpecification Text
botLocaleImportSpecification_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotLocaleImportSpecification' {Text
botId :: Text
$sel:botId:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
botId} -> Text
botId) (\s :: BotLocaleImportSpecification
s@BotLocaleImportSpecification' {} Text
a -> BotLocaleImportSpecification
s {$sel:botId:BotLocaleImportSpecification' :: Text
botId = Text
a} :: BotLocaleImportSpecification)
botLocaleImportSpecification_botVersion :: Lens.Lens' BotLocaleImportSpecification Prelude.Text
botLocaleImportSpecification_botVersion :: Lens' BotLocaleImportSpecification Text
botLocaleImportSpecification_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotLocaleImportSpecification' {Text
botVersion :: Text
$sel:botVersion:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
botVersion} -> Text
botVersion) (\s :: BotLocaleImportSpecification
s@BotLocaleImportSpecification' {} Text
a -> BotLocaleImportSpecification
s {$sel:botVersion:BotLocaleImportSpecification' :: Text
botVersion = Text
a} :: BotLocaleImportSpecification)
botLocaleImportSpecification_localeId :: Lens.Lens' BotLocaleImportSpecification Prelude.Text
botLocaleImportSpecification_localeId :: Lens' BotLocaleImportSpecification Text
botLocaleImportSpecification_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BotLocaleImportSpecification' {Text
localeId :: Text
$sel:localeId:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
localeId} -> Text
localeId) (\s :: BotLocaleImportSpecification
s@BotLocaleImportSpecification' {} Text
a -> BotLocaleImportSpecification
s {$sel:localeId:BotLocaleImportSpecification' :: Text
localeId = Text
a} :: BotLocaleImportSpecification)
instance Data.FromJSON BotLocaleImportSpecification where
parseJSON :: Value -> Parser BotLocaleImportSpecification
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BotLocaleImportSpecification"
( \Object
x ->
Maybe Double
-> Maybe VoiceSettings
-> Text
-> Text
-> Text
-> BotLocaleImportSpecification
BotLocaleImportSpecification'
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
"nluIntentConfidenceThreshold")
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
"voiceSettings")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"botId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"botVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"localeId")
)
instance
Prelude.Hashable
BotLocaleImportSpecification
where
hashWithSalt :: Int -> BotLocaleImportSpecification -> Int
hashWithSalt Int
_salt BotLocaleImportSpecification' {Maybe Double
Maybe VoiceSettings
Text
localeId :: Text
botVersion :: Text
botId :: Text
voiceSettings :: Maybe VoiceSettings
nluIntentConfidenceThreshold :: Maybe Double
$sel:localeId:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
$sel:botVersion:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
$sel:botId:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
$sel:voiceSettings:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Maybe VoiceSettings
$sel:nluIntentConfidenceThreshold:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
nluIntentConfidenceThreshold
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VoiceSettings
voiceSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
localeId
instance Prelude.NFData BotLocaleImportSpecification where
rnf :: BotLocaleImportSpecification -> ()
rnf BotLocaleImportSpecification' {Maybe Double
Maybe VoiceSettings
Text
localeId :: Text
botVersion :: Text
botId :: Text
voiceSettings :: Maybe VoiceSettings
nluIntentConfidenceThreshold :: Maybe Double
$sel:localeId:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
$sel:botVersion:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
$sel:botId:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
$sel:voiceSettings:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Maybe VoiceSettings
$sel:nluIntentConfidenceThreshold:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
nluIntentConfidenceThreshold
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VoiceSettings
voiceSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
localeId
instance Data.ToJSON BotLocaleImportSpecification where
toJSON :: BotLocaleImportSpecification -> Value
toJSON BotLocaleImportSpecification' {Maybe Double
Maybe VoiceSettings
Text
localeId :: Text
botVersion :: Text
botId :: Text
voiceSettings :: Maybe VoiceSettings
nluIntentConfidenceThreshold :: Maybe Double
$sel:localeId:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
$sel:botVersion:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
$sel:botId:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Text
$sel:voiceSettings:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Maybe VoiceSettings
$sel:nluIntentConfidenceThreshold:BotLocaleImportSpecification' :: BotLocaleImportSpecification -> Maybe Double
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"nluIntentConfidenceThreshold" 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 Double
nluIntentConfidenceThreshold,
(Key
"voiceSettings" 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 VoiceSettings
voiceSettings,
forall a. a -> Maybe a
Prelude.Just (Key
"botId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
botId),
forall a. a -> Maybe a
Prelude.Just (Key
"botVersion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
botVersion),
forall a. a -> Maybe a
Prelude.Just (Key
"localeId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
localeId)
]
)