{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:knowledgeBaseArn:KnowledgeBaseAssociationData' :: Maybe Text
knowledgeBaseArn =
forall a. Maybe a
Prelude.Nothing,
$sel:knowledgeBaseId:KnowledgeBaseAssociationData' :: Maybe Text
knowledgeBaseId = forall a. Maybe a
Prelude.Nothing
}
knowledgeBaseAssociationData_knowledgeBaseArn :: Lens.Lens' KnowledgeBaseAssociationData (Prelude.Maybe Prelude.Text)
knowledgeBaseAssociationData_knowledgeBaseArn :: Lens' KnowledgeBaseAssociationData (Maybe Text)
knowledgeBaseAssociationData_knowledgeBaseArn = 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 :: Lens' KnowledgeBaseAssociationData (Maybe Text)
knowledgeBaseAssociationData_knowledgeBaseId = 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 Data.FromJSON KnowledgeBaseAssociationData where
parseJSON :: Value -> Parser KnowledgeBaseAssociationData
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"KnowledgeBaseAssociationData"
( \Object
x ->
Maybe Text -> Maybe Text -> KnowledgeBaseAssociationData
KnowledgeBaseAssociationData'
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
"knowledgeBaseArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"knowledgeBaseId")
)
instance
Prelude.Hashable
KnowledgeBaseAssociationData
where
hashWithSalt :: Int -> KnowledgeBaseAssociationData -> Int
hashWithSalt Int
_salt KnowledgeBaseAssociationData' {Maybe Text
knowledgeBaseId :: Maybe Text
knowledgeBaseArn :: Maybe Text
$sel:knowledgeBaseId:KnowledgeBaseAssociationData' :: KnowledgeBaseAssociationData -> Maybe Text
$sel:knowledgeBaseArn:KnowledgeBaseAssociationData' :: KnowledgeBaseAssociationData -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
knowledgeBaseArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
knowledgeBaseId
instance Prelude.NFData KnowledgeBaseAssociationData where
rnf :: KnowledgeBaseAssociationData -> ()
rnf KnowledgeBaseAssociationData' {Maybe Text
knowledgeBaseId :: Maybe Text
knowledgeBaseArn :: Maybe Text
$sel:knowledgeBaseId:KnowledgeBaseAssociationData' :: KnowledgeBaseAssociationData -> Maybe Text
$sel:knowledgeBaseArn:KnowledgeBaseAssociationData' :: KnowledgeBaseAssociationData -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
knowledgeBaseArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
knowledgeBaseId