module Stratosphere.Bedrock.KnowledgeBase.PineconeConfigurationProperty (
module Exports, PineconeConfigurationProperty(..),
mkPineconeConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.KnowledgeBase.PineconeFieldMappingProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PineconeConfigurationProperty
=
PineconeConfigurationProperty {PineconeConfigurationProperty -> ()
haddock_workaround_ :: (),
PineconeConfigurationProperty -> Value Text
connectionString :: (Value Prelude.Text),
PineconeConfigurationProperty -> Value Text
credentialsSecretArn :: (Value Prelude.Text),
PineconeConfigurationProperty -> PineconeFieldMappingProperty
fieldMapping :: PineconeFieldMappingProperty,
PineconeConfigurationProperty -> Maybe (Value Text)
namespace :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (PineconeConfigurationProperty
-> PineconeConfigurationProperty -> Bool
(PineconeConfigurationProperty
-> PineconeConfigurationProperty -> Bool)
-> (PineconeConfigurationProperty
-> PineconeConfigurationProperty -> Bool)
-> Eq PineconeConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PineconeConfigurationProperty
-> PineconeConfigurationProperty -> Bool
== :: PineconeConfigurationProperty
-> PineconeConfigurationProperty -> Bool
$c/= :: PineconeConfigurationProperty
-> PineconeConfigurationProperty -> Bool
/= :: PineconeConfigurationProperty
-> PineconeConfigurationProperty -> Bool
Prelude.Eq, Int -> PineconeConfigurationProperty -> ShowS
[PineconeConfigurationProperty] -> ShowS
PineconeConfigurationProperty -> String
(Int -> PineconeConfigurationProperty -> ShowS)
-> (PineconeConfigurationProperty -> String)
-> ([PineconeConfigurationProperty] -> ShowS)
-> Show PineconeConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PineconeConfigurationProperty -> ShowS
showsPrec :: Int -> PineconeConfigurationProperty -> ShowS
$cshow :: PineconeConfigurationProperty -> String
show :: PineconeConfigurationProperty -> String
$cshowList :: [PineconeConfigurationProperty] -> ShowS
showList :: [PineconeConfigurationProperty] -> ShowS
Prelude.Show)
mkPineconeConfigurationProperty ::
Value Prelude.Text
-> Value Prelude.Text
-> PineconeFieldMappingProperty -> PineconeConfigurationProperty
mkPineconeConfigurationProperty :: Value Text
-> Value Text
-> PineconeFieldMappingProperty
-> PineconeConfigurationProperty
mkPineconeConfigurationProperty
Value Text
connectionString
Value Text
credentialsSecretArn
PineconeFieldMappingProperty
fieldMapping
= PineconeConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), connectionString :: Value Text
connectionString = Value Text
connectionString,
credentialsSecretArn :: Value Text
credentialsSecretArn = Value Text
credentialsSecretArn,
fieldMapping :: PineconeFieldMappingProperty
fieldMapping = PineconeFieldMappingProperty
fieldMapping, namespace :: Maybe (Value Text)
namespace = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PineconeConfigurationProperty where
toResourceProperties :: PineconeConfigurationProperty -> ResourceProperties
toResourceProperties PineconeConfigurationProperty {Maybe (Value Text)
()
Value Text
PineconeFieldMappingProperty
haddock_workaround_ :: PineconeConfigurationProperty -> ()
connectionString :: PineconeConfigurationProperty -> Value Text
credentialsSecretArn :: PineconeConfigurationProperty -> Value Text
fieldMapping :: PineconeConfigurationProperty -> PineconeFieldMappingProperty
namespace :: PineconeConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionString :: Value Text
credentialsSecretArn :: Value Text
fieldMapping :: PineconeFieldMappingProperty
namespace :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::KnowledgeBase.PineconeConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ConnectionString" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
connectionString,
Key
"CredentialsSecretArn" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
credentialsSecretArn,
Key
"FieldMapping" Key -> PineconeFieldMappingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= PineconeFieldMappingProperty
fieldMapping]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Namespace" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
namespace]))}
instance JSON.ToJSON PineconeConfigurationProperty where
toJSON :: PineconeConfigurationProperty -> Value
toJSON PineconeConfigurationProperty {Maybe (Value Text)
()
Value Text
PineconeFieldMappingProperty
haddock_workaround_ :: PineconeConfigurationProperty -> ()
connectionString :: PineconeConfigurationProperty -> Value Text
credentialsSecretArn :: PineconeConfigurationProperty -> Value Text
fieldMapping :: PineconeConfigurationProperty -> PineconeFieldMappingProperty
namespace :: PineconeConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionString :: Value Text
credentialsSecretArn :: Value Text
fieldMapping :: PineconeFieldMappingProperty
namespace :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ConnectionString" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
connectionString,
Key
"CredentialsSecretArn" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
credentialsSecretArn,
Key
"FieldMapping" Key -> PineconeFieldMappingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= PineconeFieldMappingProperty
fieldMapping]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Namespace" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
namespace])))
instance Property "ConnectionString" PineconeConfigurationProperty where
type PropertyType "ConnectionString" PineconeConfigurationProperty = Value Prelude.Text
set :: PropertyType "ConnectionString" PineconeConfigurationProperty
-> PineconeConfigurationProperty -> PineconeConfigurationProperty
set PropertyType "ConnectionString" PineconeConfigurationProperty
newValue PineconeConfigurationProperty {Maybe (Value Text)
()
Value Text
PineconeFieldMappingProperty
haddock_workaround_ :: PineconeConfigurationProperty -> ()
connectionString :: PineconeConfigurationProperty -> Value Text
credentialsSecretArn :: PineconeConfigurationProperty -> Value Text
fieldMapping :: PineconeConfigurationProperty -> PineconeFieldMappingProperty
namespace :: PineconeConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionString :: Value Text
credentialsSecretArn :: Value Text
fieldMapping :: PineconeFieldMappingProperty
namespace :: Maybe (Value Text)
..}
= PineconeConfigurationProperty {connectionString :: Value Text
connectionString = PropertyType "ConnectionString" PineconeConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
PineconeFieldMappingProperty
haddock_workaround_ :: ()
credentialsSecretArn :: Value Text
fieldMapping :: PineconeFieldMappingProperty
namespace :: Maybe (Value Text)
haddock_workaround_ :: ()
credentialsSecretArn :: Value Text
fieldMapping :: PineconeFieldMappingProperty
namespace :: Maybe (Value Text)
..}
instance Property "CredentialsSecretArn" PineconeConfigurationProperty where
type PropertyType "CredentialsSecretArn" PineconeConfigurationProperty = Value Prelude.Text
set :: PropertyType "CredentialsSecretArn" PineconeConfigurationProperty
-> PineconeConfigurationProperty -> PineconeConfigurationProperty
set PropertyType "CredentialsSecretArn" PineconeConfigurationProperty
newValue PineconeConfigurationProperty {Maybe (Value Text)
()
Value Text
PineconeFieldMappingProperty
haddock_workaround_ :: PineconeConfigurationProperty -> ()
connectionString :: PineconeConfigurationProperty -> Value Text
credentialsSecretArn :: PineconeConfigurationProperty -> Value Text
fieldMapping :: PineconeConfigurationProperty -> PineconeFieldMappingProperty
namespace :: PineconeConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionString :: Value Text
credentialsSecretArn :: Value Text
fieldMapping :: PineconeFieldMappingProperty
namespace :: Maybe (Value Text)
..}
= PineconeConfigurationProperty
{credentialsSecretArn :: Value Text
credentialsSecretArn = PropertyType "CredentialsSecretArn" PineconeConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
PineconeFieldMappingProperty
haddock_workaround_ :: ()
connectionString :: Value Text
fieldMapping :: PineconeFieldMappingProperty
namespace :: Maybe (Value Text)
haddock_workaround_ :: ()
connectionString :: Value Text
fieldMapping :: PineconeFieldMappingProperty
namespace :: Maybe (Value Text)
..}
instance Property "FieldMapping" PineconeConfigurationProperty where
type PropertyType "FieldMapping" PineconeConfigurationProperty = PineconeFieldMappingProperty
set :: PropertyType "FieldMapping" PineconeConfigurationProperty
-> PineconeConfigurationProperty -> PineconeConfigurationProperty
set PropertyType "FieldMapping" PineconeConfigurationProperty
newValue PineconeConfigurationProperty {Maybe (Value Text)
()
Value Text
PineconeFieldMappingProperty
haddock_workaround_ :: PineconeConfigurationProperty -> ()
connectionString :: PineconeConfigurationProperty -> Value Text
credentialsSecretArn :: PineconeConfigurationProperty -> Value Text
fieldMapping :: PineconeConfigurationProperty -> PineconeFieldMappingProperty
namespace :: PineconeConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionString :: Value Text
credentialsSecretArn :: Value Text
fieldMapping :: PineconeFieldMappingProperty
namespace :: Maybe (Value Text)
..}
= PineconeConfigurationProperty {fieldMapping :: PineconeFieldMappingProperty
fieldMapping = PropertyType "FieldMapping" PineconeConfigurationProperty
PineconeFieldMappingProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
connectionString :: Value Text
credentialsSecretArn :: Value Text
namespace :: Maybe (Value Text)
haddock_workaround_ :: ()
connectionString :: Value Text
credentialsSecretArn :: Value Text
namespace :: Maybe (Value Text)
..}
instance Property "Namespace" PineconeConfigurationProperty where
type PropertyType "Namespace" PineconeConfigurationProperty = Value Prelude.Text
set :: PropertyType "Namespace" PineconeConfigurationProperty
-> PineconeConfigurationProperty -> PineconeConfigurationProperty
set PropertyType "Namespace" PineconeConfigurationProperty
newValue PineconeConfigurationProperty {Maybe (Value Text)
()
Value Text
PineconeFieldMappingProperty
haddock_workaround_ :: PineconeConfigurationProperty -> ()
connectionString :: PineconeConfigurationProperty -> Value Text
credentialsSecretArn :: PineconeConfigurationProperty -> Value Text
fieldMapping :: PineconeConfigurationProperty -> PineconeFieldMappingProperty
namespace :: PineconeConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
connectionString :: Value Text
credentialsSecretArn :: Value Text
fieldMapping :: PineconeFieldMappingProperty
namespace :: Maybe (Value Text)
..}
= PineconeConfigurationProperty
{namespace :: Maybe (Value Text)
namespace = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Namespace" PineconeConfigurationProperty
Value Text
newValue, ()
Value Text
PineconeFieldMappingProperty
haddock_workaround_ :: ()
connectionString :: Value Text
credentialsSecretArn :: Value Text
fieldMapping :: PineconeFieldMappingProperty
haddock_workaround_ :: ()
connectionString :: Value Text
credentialsSecretArn :: Value Text
fieldMapping :: PineconeFieldMappingProperty
..}