@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,178 lines (1,177 loc) • 169 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VertexAiIndex = exports.VertexAiIndexTimeoutsOutputReference = exports.vertexAiIndexTimeoutsToHclTerraform = exports.vertexAiIndexTimeoutsToTerraform = exports.VertexAiIndexMetadataOutputReference = exports.vertexAiIndexMetadataToHclTerraform = exports.vertexAiIndexMetadataToTerraform = exports.VertexAiIndexMetadataConfigOutputReference = exports.vertexAiIndexMetadataConfigToHclTerraform = exports.vertexAiIndexMetadataConfigToTerraform = exports.VertexAiIndexMetadataConfigAlgorithmConfigOutputReference = exports.vertexAiIndexMetadataConfigAlgorithmConfigToHclTerraform = exports.vertexAiIndexMetadataConfigAlgorithmConfigToTerraform = exports.VertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigOutputReference = exports.vertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigToHclTerraform = exports.vertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigToTerraform = exports.VertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigOutputReference = exports.vertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigToHclTerraform = exports.vertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigToTerraform = exports.VertexAiIndexIndexStatsList = exports.VertexAiIndexIndexStatsOutputReference = exports.vertexAiIndexIndexStatsToHclTerraform = exports.vertexAiIndexIndexStatsToTerraform = exports.VertexAiIndexDeployedIndexesList = exports.VertexAiIndexDeployedIndexesOutputReference = exports.vertexAiIndexDeployedIndexesToHclTerraform = exports.vertexAiIndexDeployedIndexesToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function vertexAiIndexDeployedIndexesToTerraform(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 {};
}
exports.vertexAiIndexDeployedIndexesToTerraform = vertexAiIndexDeployedIndexesToTerraform;
function vertexAiIndexDeployedIndexesToHclTerraform(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 = {};
return attrs;
}
exports.vertexAiIndexDeployedIndexesToHclTerraform = vertexAiIndexDeployedIndexesToHclTerraform;
class VertexAiIndexDeployedIndexesOutputReference 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() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
// deployed_index_id - computed: true, optional: false, required: false
get deployedIndexId() {
return this.getStringAttribute('deployed_index_id');
}
// index_endpoint - computed: true, optional: false, required: false
get indexEndpoint() {
return this.getStringAttribute('index_endpoint');
}
}
exports.VertexAiIndexDeployedIndexesOutputReference = VertexAiIndexDeployedIndexesOutputReference;
_a = JSII_RTTI_SYMBOL_1;
VertexAiIndexDeployedIndexesOutputReference[_a] = { fqn: "@cdktf/provider-google.vertexAiIndex.VertexAiIndexDeployedIndexesOutputReference", version: "14.12.0" };
class VertexAiIndexDeployedIndexesList 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 VertexAiIndexDeployedIndexesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.VertexAiIndexDeployedIndexesList = VertexAiIndexDeployedIndexesList;
_b = JSII_RTTI_SYMBOL_1;
VertexAiIndexDeployedIndexesList[_b] = { fqn: "@cdktf/provider-google.vertexAiIndex.VertexAiIndexDeployedIndexesList", version: "14.12.0" };
function vertexAiIndexIndexStatsToTerraform(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 {};
}
exports.vertexAiIndexIndexStatsToTerraform = vertexAiIndexIndexStatsToTerraform;
function vertexAiIndexIndexStatsToHclTerraform(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 = {};
return attrs;
}
exports.vertexAiIndexIndexStatsToHclTerraform = vertexAiIndexIndexStatsToHclTerraform;
class VertexAiIndexIndexStatsOutputReference 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() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
// shards_count - computed: true, optional: false, required: false
get shardsCount() {
return this.getNumberAttribute('shards_count');
}
// vectors_count - computed: true, optional: false, required: false
get vectorsCount() {
return this.getStringAttribute('vectors_count');
}
}
exports.VertexAiIndexIndexStatsOutputReference = VertexAiIndexIndexStatsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
VertexAiIndexIndexStatsOutputReference[_c] = { fqn: "@cdktf/provider-google.vertexAiIndex.VertexAiIndexIndexStatsOutputReference", version: "14.12.0" };
class VertexAiIndexIndexStatsList 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 VertexAiIndexIndexStatsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.VertexAiIndexIndexStatsList = VertexAiIndexIndexStatsList;
_d = JSII_RTTI_SYMBOL_1;
VertexAiIndexIndexStatsList[_d] = { fqn: "@cdktf/provider-google.vertexAiIndex.VertexAiIndexIndexStatsList", version: "14.12.0" };
function vertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigToTerraform(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 {};
}
exports.vertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigToTerraform = vertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigToTerraform;
function vertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigToHclTerraform(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 = {};
return attrs;
}
exports.vertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigToHclTerraform = vertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigToHclTerraform;
class VertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
}
exports.VertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigOutputReference = VertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigOutputReference;
_e = JSII_RTTI_SYMBOL_1;
VertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigOutputReference[_e] = { fqn: "@cdktf/provider-google.vertexAiIndex.VertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigOutputReference", version: "14.12.0" };
function vertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigToTerraform(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 {
leaf_node_embedding_count: cdktf.numberToTerraform(struct.leafNodeEmbeddingCount),
leaf_nodes_to_search_percent: cdktf.numberToTerraform(struct.leafNodesToSearchPercent),
};
}
exports.vertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigToTerraform = vertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigToTerraform;
function vertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigToHclTerraform(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 = {
leaf_node_embedding_count: {
value: cdktf.numberToHclTerraform(struct.leafNodeEmbeddingCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
leaf_nodes_to_search_percent: {
value: cdktf.numberToHclTerraform(struct.leafNodesToSearchPercent),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.vertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigToHclTerraform = vertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigToHclTerraform;
class VertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._leafNodeEmbeddingCount !== undefined) {
hasAnyValues = true;
internalValueResult.leafNodeEmbeddingCount = this._leafNodeEmbeddingCount;
}
if (this._leafNodesToSearchPercent !== undefined) {
hasAnyValues = true;
internalValueResult.leafNodesToSearchPercent = this._leafNodesToSearchPercent;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._leafNodeEmbeddingCount = undefined;
this._leafNodesToSearchPercent = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._leafNodeEmbeddingCount = value.leafNodeEmbeddingCount;
this._leafNodesToSearchPercent = value.leafNodesToSearchPercent;
}
}
get leafNodeEmbeddingCount() {
return this.getNumberAttribute('leaf_node_embedding_count');
}
set leafNodeEmbeddingCount(value) {
this._leafNodeEmbeddingCount = value;
}
resetLeafNodeEmbeddingCount() {
this._leafNodeEmbeddingCount = undefined;
}
// Temporarily expose input value. Use with caution.
get leafNodeEmbeddingCountInput() {
return this._leafNodeEmbeddingCount;
}
get leafNodesToSearchPercent() {
return this.getNumberAttribute('leaf_nodes_to_search_percent');
}
set leafNodesToSearchPercent(value) {
this._leafNodesToSearchPercent = value;
}
resetLeafNodesToSearchPercent() {
this._leafNodesToSearchPercent = undefined;
}
// Temporarily expose input value. Use with caution.
get leafNodesToSearchPercentInput() {
return this._leafNodesToSearchPercent;
}
}
exports.VertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigOutputReference = VertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigOutputReference;
_f = JSII_RTTI_SYMBOL_1;
VertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigOutputReference[_f] = { fqn: "@cdktf/provider-google.vertexAiIndex.VertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigOutputReference", version: "14.12.0" };
function vertexAiIndexMetadataConfigAlgorithmConfigToTerraform(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 {
brute_force_config: vertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigToTerraform(struct.bruteForceConfig),
tree_ah_config: vertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigToTerraform(struct.treeAhConfig),
};
}
exports.vertexAiIndexMetadataConfigAlgorithmConfigToTerraform = vertexAiIndexMetadataConfigAlgorithmConfigToTerraform;
function vertexAiIndexMetadataConfigAlgorithmConfigToHclTerraform(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 = {
brute_force_config: {
value: vertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigToHclTerraform(struct.bruteForceConfig),
isBlock: true,
type: "list",
storageClassType: "VertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigList",
},
tree_ah_config: {
value: vertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigToHclTerraform(struct.treeAhConfig),
isBlock: true,
type: "list",
storageClassType: "VertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.vertexAiIndexMetadataConfigAlgorithmConfigToHclTerraform = vertexAiIndexMetadataConfigAlgorithmConfigToHclTerraform;
class VertexAiIndexMetadataConfigAlgorithmConfigOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
// brute_force_config - computed: false, optional: true, required: false
this._bruteForceConfig = new VertexAiIndexMetadataConfigAlgorithmConfigBruteForceConfigOutputReference(this, "brute_force_config");
// tree_ah_config - computed: false, optional: true, required: false
this._treeAhConfig = new VertexAiIndexMetadataConfigAlgorithmConfigTreeAhConfigOutputReference(this, "tree_ah_config");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._bruteForceConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.bruteForceConfig = this._bruteForceConfig?.internalValue;
}
if (this._treeAhConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.treeAhConfig = this._treeAhConfig?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._bruteForceConfig.internalValue = undefined;
this._treeAhConfig.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._bruteForceConfig.internalValue = value.bruteForceConfig;
this._treeAhConfig.internalValue = value.treeAhConfig;
}
}
get bruteForceConfig() {
return this._bruteForceConfig;
}
putBruteForceConfig(value) {
this._bruteForceConfig.internalValue = value;
}
resetBruteForceConfig() {
this._bruteForceConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get bruteForceConfigInput() {
return this._bruteForceConfig.internalValue;
}
get treeAhConfig() {
return this._treeAhConfig;
}
putTreeAhConfig(value) {
this._treeAhConfig.internalValue = value;
}
resetTreeAhConfig() {
this._treeAhConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get treeAhConfigInput() {
return this._treeAhConfig.internalValue;
}
}
exports.VertexAiIndexMetadataConfigAlgorithmConfigOutputReference = VertexAiIndexMetadataConfigAlgorithmConfigOutputReference;
_g = JSII_RTTI_SYMBOL_1;
VertexAiIndexMetadataConfigAlgorithmConfigOutputReference[_g] = { fqn: "@cdktf/provider-google.vertexAiIndex.VertexAiIndexMetadataConfigAlgorithmConfigOutputReference", version: "14.12.0" };
function vertexAiIndexMetadataConfigToTerraform(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 {
approximate_neighbors_count: cdktf.numberToTerraform(struct.approximateNeighborsCount),
dimensions: cdktf.numberToTerraform(struct.dimensions),
distance_measure_type: cdktf.stringToTerraform(struct.distanceMeasureType),
feature_norm_type: cdktf.stringToTerraform(struct.featureNormType),
shard_size: cdktf.stringToTerraform(struct.shardSize),
algorithm_config: vertexAiIndexMetadataConfigAlgorithmConfigToTerraform(struct.algorithmConfig),
};
}
exports.vertexAiIndexMetadataConfigToTerraform = vertexAiIndexMetadataConfigToTerraform;
function vertexAiIndexMetadataConfigToHclTerraform(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 = {
approximate_neighbors_count: {
value: cdktf.numberToHclTerraform(struct.approximateNeighborsCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
dimensions: {
value: cdktf.numberToHclTerraform(struct.dimensions),
isBlock: false,
type: "simple",
storageClassType: "number",
},
distance_measure_type: {
value: cdktf.stringToHclTerraform(struct.distanceMeasureType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
feature_norm_type: {
value: cdktf.stringToHclTerraform(struct.featureNormType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
shard_size: {
value: cdktf.stringToHclTerraform(struct.shardSize),
isBlock: false,
type: "simple",
storageClassType: "string",
},
algorithm_config: {
value: vertexAiIndexMetadataConfigAlgorithmConfigToHclTerraform(struct.algorithmConfig),
isBlock: true,
type: "list",
storageClassType: "VertexAiIndexMetadataConfigAlgorithmConfigList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.vertexAiIndexMetadataConfigToHclTerraform = vertexAiIndexMetadataConfigToHclTerraform;
class VertexAiIndexMetadataConfigOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
// algorithm_config - computed: false, optional: true, required: false
this._algorithmConfig = new VertexAiIndexMetadataConfigAlgorithmConfigOutputReference(this, "algorithm_config");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._approximateNeighborsCount !== undefined) {
hasAnyValues = true;
internalValueResult.approximateNeighborsCount = this._approximateNeighborsCount;
}
if (this._dimensions !== undefined) {
hasAnyValues = true;
internalValueResult.dimensions = this._dimensions;
}
if (this._distanceMeasureType !== undefined) {
hasAnyValues = true;
internalValueResult.distanceMeasureType = this._distanceMeasureType;
}
if (this._featureNormType !== undefined) {
hasAnyValues = true;
internalValueResult.featureNormType = this._featureNormType;
}
if (this._shardSize !== undefined) {
hasAnyValues = true;
internalValueResult.shardSize = this._shardSize;
}
if (this._algorithmConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.algorithmConfig = this._algorithmConfig?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._approximateNeighborsCount = undefined;
this._dimensions = undefined;
this._distanceMeasureType = undefined;
this._featureNormType = undefined;
this._shardSize = undefined;
this._algorithmConfig.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._approximateNeighborsCount = value.approximateNeighborsCount;
this._dimensions = value.dimensions;
this._distanceMeasureType = value.distanceMeasureType;
this._featureNormType = value.featureNormType;
this._shardSize = value.shardSize;
this._algorithmConfig.internalValue = value.algorithmConfig;
}
}
get approximateNeighborsCount() {
return this.getNumberAttribute('approximate_neighbors_count');
}
set approximateNeighborsCount(value) {
this._approximateNeighborsCount = value;
}
resetApproximateNeighborsCount() {
this._approximateNeighborsCount = undefined;
}
// Temporarily expose input value. Use with caution.
get approximateNeighborsCountInput() {
return this._approximateNeighborsCount;
}
get dimensions() {
return this.getNumberAttribute('dimensions');
}
set dimensions(value) {
this._dimensions = value;
}
// Temporarily expose input value. Use with caution.
get dimensionsInput() {
return this._dimensions;
}
get distanceMeasureType() {
return this.getStringAttribute('distance_measure_type');
}
set distanceMeasureType(value) {
this._distanceMeasureType = value;
}
resetDistanceMeasureType() {
this._distanceMeasureType = undefined;
}
// Temporarily expose input value. Use with caution.
get distanceMeasureTypeInput() {
return this._distanceMeasureType;
}
get featureNormType() {
return this.getStringAttribute('feature_norm_type');
}
set featureNormType(value) {
this._featureNormType = value;
}
resetFeatureNormType() {
this._featureNormType = undefined;
}
// Temporarily expose input value. Use with caution.
get featureNormTypeInput() {
return this._featureNormType;
}
get shardSize() {
return this.getStringAttribute('shard_size');
}
set shardSize(value) {
this._shardSize = value;
}
resetShardSize() {
this._shardSize = undefined;
}
// Temporarily expose input value. Use with caution.
get shardSizeInput() {
return this._shardSize;
}
get algorithmConfig() {
return this._algorithmConfig;
}
putAlgorithmConfig(value) {
this._algorithmConfig.internalValue = value;
}
resetAlgorithmConfig() {
this._algorithmConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get algorithmConfigInput() {
return this._algorithmConfig.internalValue;
}
}
exports.VertexAiIndexMetadataConfigOutputReference = VertexAiIndexMetadataConfigOutputReference;
_h = JSII_RTTI_SYMBOL_1;
VertexAiIndexMetadataConfigOutputReference[_h] = { fqn: "@cdktf/provider-google.vertexAiIndex.VertexAiIndexMetadataConfigOutputReference", version: "14.12.0" };
function vertexAiIndexMetadataToTerraform(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 {
contents_delta_uri: cdktf.stringToTerraform(struct.contentsDeltaUri),
is_complete_overwrite: cdktf.booleanToTerraform(struct.isCompleteOverwrite),
config: vertexAiIndexMetadataConfigToTerraform(struct.config),
};
}
exports.vertexAiIndexMetadataToTerraform = vertexAiIndexMetadataToTerraform;
function vertexAiIndexMetadataToHclTerraform(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 = {
contents_delta_uri: {
value: cdktf.stringToHclTerraform(struct.contentsDeltaUri),
isBlock: false,
type: "simple",
storageClassType: "string",
},
is_complete_overwrite: {
value: cdktf.booleanToHclTerraform(struct.isCompleteOverwrite),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
config: {
value: vertexAiIndexMetadataConfigToHclTerraform(struct.config),
isBlock: true,
type: "list",
storageClassType: "VertexAiIndexMetadataConfigList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.vertexAiIndexMetadataToHclTerraform = vertexAiIndexMetadataToHclTerraform;
class VertexAiIndexMetadataOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
// config - computed: false, optional: true, required: false
this._config = new VertexAiIndexMetadataConfigOutputReference(this, "config");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._contentsDeltaUri !== undefined) {
hasAnyValues = true;
internalValueResult.contentsDeltaUri = this._contentsDeltaUri;
}
if (this._isCompleteOverwrite !== undefined) {
hasAnyValues = true;
internalValueResult.isCompleteOverwrite = this._isCompleteOverwrite;
}
if (this._config?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.config = this._config?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._contentsDeltaUri = undefined;
this._isCompleteOverwrite = undefined;
this._config.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._contentsDeltaUri = value.contentsDeltaUri;
this._isCompleteOverwrite = value.isCompleteOverwrite;
this._config.internalValue = value.config;
}
}
get contentsDeltaUri() {
return this.getStringAttribute('contents_delta_uri');
}
set contentsDeltaUri(value) {
this._contentsDeltaUri = value;
}
// Temporarily expose input value. Use with caution.
get contentsDeltaUriInput() {
return this._contentsDeltaUri;
}
get isCompleteOverwrite() {
return this.getBooleanAttribute('is_complete_overwrite');
}
set isCompleteOverwrite(value) {
this._isCompleteOverwrite = value;
}
resetIsCompleteOverwrite() {
this._isCompleteOverwrite = undefined;
}
// Temporarily expose input value. Use with caution.
get isCompleteOverwriteInput() {
return this._isCompleteOverwrite;
}
get config() {
return this._config;
}
putConfig(value) {
this._config.internalValue = value;
}
resetConfig() {
this._config.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get configInput() {
return this._config.internalValue;
}
}
exports.VertexAiIndexMetadataOutputReference = VertexAiIndexMetadataOutputReference;
_j = JSII_RTTI_SYMBOL_1;
VertexAiIndexMetadataOutputReference[_j] = { fqn: "@cdktf/provider-google.vertexAiIndex.VertexAiIndexMetadataOutputReference", version: "14.12.0" };
function vertexAiIndexTimeoutsToTerraform(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 {
create: cdktf.stringToTerraform(struct.create),
delete: cdktf.stringToTerraform(struct.delete),
update: cdktf.stringToTerraform(struct.update),
};
}
exports.vertexAiIndexTimeoutsToTerraform = vertexAiIndexTimeoutsToTerraform;
function vertexAiIndexTimeoutsToHclTerraform(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 = {
create: {
value: cdktf.stringToHclTerraform(struct.create),
isBlock: false,
type: "simple",
storageClassType: "string",
},
delete: {
value: cdktf.stringToHclTerraform(struct.delete),
isBlock: false,
type: "simple",
storageClassType: "string",
},
update: {
value: cdktf.stringToHclTerraform(struct.update),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.vertexAiIndexTimeoutsToHclTerraform = vertexAiIndexTimeoutsToHclTerraform;
class VertexAiIndexTimeoutsOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._create !== undefined) {
hasAnyValues = true;
internalValueResult.create = this._create;
}
if (this._delete !== undefined) {
hasAnyValues = true;
internalValueResult.delete = this._delete;
}
if (this._update !== undefined) {
hasAnyValues = true;
internalValueResult.update = this._update;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._create = undefined;
this._delete = undefined;
this._update = 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._create = value.create;
this._delete = value.delete;
this._update = value.update;
}
}
get create() {
return this.getStringAttribute('create');
}
set create(value) {
this._create = value;
}
resetCreate() {
this._create = undefined;
}
// Temporarily expose input value. Use with caution.
get createInput() {
return this._create;
}
get delete() {
return this.getStringAttribute('delete');
}
set delete(value) {
this._delete = value;
}
resetDelete() {
this._delete = undefined;
}
// Temporarily expose input value. Use with caution.
get deleteInput() {
return this._delete;
}
get update() {
return this.getStringAttribute('update');
}
set update(value) {
this._update = value;
}
resetUpdate() {
this._update = undefined;
}
// Temporarily expose input value. Use with caution.
get updateInput() {
return this._update;
}
}
exports.VertexAiIndexTimeoutsOutputReference = VertexAiIndexTimeoutsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
VertexAiIndexTimeoutsOutputReference[_k] = { fqn: "@cdktf/provider-google.vertexAiIndex.VertexAiIndexTimeoutsOutputReference", version: "14.12.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/vertex_ai_index google_vertex_ai_index}
*/
class VertexAiIndex extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a VertexAiIndex resource upon running "cdktf plan <stack-name>"
* @param scope The scope in which to define this construct
* @param importToId The construct id used in the generated config for the VertexAiIndex to import
* @param importFromId The id of the existing VertexAiIndex that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/vertex_ai_index#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the VertexAiIndex to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_vertex_ai_index", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/vertex_ai_index google_vertex_ai_index} Resource
*
* @param scope The scope in which to define this construct
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
* @param options VertexAiIndexConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_vertex_ai_index',
terraformGeneratorMetadata: {
providerName: 'google',
providerVersion: '6.13.0',
providerVersionConstraint: '~> 6.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// deployed_indexes - computed: true, optional: false, required: false
this._deployedIndexes = new VertexAiIndexDeployedIndexesList(this, "deployed_indexes", false);
// effective_labels - computed: true, optional: false, required: false
this._effectiveLabels = new cdktf.StringMap(this, "effective_labels");
// index_stats - computed: true, optional: false, required: false
this._indexStats = new VertexAiIndexIndexStatsList(this, "index_stats", false);
// terraform_labels - computed: true, optional: false, required: false
this._terraformLabels = new cdktf.StringMap(this, "terraform_labels");
// metadata - computed: false, optional: true, required: false
this._metadata = new VertexAiIndexMetadataOutputReference(this, "metadata");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new VertexAiIndexTimeoutsOutputReference(this, "timeouts");
this._description = config.description;
this._displayName = config.displayName;
this._id = config.id;
this._indexUpdateMethod = config.indexUpdateMethod;
this._labels = config.labels;
this._project = config.project;
this._region = config.region;
this._metadata.internalValue = config.metadata;
this._timeouts.internalValue = config.timeouts;
}
// ==========
// ATTRIBUTES
// ==========
// create_time - computed: true, optional: false, required: false
get createTime() {
return this.getStringAttribute('create_time');
}
get deployedIndexes() {
return this._deployedIndexes;
}
get description() {
return this.getStringAttribute('description');
}
set description(value) {
this._description = value;
}
resetDescription() {
this._description = undefined;
}
// Temporarily expose input value. Use with caution.
get descriptionInput() {
return this._description;
}
get displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
get effectiveLabels() {
return this._effectiveLabels;
}
// etag - computed: true, optional: false, required: false
get etag() {
return this.getStringAttribute('etag');
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
resetId() {
this._id = undefined;
}
// Temporarily expose input value. Use with caution.
get idInput() {
return this._id;
}
get indexStats() {
return this._indexStats;
}
get indexUpdateMethod() {
return this.getStringAttribute('index_update_method');
}
set indexUpdateMethod(value) {
this._indexUpdateMethod = value;
}
resetIndexUpdateMethod() {
this._indexUpdateMethod = undefined;
}
// Temporarily expose input value. Use with caution.
get indexUpdateMethodInput() {
return this._indexUpdateMethod;
}
get labels() {
return this.getStringMapAttribute('labels');
}
set labels(value) {
this._labels = value;
}
resetLabels() {
this._labels = undefined;
}
// Temporarily expose input value. Use with caution.
get labelsInput() {
return this._labels;
}
// metadata_schema_uri - computed: true, optional: false, required: false
get metadataSchemaUri() {
return this.getStringAttribute('metadata_schema_uri');
}
// name - computed: true, optional: false, required: false
get name() {
return this.getStringAttribute('name');
}
get project() {
return this.getStringAttribute('project');
}
set project(value) {
this._project = value;
}
resetProject() {
this._project = undefined;
}
// Temporarily expose input value. Use with caution.
get projectInput() {
return this._project;
}
get region() {
return this.getStringAttribute('region');
}
set region(value) {
this._region = value;
}
resetRegion() {
this._region = undefined;
}
// Temporarily expose input value. Use with caution.
get regionInput() {
return this._region;
}
get terraformLabels() {
return this._terraformLabels;
}
// update_time - computed: true, optional: false, required: false
get updateTime() {
return this.getStringAttribute('update_time');
}
get metadata() {
return this._metadata;
}
putMetadata(value) {
this._metadata.internalValue = value;
}
resetMetadata() {
this._metadata.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get metadataInput() {
return this._metadata.internalValue;
}
get timeouts() {
return this._timeouts;
}
putTimeouts(value) {
this._timeouts.internalValue = value;
}
resetTimeouts() {
this._timeouts.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutsInput() {
return this._timeouts.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
description: cdktf.stringToTerraform(this._description),
display_name: cdktf.stringToTerraform(this._displayName),
id: cdktf.stringToTerraform(this._id),
index_update_method: cdktf.stringToTerraform(this._indexUpdateMethod),
labels: cdktf.hashMapper(cdktf.stringToTerraform)(this._labels),
project: cdktf.stringToTerraform(this._project),
region: cdktf.stringToTerraform(this._region),
metadata: vertexAiIndexMetadataToTerraform(this._metadata.internalValue),
timeouts: vertexAiIndexTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
description: {
value: cdktf.stringToHclTerraform(this._description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
display_name: {
value: cdktf.stringToHclTerraform(this._displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
index_update_method: {
value: cdktf.stringToHclTerraform(this._indexUpdateMethod),
isBlock: false,
type: "simple",
storageClassType: "string",
},
labels: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._labels),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
project: {
value: cdktf.stringToHclTerraform(this._project),
isBlock: false,
type: "simple",
storageClassType: "string",
},
region: {
value: cdktf.stringToHclTerraform(this._region),
isBlock: false,
type: "simple",
storageClassType: "string",
},
metadata: {
value: vertexAiIndexMetadataToHclTerraform(this._metadata.internalValue),
isBlock: true,
type: "list",
storageClassType: "VertexAiIndexMetadataList",
},
timeouts: {
value: vertexAiIndexTimeoutsToHclTerraform(this._timeouts.internalValue),
isBlock: true,
type: "struct",
storageClassType: "VertexAiIndexTimeouts",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));