{-# 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.Wisdom.Types.AssistantAssociationInputData where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AssistantAssociationInputData = AssistantAssociationInputData'
{
AssistantAssociationInputData -> Maybe Text
knowledgeBaseId :: Prelude.Maybe Prelude.Text
}
deriving (AssistantAssociationInputData
-> AssistantAssociationInputData -> Bool
(AssistantAssociationInputData
-> AssistantAssociationInputData -> Bool)
-> (AssistantAssociationInputData
-> AssistantAssociationInputData -> Bool)
-> Eq AssistantAssociationInputData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssistantAssociationInputData
-> AssistantAssociationInputData -> Bool
$c/= :: AssistantAssociationInputData
-> AssistantAssociationInputData -> Bool
== :: AssistantAssociationInputData
-> AssistantAssociationInputData -> Bool
$c== :: AssistantAssociationInputData
-> AssistantAssociationInputData -> Bool
Prelude.Eq, ReadPrec [AssistantAssociationInputData]
ReadPrec AssistantAssociationInputData
Int -> ReadS AssistantAssociationInputData
ReadS [AssistantAssociationInputData]
(Int -> ReadS AssistantAssociationInputData)
-> ReadS [AssistantAssociationInputData]
-> ReadPrec AssistantAssociationInputData
-> ReadPrec [AssistantAssociationInputData]
-> Read AssistantAssociationInputData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssistantAssociationInputData]
$creadListPrec :: ReadPrec [AssistantAssociationInputData]
readPrec :: ReadPrec AssistantAssociationInputData
$creadPrec :: ReadPrec AssistantAssociationInputData
readList :: ReadS [AssistantAssociationInputData]
$creadList :: ReadS [AssistantAssociationInputData]
readsPrec :: Int -> ReadS AssistantAssociationInputData
$creadsPrec :: Int -> ReadS AssistantAssociationInputData
Prelude.Read, Int -> AssistantAssociationInputData -> ShowS
[AssistantAssociationInputData] -> ShowS
AssistantAssociationInputData -> String
(Int -> AssistantAssociationInputData -> ShowS)
-> (AssistantAssociationInputData -> String)
-> ([AssistantAssociationInputData] -> ShowS)
-> Show AssistantAssociationInputData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssistantAssociationInputData] -> ShowS
$cshowList :: [AssistantAssociationInputData] -> ShowS
show :: AssistantAssociationInputData -> String
$cshow :: AssistantAssociationInputData -> String
showsPrec :: Int -> AssistantAssociationInputData -> ShowS
$cshowsPrec :: Int -> AssistantAssociationInputData -> ShowS
Prelude.Show, (forall x.
AssistantAssociationInputData
-> Rep AssistantAssociationInputData x)
-> (forall x.
Rep AssistantAssociationInputData x
-> AssistantAssociationInputData)
-> Generic AssistantAssociationInputData
forall x.
Rep AssistantAssociationInputData x
-> AssistantAssociationInputData
forall x.
AssistantAssociationInputData
-> Rep AssistantAssociationInputData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssistantAssociationInputData x
-> AssistantAssociationInputData
$cfrom :: forall x.
AssistantAssociationInputData
-> Rep AssistantAssociationInputData x
Prelude.Generic)
newAssistantAssociationInputData ::
AssistantAssociationInputData
newAssistantAssociationInputData :: AssistantAssociationInputData
newAssistantAssociationInputData =
AssistantAssociationInputData' :: Maybe Text -> AssistantAssociationInputData
AssistantAssociationInputData'
{ $sel:knowledgeBaseId:AssistantAssociationInputData' :: Maybe Text
knowledgeBaseId =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
assistantAssociationInputData_knowledgeBaseId :: Lens.Lens' AssistantAssociationInputData (Prelude.Maybe Prelude.Text)
assistantAssociationInputData_knowledgeBaseId :: (Maybe Text -> f (Maybe Text))
-> AssistantAssociationInputData -> f AssistantAssociationInputData
assistantAssociationInputData_knowledgeBaseId = (AssistantAssociationInputData -> Maybe Text)
-> (AssistantAssociationInputData
-> Maybe Text -> AssistantAssociationInputData)
-> Lens
AssistantAssociationInputData
AssistantAssociationInputData
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssistantAssociationInputData' {Maybe Text
knowledgeBaseId :: Maybe Text
$sel:knowledgeBaseId:AssistantAssociationInputData' :: AssistantAssociationInputData -> Maybe Text
knowledgeBaseId} -> Maybe Text
knowledgeBaseId) (\s :: AssistantAssociationInputData
s@AssistantAssociationInputData' {} Maybe Text
a -> AssistantAssociationInputData
s {$sel:knowledgeBaseId:AssistantAssociationInputData' :: Maybe Text
knowledgeBaseId = Maybe Text
a} :: AssistantAssociationInputData)
instance
Prelude.Hashable
AssistantAssociationInputData
instance Prelude.NFData AssistantAssociationInputData
instance Core.ToJSON AssistantAssociationInputData where
toJSON :: AssistantAssociationInputData -> Value
toJSON AssistantAssociationInputData' {Maybe Text
knowledgeBaseId :: Maybe Text
$sel:knowledgeBaseId:AssistantAssociationInputData' :: AssistantAssociationInputData -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"knowledgeBaseId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
knowledgeBaseId
]
)