@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
926 lines • 340 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BedrockagentKnowledgeBase = exports.BedrockagentKnowledgeBaseTimeoutsOutputReference = exports.bedrockagentKnowledgeBaseTimeoutsToHclTerraform = exports.bedrockagentKnowledgeBaseTimeoutsToTerraform = exports.BedrockagentKnowledgeBaseStorageConfigurationList = exports.BedrockagentKnowledgeBaseStorageConfigurationOutputReference = exports.bedrockagentKnowledgeBaseStorageConfigurationToHclTerraform = exports.bedrockagentKnowledgeBaseStorageConfigurationToTerraform = exports.BedrockagentKnowledgeBaseStorageConfigurationRedisEnterpriseCloudConfigurationList = exports.BedrockagentKnowledgeBaseStorageConfigurationRedisEnterpriseCloudConfigurationOutputReference = exports.bedrockagentKnowledgeBaseStorageConfigurationRedisEnterpriseCloudConfigurationToHclTerraform = exports.bedrockagentKnowledgeBaseStorageConfigurationRedisEnterpriseCloudConfigurationToTerraform = exports.BedrockagentKnowledgeBaseStorageConfigurationRedisEnterpriseCloudConfigurationFieldMappingList = exports.BedrockagentKnowledgeBaseStorageConfigurationRedisEnterpriseCloudConfigurationFieldMappingOutputReference = exports.bedrockagentKnowledgeBaseStorageConfigurationRedisEnterpriseCloudConfigurationFieldMappingToHclTerraform = exports.bedrockagentKnowledgeBaseStorageConfigurationRedisEnterpriseCloudConfigurationFieldMappingToTerraform = exports.BedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationList = exports.BedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationOutputReference = exports.bedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationToHclTerraform = exports.bedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationToTerraform = exports.BedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationFieldMappingList = exports.BedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationFieldMappingOutputReference = exports.bedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationFieldMappingToHclTerraform = exports.bedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationFieldMappingToTerraform = exports.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationList = exports.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationOutputReference = exports.bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationToHclTerraform = exports.bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationToTerraform = exports.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingList = exports.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingOutputReference = exports.bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingToHclTerraform = exports.bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingToTerraform = exports.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationList = exports.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationOutputReference = exports.bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationToHclTerraform = exports.bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationToTerraform = exports.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingList = exports.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingOutputReference = exports.bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingToHclTerraform = exports.bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingToTerraform = exports.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationList = exports.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationOutputReference = exports.bedrockagentKnowledgeBaseKnowledgeBaseConfigurationToHclTerraform = exports.bedrockagentKnowledgeBaseKnowledgeBaseConfigurationToTerraform = exports.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationList = exports.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationOutputReference = exports.bedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationToHclTerraform = exports.bedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function bedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
embedding_model_arn: cdktf.stringToTerraform(struct.embeddingModelArn),
};
}
exports.bedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationToTerraform = bedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationToTerraform;
function bedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
embedding_model_arn: {
value: cdktf.stringToHclTerraform(struct.embeddingModelArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.bedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationToHclTerraform = bedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationToHclTerraform;
class BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._embeddingModelArn !== undefined) {
hasAnyValues = true;
internalValueResult.embeddingModelArn = this._embeddingModelArn;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._embeddingModelArn = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._embeddingModelArn = value.embeddingModelArn;
}
}
get embeddingModelArn() {
return this.getStringAttribute('embedding_model_arn');
}
set embeddingModelArn(value) {
this._embeddingModelArn = value;
}
// Temporarily expose input value. Use with caution.
get embeddingModelArnInput() {
return this._embeddingModelArn;
}
}
exports.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationOutputReference = BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationOutputReference;
_a = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationOutputReference[_a] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationOutputReference", version: "19.50.0" };
class BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationList extends cdktf.ComplexList {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, wrapsSet) {
super(terraformResource, terraformAttribute, wrapsSet);
this.terraformResource = terraformResource;
this.terraformAttribute = terraformAttribute;
this.wrapsSet = wrapsSet;
}
/**
* @param index the index of the item to return
*/
get(index) {
return new BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationList = BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationList;
_b = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationList[_b] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationList", version: "19.50.0" };
function bedrockagentKnowledgeBaseKnowledgeBaseConfigurationToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
type: cdktf.stringToTerraform(struct.type),
vector_knowledge_base_configuration: cdktf.listMapper(bedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationToTerraform, true)(struct.vectorKnowledgeBaseConfiguration),
};
}
exports.bedrockagentKnowledgeBaseKnowledgeBaseConfigurationToTerraform = bedrockagentKnowledgeBaseKnowledgeBaseConfigurationToTerraform;
function bedrockagentKnowledgeBaseKnowledgeBaseConfigurationToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vector_knowledge_base_configuration: {
value: cdktf.listMapperHcl(bedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationToHclTerraform, true)(struct.vectorKnowledgeBaseConfiguration),
isBlock: true,
type: "list",
storageClassType: "BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.bedrockagentKnowledgeBaseKnowledgeBaseConfigurationToHclTerraform = bedrockagentKnowledgeBaseKnowledgeBaseConfigurationToHclTerraform;
class BedrockagentKnowledgeBaseKnowledgeBaseConfigurationOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
// vector_knowledge_base_configuration - computed: false, optional: true, required: false
this._vectorKnowledgeBaseConfiguration = new BedrockagentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationList(this, "vector_knowledge_base_configuration", false);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
if (this._vectorKnowledgeBaseConfiguration?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.vectorKnowledgeBaseConfiguration = this._vectorKnowledgeBaseConfiguration?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._type = undefined;
this._vectorKnowledgeBaseConfiguration.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._type = value.type;
this._vectorKnowledgeBaseConfiguration.internalValue = value.vectorKnowledgeBaseConfiguration;
}
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
get vectorKnowledgeBaseConfiguration() {
return this._vectorKnowledgeBaseConfiguration;
}
putVectorKnowledgeBaseConfiguration(value) {
this._vectorKnowledgeBaseConfiguration.internalValue = value;
}
resetVectorKnowledgeBaseConfiguration() {
this._vectorKnowledgeBaseConfiguration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get vectorKnowledgeBaseConfigurationInput() {
return this._vectorKnowledgeBaseConfiguration.internalValue;
}
}
exports.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationOutputReference = BedrockagentKnowledgeBaseKnowledgeBaseConfigurationOutputReference;
_c = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseKnowledgeBaseConfigurationOutputReference[_c] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationOutputReference", version: "19.50.0" };
class BedrockagentKnowledgeBaseKnowledgeBaseConfigurationList extends cdktf.ComplexList {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, wrapsSet) {
super(terraformResource, terraformAttribute, wrapsSet);
this.terraformResource = terraformResource;
this.terraformAttribute = terraformAttribute;
this.wrapsSet = wrapsSet;
}
/**
* @param index the index of the item to return
*/
get(index) {
return new BedrockagentKnowledgeBaseKnowledgeBaseConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationList = BedrockagentKnowledgeBaseKnowledgeBaseConfigurationList;
_d = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseKnowledgeBaseConfigurationList[_d] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseKnowledgeBaseConfigurationList", version: "19.50.0" };
function bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
metadata_field: cdktf.stringToTerraform(struct.metadataField),
text_field: cdktf.stringToTerraform(struct.textField),
vector_field: cdktf.stringToTerraform(struct.vectorField),
};
}
exports.bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingToTerraform = bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingToTerraform;
function bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
metadata_field: {
value: cdktf.stringToHclTerraform(struct.metadataField),
isBlock: false,
type: "simple",
storageClassType: "string",
},
text_field: {
value: cdktf.stringToHclTerraform(struct.textField),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vector_field: {
value: cdktf.stringToHclTerraform(struct.vectorField),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingToHclTerraform = bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingToHclTerraform;
class BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._metadataField !== undefined) {
hasAnyValues = true;
internalValueResult.metadataField = this._metadataField;
}
if (this._textField !== undefined) {
hasAnyValues = true;
internalValueResult.textField = this._textField;
}
if (this._vectorField !== undefined) {
hasAnyValues = true;
internalValueResult.vectorField = this._vectorField;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._metadataField = undefined;
this._textField = undefined;
this._vectorField = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._metadataField = value.metadataField;
this._textField = value.textField;
this._vectorField = value.vectorField;
}
}
get metadataField() {
return this.getStringAttribute('metadata_field');
}
set metadataField(value) {
this._metadataField = value;
}
resetMetadataField() {
this._metadataField = undefined;
}
// Temporarily expose input value. Use with caution.
get metadataFieldInput() {
return this._metadataField;
}
get textField() {
return this.getStringAttribute('text_field');
}
set textField(value) {
this._textField = value;
}
resetTextField() {
this._textField = undefined;
}
// Temporarily expose input value. Use with caution.
get textFieldInput() {
return this._textField;
}
get vectorField() {
return this.getStringAttribute('vector_field');
}
set vectorField(value) {
this._vectorField = value;
}
resetVectorField() {
this._vectorField = undefined;
}
// Temporarily expose input value. Use with caution.
get vectorFieldInput() {
return this._vectorField;
}
}
exports.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingOutputReference = BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingOutputReference;
_e = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingOutputReference[_e] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingOutputReference", version: "19.50.0" };
class BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingList extends cdktf.ComplexList {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, wrapsSet) {
super(terraformResource, terraformAttribute, wrapsSet);
this.terraformResource = terraformResource;
this.terraformAttribute = terraformAttribute;
this.wrapsSet = wrapsSet;
}
/**
* @param index the index of the item to return
*/
get(index) {
return new BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingList = BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingList;
_f = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingList[_f] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingList", version: "19.50.0" };
function bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
collection_arn: cdktf.stringToTerraform(struct.collectionArn),
vector_index_name: cdktf.stringToTerraform(struct.vectorIndexName),
field_mapping: cdktf.listMapper(bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingToTerraform, true)(struct.fieldMapping),
};
}
exports.bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationToTerraform = bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationToTerraform;
function bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
collection_arn: {
value: cdktf.stringToHclTerraform(struct.collectionArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vector_index_name: {
value: cdktf.stringToHclTerraform(struct.vectorIndexName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
field_mapping: {
value: cdktf.listMapperHcl(bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingToHclTerraform, true)(struct.fieldMapping),
isBlock: true,
type: "list",
storageClassType: "BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationToHclTerraform = bedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationToHclTerraform;
class BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
// field_mapping - computed: false, optional: true, required: false
this._fieldMapping = new BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingList(this, "field_mapping", false);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._collectionArn !== undefined) {
hasAnyValues = true;
internalValueResult.collectionArn = this._collectionArn;
}
if (this._vectorIndexName !== undefined) {
hasAnyValues = true;
internalValueResult.vectorIndexName = this._vectorIndexName;
}
if (this._fieldMapping?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.fieldMapping = this._fieldMapping?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._collectionArn = undefined;
this._vectorIndexName = undefined;
this._fieldMapping.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._collectionArn = value.collectionArn;
this._vectorIndexName = value.vectorIndexName;
this._fieldMapping.internalValue = value.fieldMapping;
}
}
get collectionArn() {
return this.getStringAttribute('collection_arn');
}
set collectionArn(value) {
this._collectionArn = value;
}
// Temporarily expose input value. Use with caution.
get collectionArnInput() {
return this._collectionArn;
}
get vectorIndexName() {
return this.getStringAttribute('vector_index_name');
}
set vectorIndexName(value) {
this._vectorIndexName = value;
}
// Temporarily expose input value. Use with caution.
get vectorIndexNameInput() {
return this._vectorIndexName;
}
get fieldMapping() {
return this._fieldMapping;
}
putFieldMapping(value) {
this._fieldMapping.internalValue = value;
}
resetFieldMapping() {
this._fieldMapping.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get fieldMappingInput() {
return this._fieldMapping.internalValue;
}
}
exports.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationOutputReference = BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationOutputReference;
_g = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationOutputReference[_g] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationOutputReference", version: "19.50.0" };
class BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationList extends cdktf.ComplexList {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, wrapsSet) {
super(terraformResource, terraformAttribute, wrapsSet);
this.terraformResource = terraformResource;
this.terraformAttribute = terraformAttribute;
this.wrapsSet = wrapsSet;
}
/**
* @param index the index of the item to return
*/
get(index) {
return new BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationList = BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationList;
_h = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationList[_h] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationList", version: "19.50.0" };
function bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
metadata_field: cdktf.stringToTerraform(struct.metadataField),
text_field: cdktf.stringToTerraform(struct.textField),
};
}
exports.bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingToTerraform = bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingToTerraform;
function bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
metadata_field: {
value: cdktf.stringToHclTerraform(struct.metadataField),
isBlock: false,
type: "simple",
storageClassType: "string",
},
text_field: {
value: cdktf.stringToHclTerraform(struct.textField),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingToHclTerraform = bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingToHclTerraform;
class BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._metadataField !== undefined) {
hasAnyValues = true;
internalValueResult.metadataField = this._metadataField;
}
if (this._textField !== undefined) {
hasAnyValues = true;
internalValueResult.textField = this._textField;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._metadataField = undefined;
this._textField = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._metadataField = value.metadataField;
this._textField = value.textField;
}
}
get metadataField() {
return this.getStringAttribute('metadata_field');
}
set metadataField(value) {
this._metadataField = value;
}
resetMetadataField() {
this._metadataField = undefined;
}
// Temporarily expose input value. Use with caution.
get metadataFieldInput() {
return this._metadataField;
}
get textField() {
return this.getStringAttribute('text_field');
}
set textField(value) {
this._textField = value;
}
resetTextField() {
this._textField = undefined;
}
// Temporarily expose input value. Use with caution.
get textFieldInput() {
return this._textField;
}
}
exports.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingOutputReference = BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingOutputReference;
_j = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingOutputReference[_j] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingOutputReference", version: "19.50.0" };
class BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingList extends cdktf.ComplexList {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, wrapsSet) {
super(terraformResource, terraformAttribute, wrapsSet);
this.terraformResource = terraformResource;
this.terraformAttribute = terraformAttribute;
this.wrapsSet = wrapsSet;
}
/**
* @param index the index of the item to return
*/
get(index) {
return new BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingList = BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingList;
_k = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingList[_k] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingList", version: "19.50.0" };
function bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
connection_string: cdktf.stringToTerraform(struct.connectionString),
credentials_secret_arn: cdktf.stringToTerraform(struct.credentialsSecretArn),
namespace: cdktf.stringToTerraform(struct.namespace),
field_mapping: cdktf.listMapper(bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingToTerraform, true)(struct.fieldMapping),
};
}
exports.bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationToTerraform = bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationToTerraform;
function bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
connection_string: {
value: cdktf.stringToHclTerraform(struct.connectionString),
isBlock: false,
type: "simple",
storageClassType: "string",
},
credentials_secret_arn: {
value: cdktf.stringToHclTerraform(struct.credentialsSecretArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
namespace: {
value: cdktf.stringToHclTerraform(struct.namespace),
isBlock: false,
type: "simple",
storageClassType: "string",
},
field_mapping: {
value: cdktf.listMapperHcl(bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingToHclTerraform, true)(struct.fieldMapping),
isBlock: true,
type: "list",
storageClassType: "BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationToHclTerraform = bedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationToHclTerraform;
class BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
// field_mapping - computed: false, optional: true, required: false
this._fieldMapping = new BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationFieldMappingList(this, "field_mapping", false);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._connectionString !== undefined) {
hasAnyValues = true;
internalValueResult.connectionString = this._connectionString;
}
if (this._credentialsSecretArn !== undefined) {
hasAnyValues = true;
internalValueResult.credentialsSecretArn = this._credentialsSecretArn;
}
if (this._namespace !== undefined) {
hasAnyValues = true;
internalValueResult.namespace = this._namespace;
}
if (this._fieldMapping?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.fieldMapping = this._fieldMapping?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._connectionString = undefined;
this._credentialsSecretArn = undefined;
this._namespace = undefined;
this._fieldMapping.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._connectionString = value.connectionString;
this._credentialsSecretArn = value.credentialsSecretArn;
this._namespace = value.namespace;
this._fieldMapping.internalValue = value.fieldMapping;
}
}
get connectionString() {
return this.getStringAttribute('connection_string');
}
set connectionString(value) {
this._connectionString = value;
}
// Temporarily expose input value. Use with caution.
get connectionStringInput() {
return this._connectionString;
}
get credentialsSecretArn() {
return this.getStringAttribute('credentials_secret_arn');
}
set credentialsSecretArn(value) {
this._credentialsSecretArn = value;
}
// Temporarily expose input value. Use with caution.
get credentialsSecretArnInput() {
return this._credentialsSecretArn;
}
get namespace() {
return this.getStringAttribute('namespace');
}
set namespace(value) {
this._namespace = value;
}
resetNamespace() {
this._namespace = undefined;
}
// Temporarily expose input value. Use with caution.
get namespaceInput() {
return this._namespace;
}
get fieldMapping() {
return this._fieldMapping;
}
putFieldMapping(value) {
this._fieldMapping.internalValue = value;
}
resetFieldMapping() {
this._fieldMapping.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get fieldMappingInput() {
return this._fieldMapping.internalValue;
}
}
exports.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationOutputReference = BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationOutputReference;
_l = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationOutputReference[_l] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationOutputReference", version: "19.50.0" };
class BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationList extends cdktf.ComplexList {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, wrapsSet) {
super(terraformResource, terraformAttribute, wrapsSet);
this.terraformResource = terraformResource;
this.terraformAttribute = terraformAttribute;
this.wrapsSet = wrapsSet;
}
/**
* @param index the index of the item to return
*/
get(index) {
return new BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationList = BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationList;
_m = JSII_RTTI_SYMBOL_1;
BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationList[_m] = { fqn: "@cdktf/provider-aws.bedrockagentKnowledgeBase.BedrockagentKnowledgeBaseStorageConfigurationPineconeConfigurationList", version: "19.50.0" };
function bedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationFieldMappingToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
metadata_field: cdktf.stringToTerraform(struct.metadataField),
primary_key_field: cdktf.stringToTerraform(struct.primaryKeyField),
text_field: cdktf.stringToTerraform(struct.textField),
vector_field: cdktf.stringToTerraform(struct.vectorField),
};
}
exports.bedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationFieldMappingToTerraform = bedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationFieldMappingToTerraform;
function bedrockagentKnowledgeBaseStorageConfigurationRdsConfigurationFieldMappingToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
metadata_field: {
value: cdktf.stringToHclTerraform(struct.metadataField),
isBlock: false,
type: "simple",
storageClassType: "string",
},
primary_key_field: {
value: cdktf.stringToHclTerraform(struct.primaryKeyField),
isBlock: false,
type: "simple",
storageClassType: "string",
},
text_field: {
value: cdktf.stringToHclTerraform(struct.textField),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vector_field: {
value: cdktf.stringToHclTerraform(struct.vectorField),
isBlock