module Stratosphere.Lex.Bot.DataSourceConfigurationProperty (
module Exports, DataSourceConfigurationProperty(..),
mkDataSourceConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lex.Bot.BedrockKnowledgeStoreConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Lex.Bot.OpensearchConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Lex.Bot.QnAKendraConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data DataSourceConfigurationProperty
=
DataSourceConfigurationProperty {DataSourceConfigurationProperty -> ()
haddock_workaround_ :: (),
DataSourceConfigurationProperty
-> Maybe BedrockKnowledgeStoreConfigurationProperty
bedrockKnowledgeStoreConfiguration :: (Prelude.Maybe BedrockKnowledgeStoreConfigurationProperty),
DataSourceConfigurationProperty
-> Maybe QnAKendraConfigurationProperty
kendraConfiguration :: (Prelude.Maybe QnAKendraConfigurationProperty),
DataSourceConfigurationProperty
-> Maybe OpensearchConfigurationProperty
opensearchConfiguration :: (Prelude.Maybe OpensearchConfigurationProperty)}
deriving stock (DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool
(DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool)
-> (DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool)
-> Eq DataSourceConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool
== :: DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool
$c/= :: DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool
/= :: DataSourceConfigurationProperty
-> DataSourceConfigurationProperty -> Bool
Prelude.Eq, Int -> DataSourceConfigurationProperty -> ShowS
[DataSourceConfigurationProperty] -> ShowS
DataSourceConfigurationProperty -> String
(Int -> DataSourceConfigurationProperty -> ShowS)
-> (DataSourceConfigurationProperty -> String)
-> ([DataSourceConfigurationProperty] -> ShowS)
-> Show DataSourceConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataSourceConfigurationProperty -> ShowS
showsPrec :: Int -> DataSourceConfigurationProperty -> ShowS
$cshow :: DataSourceConfigurationProperty -> String
show :: DataSourceConfigurationProperty -> String
$cshowList :: [DataSourceConfigurationProperty] -> ShowS
showList :: [DataSourceConfigurationProperty] -> ShowS
Prelude.Show)
mkDataSourceConfigurationProperty ::
DataSourceConfigurationProperty
mkDataSourceConfigurationProperty :: DataSourceConfigurationProperty
mkDataSourceConfigurationProperty
= DataSourceConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
bedrockKnowledgeStoreConfiguration = Maybe BedrockKnowledgeStoreConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
kendraConfiguration :: Maybe QnAKendraConfigurationProperty
kendraConfiguration = Maybe QnAKendraConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
opensearchConfiguration :: Maybe OpensearchConfigurationProperty
opensearchConfiguration = Maybe OpensearchConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DataSourceConfigurationProperty where
toResourceProperties :: DataSourceConfigurationProperty -> ResourceProperties
toResourceProperties DataSourceConfigurationProperty {Maybe BedrockKnowledgeStoreConfigurationProperty
Maybe OpensearchConfigurationProperty
Maybe QnAKendraConfigurationProperty
()
haddock_workaround_ :: DataSourceConfigurationProperty -> ()
bedrockKnowledgeStoreConfiguration :: DataSourceConfigurationProperty
-> Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: DataSourceConfigurationProperty
-> Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: DataSourceConfigurationProperty
-> Maybe OpensearchConfigurationProperty
haddock_workaround_ :: ()
bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: Maybe OpensearchConfigurationProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lex::Bot.DataSourceConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> BedrockKnowledgeStoreConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BedrockKnowledgeStoreConfiguration"
(BedrockKnowledgeStoreConfigurationProperty -> (Key, Value))
-> Maybe BedrockKnowledgeStoreConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BedrockKnowledgeStoreConfigurationProperty
bedrockKnowledgeStoreConfiguration,
Key -> QnAKendraConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KendraConfiguration" (QnAKendraConfigurationProperty -> (Key, Value))
-> Maybe QnAKendraConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe QnAKendraConfigurationProperty
kendraConfiguration,
Key -> OpensearchConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OpensearchConfiguration"
(OpensearchConfigurationProperty -> (Key, Value))
-> Maybe OpensearchConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpensearchConfigurationProperty
opensearchConfiguration])}
instance JSON.ToJSON DataSourceConfigurationProperty where
toJSON :: DataSourceConfigurationProperty -> Value
toJSON DataSourceConfigurationProperty {Maybe BedrockKnowledgeStoreConfigurationProperty
Maybe OpensearchConfigurationProperty
Maybe QnAKendraConfigurationProperty
()
haddock_workaround_ :: DataSourceConfigurationProperty -> ()
bedrockKnowledgeStoreConfiguration :: DataSourceConfigurationProperty
-> Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: DataSourceConfigurationProperty
-> Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: DataSourceConfigurationProperty
-> Maybe OpensearchConfigurationProperty
haddock_workaround_ :: ()
bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: Maybe OpensearchConfigurationProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> BedrockKnowledgeStoreConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BedrockKnowledgeStoreConfiguration"
(BedrockKnowledgeStoreConfigurationProperty -> (Key, Value))
-> Maybe BedrockKnowledgeStoreConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BedrockKnowledgeStoreConfigurationProperty
bedrockKnowledgeStoreConfiguration,
Key -> QnAKendraConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KendraConfiguration" (QnAKendraConfigurationProperty -> (Key, Value))
-> Maybe QnAKendraConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe QnAKendraConfigurationProperty
kendraConfiguration,
Key -> OpensearchConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OpensearchConfiguration"
(OpensearchConfigurationProperty -> (Key, Value))
-> Maybe OpensearchConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpensearchConfigurationProperty
opensearchConfiguration]))
instance Property "BedrockKnowledgeStoreConfiguration" DataSourceConfigurationProperty where
type PropertyType "BedrockKnowledgeStoreConfiguration" DataSourceConfigurationProperty = BedrockKnowledgeStoreConfigurationProperty
set :: PropertyType
"BedrockKnowledgeStoreConfiguration"
DataSourceConfigurationProperty
-> DataSourceConfigurationProperty
-> DataSourceConfigurationProperty
set PropertyType
"BedrockKnowledgeStoreConfiguration"
DataSourceConfigurationProperty
newValue DataSourceConfigurationProperty {Maybe BedrockKnowledgeStoreConfigurationProperty
Maybe OpensearchConfigurationProperty
Maybe QnAKendraConfigurationProperty
()
haddock_workaround_ :: DataSourceConfigurationProperty -> ()
bedrockKnowledgeStoreConfiguration :: DataSourceConfigurationProperty
-> Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: DataSourceConfigurationProperty
-> Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: DataSourceConfigurationProperty
-> Maybe OpensearchConfigurationProperty
haddock_workaround_ :: ()
bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: Maybe OpensearchConfigurationProperty
..}
= DataSourceConfigurationProperty
{bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
bedrockKnowledgeStoreConfiguration = BedrockKnowledgeStoreConfigurationProperty
-> Maybe BedrockKnowledgeStoreConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"BedrockKnowledgeStoreConfiguration"
DataSourceConfigurationProperty
BedrockKnowledgeStoreConfigurationProperty
newValue, Maybe OpensearchConfigurationProperty
Maybe QnAKendraConfigurationProperty
()
haddock_workaround_ :: ()
kendraConfiguration :: Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: Maybe OpensearchConfigurationProperty
haddock_workaround_ :: ()
kendraConfiguration :: Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: Maybe OpensearchConfigurationProperty
..}
instance Property "KendraConfiguration" DataSourceConfigurationProperty where
type PropertyType "KendraConfiguration" DataSourceConfigurationProperty = QnAKendraConfigurationProperty
set :: PropertyType "KendraConfiguration" DataSourceConfigurationProperty
-> DataSourceConfigurationProperty
-> DataSourceConfigurationProperty
set PropertyType "KendraConfiguration" DataSourceConfigurationProperty
newValue DataSourceConfigurationProperty {Maybe BedrockKnowledgeStoreConfigurationProperty
Maybe OpensearchConfigurationProperty
Maybe QnAKendraConfigurationProperty
()
haddock_workaround_ :: DataSourceConfigurationProperty -> ()
bedrockKnowledgeStoreConfiguration :: DataSourceConfigurationProperty
-> Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: DataSourceConfigurationProperty
-> Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: DataSourceConfigurationProperty
-> Maybe OpensearchConfigurationProperty
haddock_workaround_ :: ()
bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: Maybe OpensearchConfigurationProperty
..}
= DataSourceConfigurationProperty
{kendraConfiguration :: Maybe QnAKendraConfigurationProperty
kendraConfiguration = QnAKendraConfigurationProperty
-> Maybe QnAKendraConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KendraConfiguration" DataSourceConfigurationProperty
QnAKendraConfigurationProperty
newValue, Maybe BedrockKnowledgeStoreConfigurationProperty
Maybe OpensearchConfigurationProperty
()
haddock_workaround_ :: ()
bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
opensearchConfiguration :: Maybe OpensearchConfigurationProperty
haddock_workaround_ :: ()
bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
opensearchConfiguration :: Maybe OpensearchConfigurationProperty
..}
instance Property "OpensearchConfiguration" DataSourceConfigurationProperty where
type PropertyType "OpensearchConfiguration" DataSourceConfigurationProperty = OpensearchConfigurationProperty
set :: PropertyType
"OpensearchConfiguration" DataSourceConfigurationProperty
-> DataSourceConfigurationProperty
-> DataSourceConfigurationProperty
set PropertyType
"OpensearchConfiguration" DataSourceConfigurationProperty
newValue DataSourceConfigurationProperty {Maybe BedrockKnowledgeStoreConfigurationProperty
Maybe OpensearchConfigurationProperty
Maybe QnAKendraConfigurationProperty
()
haddock_workaround_ :: DataSourceConfigurationProperty -> ()
bedrockKnowledgeStoreConfiguration :: DataSourceConfigurationProperty
-> Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: DataSourceConfigurationProperty
-> Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: DataSourceConfigurationProperty
-> Maybe OpensearchConfigurationProperty
haddock_workaround_ :: ()
bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: Maybe QnAKendraConfigurationProperty
opensearchConfiguration :: Maybe OpensearchConfigurationProperty
..}
= DataSourceConfigurationProperty
{opensearchConfiguration :: Maybe OpensearchConfigurationProperty
opensearchConfiguration = OpensearchConfigurationProperty
-> Maybe OpensearchConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"OpensearchConfiguration" DataSourceConfigurationProperty
OpensearchConfigurationProperty
newValue, Maybe BedrockKnowledgeStoreConfigurationProperty
Maybe QnAKendraConfigurationProperty
()
haddock_workaround_ :: ()
bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: Maybe QnAKendraConfigurationProperty
haddock_workaround_ :: ()
bedrockKnowledgeStoreConfiguration :: Maybe BedrockKnowledgeStoreConfigurationProperty
kendraConfiguration :: Maybe QnAKendraConfigurationProperty
..}