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