{-# 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.KnowledgeBaseAssociationData where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KnowledgeBaseAssociationData = KnowledgeBaseAssociationData'
{
KnowledgeBaseAssociationData -> Maybe Text
knowledgeBaseArn :: Prelude.Maybe Prelude.Text,
KnowledgeBaseAssociationData -> Maybe Text
knowledgeBaseId :: Prelude.Maybe Prelude.Text
}
deriving (KnowledgeBaseAssociationData
-> KnowledgeBaseAssociationData -> Bool
(KnowledgeBaseAssociationData
-> KnowledgeBaseAssociationData -> Bool)
-> (KnowledgeBaseAssociationData
-> KnowledgeBaseAssociationData -> Bool)
-> Eq KnowledgeBaseAssociationData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KnowledgeBaseAssociationData
-> KnowledgeBaseAssociationData -> Bool
$c/= :: KnowledgeBaseAssociationData
-> KnowledgeBaseAssociationData -> Bool
== :: KnowledgeBaseAssociationData
-> KnowledgeBaseAssociationData -> Bool
$c== :: KnowledgeBaseAssociationData
-> KnowledgeBaseAssociationData -> Bool
Prelude.Eq, ReadPrec [KnowledgeBaseAssociationData]
ReadPrec KnowledgeBaseAssociationData
Int -> ReadS KnowledgeBaseAssociationData
ReadS [KnowledgeBaseAssociationData]
(Int -> ReadS KnowledgeBaseAssociationData)
-> ReadS [KnowledgeBaseAssociationData]
-> ReadPrec KnowledgeBaseAssociationData
-> ReadPrec [KnowledgeBaseAssociationData]
-> Read KnowledgeBaseAssociationData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KnowledgeBaseAssociationData]
$creadListPrec :: ReadPrec [KnowledgeBaseAssociationData]
readPrec :: ReadPrec KnowledgeBaseAssociationData
$creadPrec :: ReadPrec KnowledgeBaseAssociationData
readList :: ReadS [KnowledgeBaseAssociationData]
$creadList :: ReadS [KnowledgeBaseAssociationData]
readsPrec :: Int -> ReadS KnowledgeBaseAssociationData
$creadsPrec :: Int -> ReadS KnowledgeBaseAssociationData
Prelude.Read, Int -> KnowledgeBaseAssociationData -> ShowS
[KnowledgeBaseAssociationData] -> ShowS
KnowledgeBaseAssociationData -> String
(Int -> KnowledgeBaseAssociationData -> ShowS)
-> (KnowledgeBaseAssociationData -> String)
-> ([KnowledgeBaseAssociationData] -> ShowS)
-> Show KnowledgeBaseAssociationData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KnowledgeBaseAssociationData] -> ShowS
$cshowList :: [KnowledgeBaseAssociationData] -> ShowS
show :: KnowledgeBaseAssociationData -> String
$cshow :: KnowledgeBaseAssociationData -> String
showsPrec :: Int -> KnowledgeBaseAssociationData -> ShowS
$cshowsPrec :: Int -> KnowledgeBaseAssociationData -> ShowS
Prelude.Show, (forall x.
KnowledgeBaseAssociationData -> Rep KnowledgeBaseAssociationData x)
-> (forall x.
Rep KnowledgeBaseAssociationData x -> KnowledgeBaseAssociationData)
-> Generic KnowledgeBaseAssociationData
forall x.
Rep KnowledgeBaseAssociationData x -> KnowledgeBaseAssociationData
forall x.
KnowledgeBaseAssociationData -> Rep KnowledgeBaseAssociationData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep KnowledgeBaseAssociationData x -> KnowledgeBaseAssociationData
$cfrom :: forall x.
KnowledgeBaseAssociationData -> Rep KnowledgeBaseAssociationData x
Prelude.Generic)
newKnowledgeBaseAssociationData ::
KnowledgeBaseAssociationData
newKnowledgeBaseAssociationData :: KnowledgeBaseAssociationData
newKnowledgeBaseAssociationData =
KnowledgeBaseAssociationData' :: Maybe Text -> Maybe Text -> KnowledgeBaseAssociationData
KnowledgeBaseAssociationData'
{ $sel:knowledgeBaseArn:KnowledgeBaseAssociationData' :: Maybe Text
knowledgeBaseArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:knowledgeBaseId:KnowledgeBaseAssociationData' :: Maybe Text
knowledgeBaseId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
knowledgeBaseAssociationData_knowledgeBaseArn :: Lens.Lens' KnowledgeBaseAssociationData (Prelude.Maybe Prelude.Text)
knowledgeBaseAssociationData_knowledgeBaseArn :: (Maybe Text -> f (Maybe Text))
-> KnowledgeBaseAssociationData -> f KnowledgeBaseAssociationData
knowledgeBaseAssociationData_knowledgeBaseArn = (KnowledgeBaseAssociationData -> Maybe Text)
-> (KnowledgeBaseAssociationData
-> Maybe Text -> KnowledgeBaseAssociationData)
-> Lens
KnowledgeBaseAssociationData
KnowledgeBaseAssociationData
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseAssociationData' {Maybe Text
knowledgeBaseArn :: Maybe Text
$sel:knowledgeBaseArn:KnowledgeBaseAssociationData' :: KnowledgeBaseAssociationData -> Maybe Text
knowledgeBaseArn} -> Maybe Text
knowledgeBaseArn) (\s :: KnowledgeBaseAssociationData
s@KnowledgeBaseAssociationData' {} Maybe Text
a -> KnowledgeBaseAssociationData
s {$sel:knowledgeBaseArn:KnowledgeBaseAssociationData' :: Maybe Text
knowledgeBaseArn = Maybe Text
a} :: KnowledgeBaseAssociationData)
knowledgeBaseAssociationData_knowledgeBaseId :: Lens.Lens' KnowledgeBaseAssociationData (Prelude.Maybe Prelude.Text)
knowledgeBaseAssociationData_knowledgeBaseId :: (Maybe Text -> f (Maybe Text))
-> KnowledgeBaseAssociationData -> f KnowledgeBaseAssociationData
knowledgeBaseAssociationData_knowledgeBaseId = (KnowledgeBaseAssociationData -> Maybe Text)
-> (KnowledgeBaseAssociationData
-> Maybe Text -> KnowledgeBaseAssociationData)
-> Lens
KnowledgeBaseAssociationData
KnowledgeBaseAssociationData
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KnowledgeBaseAssociationData' {Maybe Text
knowledgeBaseId :: Maybe Text
$sel:knowledgeBaseId:KnowledgeBaseAssociationData' :: KnowledgeBaseAssociationData -> Maybe Text
knowledgeBaseId} -> Maybe Text
knowledgeBaseId) (\s :: KnowledgeBaseAssociationData
s@KnowledgeBaseAssociationData' {} Maybe Text
a -> KnowledgeBaseAssociationData
s {$sel:knowledgeBaseId:KnowledgeBaseAssociationData' :: Maybe Text
knowledgeBaseId = Maybe Text
a} :: KnowledgeBaseAssociationData)
instance Core.FromJSON KnowledgeBaseAssociationData where
parseJSON :: Value -> Parser KnowledgeBaseAssociationData
parseJSON =
String
-> (Object -> Parser KnowledgeBaseAssociationData)
-> Value
-> Parser KnowledgeBaseAssociationData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"KnowledgeBaseAssociationData"
( \Object
x ->
Maybe Text -> Maybe Text -> KnowledgeBaseAssociationData
KnowledgeBaseAssociationData'
(Maybe Text -> Maybe Text -> KnowledgeBaseAssociationData)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> KnowledgeBaseAssociationData)
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
"knowledgeBaseArn")
Parser (Maybe Text -> KnowledgeBaseAssociationData)
-> Parser (Maybe Text) -> Parser KnowledgeBaseAssociationData
forall (f :: * -> *) a b. Applicative f => 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
"knowledgeBaseId")
)
instance
Prelude.Hashable
KnowledgeBaseAssociationData
instance Prelude.NFData KnowledgeBaseAssociationData