{-# 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.CustomVocabularyImportSpecification 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
data CustomVocabularyImportSpecification = CustomVocabularyImportSpecification'
{
CustomVocabularyImportSpecification -> Text
botId :: Prelude.Text,
CustomVocabularyImportSpecification -> Text
botVersion :: Prelude.Text,
CustomVocabularyImportSpecification -> Text
localeId :: Prelude.Text
}
deriving (CustomVocabularyImportSpecification
-> CustomVocabularyImportSpecification -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomVocabularyImportSpecification
-> CustomVocabularyImportSpecification -> Bool
$c/= :: CustomVocabularyImportSpecification
-> CustomVocabularyImportSpecification -> Bool
== :: CustomVocabularyImportSpecification
-> CustomVocabularyImportSpecification -> Bool
$c== :: CustomVocabularyImportSpecification
-> CustomVocabularyImportSpecification -> Bool
Prelude.Eq, ReadPrec [CustomVocabularyImportSpecification]
ReadPrec CustomVocabularyImportSpecification
Int -> ReadS CustomVocabularyImportSpecification
ReadS [CustomVocabularyImportSpecification]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomVocabularyImportSpecification]
$creadListPrec :: ReadPrec [CustomVocabularyImportSpecification]
readPrec :: ReadPrec CustomVocabularyImportSpecification
$creadPrec :: ReadPrec CustomVocabularyImportSpecification
readList :: ReadS [CustomVocabularyImportSpecification]
$creadList :: ReadS [CustomVocabularyImportSpecification]
readsPrec :: Int -> ReadS CustomVocabularyImportSpecification
$creadsPrec :: Int -> ReadS CustomVocabularyImportSpecification
Prelude.Read, Int -> CustomVocabularyImportSpecification -> ShowS
[CustomVocabularyImportSpecification] -> ShowS
CustomVocabularyImportSpecification -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomVocabularyImportSpecification] -> ShowS
$cshowList :: [CustomVocabularyImportSpecification] -> ShowS
show :: CustomVocabularyImportSpecification -> String
$cshow :: CustomVocabularyImportSpecification -> String
showsPrec :: Int -> CustomVocabularyImportSpecification -> ShowS
$cshowsPrec :: Int -> CustomVocabularyImportSpecification -> ShowS
Prelude.Show, forall x.
Rep CustomVocabularyImportSpecification x
-> CustomVocabularyImportSpecification
forall x.
CustomVocabularyImportSpecification
-> Rep CustomVocabularyImportSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomVocabularyImportSpecification x
-> CustomVocabularyImportSpecification
$cfrom :: forall x.
CustomVocabularyImportSpecification
-> Rep CustomVocabularyImportSpecification x
Prelude.Generic)
newCustomVocabularyImportSpecification ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CustomVocabularyImportSpecification
newCustomVocabularyImportSpecification :: Text -> Text -> Text -> CustomVocabularyImportSpecification
newCustomVocabularyImportSpecification
Text
pBotId_
Text
pBotVersion_
Text
pLocaleId_ =
CustomVocabularyImportSpecification'
{ $sel:botId:CustomVocabularyImportSpecification' :: Text
botId =
Text
pBotId_,
$sel:botVersion:CustomVocabularyImportSpecification' :: Text
botVersion = Text
pBotVersion_,
$sel:localeId:CustomVocabularyImportSpecification' :: Text
localeId = Text
pLocaleId_
}
customVocabularyImportSpecification_botId :: Lens.Lens' CustomVocabularyImportSpecification Prelude.Text
customVocabularyImportSpecification_botId :: Lens' CustomVocabularyImportSpecification Text
customVocabularyImportSpecification_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomVocabularyImportSpecification' {Text
botId :: Text
$sel:botId:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
botId} -> Text
botId) (\s :: CustomVocabularyImportSpecification
s@CustomVocabularyImportSpecification' {} Text
a -> CustomVocabularyImportSpecification
s {$sel:botId:CustomVocabularyImportSpecification' :: Text
botId = Text
a} :: CustomVocabularyImportSpecification)
customVocabularyImportSpecification_botVersion :: Lens.Lens' CustomVocabularyImportSpecification Prelude.Text
customVocabularyImportSpecification_botVersion :: Lens' CustomVocabularyImportSpecification Text
customVocabularyImportSpecification_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomVocabularyImportSpecification' {Text
botVersion :: Text
$sel:botVersion:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
botVersion} -> Text
botVersion) (\s :: CustomVocabularyImportSpecification
s@CustomVocabularyImportSpecification' {} Text
a -> CustomVocabularyImportSpecification
s {$sel:botVersion:CustomVocabularyImportSpecification' :: Text
botVersion = Text
a} :: CustomVocabularyImportSpecification)
customVocabularyImportSpecification_localeId :: Lens.Lens' CustomVocabularyImportSpecification Prelude.Text
customVocabularyImportSpecification_localeId :: Lens' CustomVocabularyImportSpecification Text
customVocabularyImportSpecification_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomVocabularyImportSpecification' {Text
localeId :: Text
$sel:localeId:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
localeId} -> Text
localeId) (\s :: CustomVocabularyImportSpecification
s@CustomVocabularyImportSpecification' {} Text
a -> CustomVocabularyImportSpecification
s {$sel:localeId:CustomVocabularyImportSpecification' :: Text
localeId = Text
a} :: CustomVocabularyImportSpecification)
instance
Data.FromJSON
CustomVocabularyImportSpecification
where
parseJSON :: Value -> Parser CustomVocabularyImportSpecification
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CustomVocabularyImportSpecification"
( \Object
x ->
Text -> Text -> Text -> CustomVocabularyImportSpecification
CustomVocabularyImportSpecification'
forall (f :: * -> *) a b. Functor 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
CustomVocabularyImportSpecification
where
hashWithSalt :: Int -> CustomVocabularyImportSpecification -> Int
hashWithSalt
Int
_salt
CustomVocabularyImportSpecification' {Text
localeId :: Text
botVersion :: Text
botId :: Text
$sel:localeId:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
$sel:botVersion:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
$sel:botId:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
..} =
Int
_salt
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
CustomVocabularyImportSpecification
where
rnf :: CustomVocabularyImportSpecification -> ()
rnf CustomVocabularyImportSpecification' {Text
localeId :: Text
botVersion :: Text
botId :: Text
$sel:localeId:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
$sel:botVersion:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
$sel:botId:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
..} =
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
CustomVocabularyImportSpecification
where
toJSON :: CustomVocabularyImportSpecification -> Value
toJSON CustomVocabularyImportSpecification' {Text
localeId :: Text
botVersion :: Text
botId :: Text
$sel:localeId:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
$sel:botVersion:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
$sel:botId:CustomVocabularyImportSpecification' :: CustomVocabularyImportSpecification -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ 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)
]
)