{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BuiltinIntentSlot = BuiltinIntentSlot'
{
BuiltinIntentSlot -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (BuiltinIntentSlot -> BuiltinIntentSlot -> Bool
(BuiltinIntentSlot -> BuiltinIntentSlot -> Bool)
-> (BuiltinIntentSlot -> BuiltinIntentSlot -> Bool)
-> Eq BuiltinIntentSlot
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]
(Int -> ReadS BuiltinIntentSlot)
-> ReadS [BuiltinIntentSlot]
-> ReadPrec BuiltinIntentSlot
-> ReadPrec [BuiltinIntentSlot]
-> Read 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
(Int -> BuiltinIntentSlot -> ShowS)
-> (BuiltinIntentSlot -> String)
-> ([BuiltinIntentSlot] -> ShowS)
-> Show BuiltinIntentSlot
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. BuiltinIntentSlot -> Rep BuiltinIntentSlot x)
-> (forall x. Rep BuiltinIntentSlot x -> BuiltinIntentSlot)
-> Generic BuiltinIntentSlot
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' :: Maybe Text -> BuiltinIntentSlot
BuiltinIntentSlot' {$sel:name:BuiltinIntentSlot' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing}
builtinIntentSlot_name :: Lens.Lens' BuiltinIntentSlot (Prelude.Maybe Prelude.Text)
builtinIntentSlot_name :: (Maybe Text -> f (Maybe Text))
-> BuiltinIntentSlot -> f BuiltinIntentSlot
builtinIntentSlot_name = (BuiltinIntentSlot -> Maybe Text)
-> (BuiltinIntentSlot -> Maybe Text -> BuiltinIntentSlot)
-> Lens
BuiltinIntentSlot BuiltinIntentSlot (Maybe Text) (Maybe Text)
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 Core.FromJSON BuiltinIntentSlot where
parseJSON :: Value -> Parser BuiltinIntentSlot
parseJSON =
String
-> (Object -> Parser BuiltinIntentSlot)
-> Value
-> Parser BuiltinIntentSlot
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BuiltinIntentSlot"
( \Object
x ->
Maybe Text -> BuiltinIntentSlot
BuiltinIntentSlot' (Maybe Text -> BuiltinIntentSlot)
-> Parser (Maybe Text) -> Parser BuiltinIntentSlot
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
)
instance Prelude.Hashable BuiltinIntentSlot
instance Prelude.NFData BuiltinIntentSlot