{-# 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.LexModels.Types.BuiltinIntentSlot 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 BuiltinIntentSlot = BuiltinIntentSlot'
{
BuiltinIntentSlot -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (BuiltinIntentSlot -> BuiltinIntentSlot -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BuiltinIntentSlot -> BuiltinIntentSlot -> Bool
$c/= :: BuiltinIntentSlot -> BuiltinIntentSlot -> Bool
== :: BuiltinIntentSlot -> BuiltinIntentSlot -> Bool
$c== :: BuiltinIntentSlot -> BuiltinIntentSlot -> Bool
Prelude.Eq, ReadPrec [BuiltinIntentSlot]
ReadPrec BuiltinIntentSlot
Int -> ReadS BuiltinIntentSlot
ReadS [BuiltinIntentSlot]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BuiltinIntentSlot]
$creadListPrec :: ReadPrec [BuiltinIntentSlot]
readPrec :: ReadPrec BuiltinIntentSlot
$creadPrec :: ReadPrec BuiltinIntentSlot
readList :: ReadS [BuiltinIntentSlot]
$creadList :: ReadS [BuiltinIntentSlot]
readsPrec :: Int -> ReadS BuiltinIntentSlot
$creadsPrec :: Int -> ReadS BuiltinIntentSlot
Prelude.Read, Int -> BuiltinIntentSlot -> ShowS
[BuiltinIntentSlot] -> ShowS
BuiltinIntentSlot -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BuiltinIntentSlot] -> ShowS
$cshowList :: [BuiltinIntentSlot] -> ShowS
show :: BuiltinIntentSlot -> String
$cshow :: BuiltinIntentSlot -> String
showsPrec :: Int -> BuiltinIntentSlot -> ShowS
$cshowsPrec :: Int -> BuiltinIntentSlot -> ShowS
Prelude.Show, forall x. Rep BuiltinIntentSlot x -> BuiltinIntentSlot
forall x. BuiltinIntentSlot -> Rep BuiltinIntentSlot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BuiltinIntentSlot x -> BuiltinIntentSlot
$cfrom :: forall x. BuiltinIntentSlot -> Rep BuiltinIntentSlot x
Prelude.Generic)
newBuiltinIntentSlot ::
BuiltinIntentSlot
newBuiltinIntentSlot :: BuiltinIntentSlot
newBuiltinIntentSlot =
BuiltinIntentSlot' {$sel:name:BuiltinIntentSlot' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing}
builtinIntentSlot_name :: Lens.Lens' BuiltinIntentSlot (Prelude.Maybe Prelude.Text)
builtinIntentSlot_name :: Lens' BuiltinIntentSlot (Maybe Text)
builtinIntentSlot_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BuiltinIntentSlot' {Maybe Text
name :: Maybe Text
$sel:name:BuiltinIntentSlot' :: BuiltinIntentSlot -> Maybe Text
name} -> Maybe Text
name) (\s :: BuiltinIntentSlot
s@BuiltinIntentSlot' {} Maybe Text
a -> BuiltinIntentSlot
s {$sel:name:BuiltinIntentSlot' :: Maybe Text
name = Maybe Text
a} :: BuiltinIntentSlot)
instance Data.FromJSON BuiltinIntentSlot where
parseJSON :: Value -> Parser BuiltinIntentSlot
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BuiltinIntentSlot"
( \Object
x ->
Maybe Text -> BuiltinIntentSlot
BuiltinIntentSlot' 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
"name")
)
instance Prelude.Hashable BuiltinIntentSlot where
hashWithSalt :: Int -> BuiltinIntentSlot -> Int
hashWithSalt Int
_salt BuiltinIntentSlot' {Maybe Text
name :: Maybe Text
$sel:name:BuiltinIntentSlot' :: BuiltinIntentSlot -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
instance Prelude.NFData BuiltinIntentSlot where
rnf :: BuiltinIntentSlot -> ()
rnf BuiltinIntentSlot' {Maybe Text
name :: Maybe Text
$sel:name:BuiltinIntentSlot' :: BuiltinIntentSlot -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name