UNPKG

@cdktf/provider-azurerm

Version:

Prebuilt azurerm Provider for Terraform CDK (cdktf)

1,119 lines 201 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; Object.defineProperty(exports, "__esModule", { value: true }); exports.CosmosdbGremlinGraph = exports.CosmosdbGremlinGraphUniqueKeyList = exports.CosmosdbGremlinGraphUniqueKeyOutputReference = exports.cosmosdbGremlinGraphUniqueKeyToHclTerraform = exports.cosmosdbGremlinGraphUniqueKeyToTerraform = exports.CosmosdbGremlinGraphTimeoutsOutputReference = exports.cosmosdbGremlinGraphTimeoutsToHclTerraform = exports.cosmosdbGremlinGraphTimeoutsToTerraform = exports.CosmosdbGremlinGraphIndexPolicyOutputReference = exports.cosmosdbGremlinGraphIndexPolicyToHclTerraform = exports.cosmosdbGremlinGraphIndexPolicyToTerraform = exports.CosmosdbGremlinGraphIndexPolicySpatialIndexList = exports.CosmosdbGremlinGraphIndexPolicySpatialIndexOutputReference = exports.cosmosdbGremlinGraphIndexPolicySpatialIndexToHclTerraform = exports.cosmosdbGremlinGraphIndexPolicySpatialIndexToTerraform = exports.CosmosdbGremlinGraphIndexPolicyCompositeIndexList = exports.CosmosdbGremlinGraphIndexPolicyCompositeIndexOutputReference = exports.cosmosdbGremlinGraphIndexPolicyCompositeIndexToHclTerraform = exports.cosmosdbGremlinGraphIndexPolicyCompositeIndexToTerraform = exports.CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexList = exports.CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexOutputReference = exports.cosmosdbGremlinGraphIndexPolicyCompositeIndexIndexToHclTerraform = exports.cosmosdbGremlinGraphIndexPolicyCompositeIndexIndexToTerraform = exports.CosmosdbGremlinGraphConflictResolutionPolicyOutputReference = exports.cosmosdbGremlinGraphConflictResolutionPolicyToHclTerraform = exports.cosmosdbGremlinGraphConflictResolutionPolicyToTerraform = exports.CosmosdbGremlinGraphAutoscaleSettingsOutputReference = exports.cosmosdbGremlinGraphAutoscaleSettingsToHclTerraform = exports.cosmosdbGremlinGraphAutoscaleSettingsToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function cosmosdbGremlinGraphAutoscaleSettingsToTerraform(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 { max_throughput: cdktf.numberToTerraform(struct.maxThroughput), }; } exports.cosmosdbGremlinGraphAutoscaleSettingsToTerraform = cosmosdbGremlinGraphAutoscaleSettingsToTerraform; function cosmosdbGremlinGraphAutoscaleSettingsToHclTerraform(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 = { max_throughput: { value: cdktf.numberToHclTerraform(struct.maxThroughput), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cosmosdbGremlinGraphAutoscaleSettingsToHclTerraform = cosmosdbGremlinGraphAutoscaleSettingsToHclTerraform; class CosmosdbGremlinGraphAutoscaleSettingsOutputReference 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._maxThroughput !== undefined) { hasAnyValues = true; internalValueResult.maxThroughput = this._maxThroughput; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._maxThroughput = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._maxThroughput = value.maxThroughput; } } get maxThroughput() { return this.getNumberAttribute('max_throughput'); } set maxThroughput(value) { this._maxThroughput = value; } resetMaxThroughput() { this._maxThroughput = undefined; } // Temporarily expose input value. Use with caution. get maxThroughputInput() { return this._maxThroughput; } } exports.CosmosdbGremlinGraphAutoscaleSettingsOutputReference = CosmosdbGremlinGraphAutoscaleSettingsOutputReference; _a = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphAutoscaleSettingsOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphAutoscaleSettingsOutputReference", version: "12.27.0" }; function cosmosdbGremlinGraphConflictResolutionPolicyToTerraform(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 { conflict_resolution_path: cdktf.stringToTerraform(struct.conflictResolutionPath), conflict_resolution_procedure: cdktf.stringToTerraform(struct.conflictResolutionProcedure), mode: cdktf.stringToTerraform(struct.mode), }; } exports.cosmosdbGremlinGraphConflictResolutionPolicyToTerraform = cosmosdbGremlinGraphConflictResolutionPolicyToTerraform; function cosmosdbGremlinGraphConflictResolutionPolicyToHclTerraform(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 = { conflict_resolution_path: { value: cdktf.stringToHclTerraform(struct.conflictResolutionPath), isBlock: false, type: "simple", storageClassType: "string", }, conflict_resolution_procedure: { value: cdktf.stringToHclTerraform(struct.conflictResolutionProcedure), isBlock: false, type: "simple", storageClassType: "string", }, mode: { value: cdktf.stringToHclTerraform(struct.mode), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cosmosdbGremlinGraphConflictResolutionPolicyToHclTerraform = cosmosdbGremlinGraphConflictResolutionPolicyToHclTerraform; class CosmosdbGremlinGraphConflictResolutionPolicyOutputReference 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._conflictResolutionPath !== undefined) { hasAnyValues = true; internalValueResult.conflictResolutionPath = this._conflictResolutionPath; } if (this._conflictResolutionProcedure !== undefined) { hasAnyValues = true; internalValueResult.conflictResolutionProcedure = this._conflictResolutionProcedure; } if (this._mode !== undefined) { hasAnyValues = true; internalValueResult.mode = this._mode; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._conflictResolutionPath = undefined; this._conflictResolutionProcedure = undefined; this._mode = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._conflictResolutionPath = value.conflictResolutionPath; this._conflictResolutionProcedure = value.conflictResolutionProcedure; this._mode = value.mode; } } get conflictResolutionPath() { return this.getStringAttribute('conflict_resolution_path'); } set conflictResolutionPath(value) { this._conflictResolutionPath = value; } resetConflictResolutionPath() { this._conflictResolutionPath = undefined; } // Temporarily expose input value. Use with caution. get conflictResolutionPathInput() { return this._conflictResolutionPath; } get conflictResolutionProcedure() { return this.getStringAttribute('conflict_resolution_procedure'); } set conflictResolutionProcedure(value) { this._conflictResolutionProcedure = value; } resetConflictResolutionProcedure() { this._conflictResolutionProcedure = undefined; } // Temporarily expose input value. Use with caution. get conflictResolutionProcedureInput() { return this._conflictResolutionProcedure; } get mode() { return this.getStringAttribute('mode'); } set mode(value) { this._mode = value; } // Temporarily expose input value. Use with caution. get modeInput() { return this._mode; } } exports.CosmosdbGremlinGraphConflictResolutionPolicyOutputReference = CosmosdbGremlinGraphConflictResolutionPolicyOutputReference; _b = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphConflictResolutionPolicyOutputReference[_b] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphConflictResolutionPolicyOutputReference", version: "12.27.0" }; function cosmosdbGremlinGraphIndexPolicyCompositeIndexIndexToTerraform(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 { order: cdktf.stringToTerraform(struct.order), path: cdktf.stringToTerraform(struct.path), }; } exports.cosmosdbGremlinGraphIndexPolicyCompositeIndexIndexToTerraform = cosmosdbGremlinGraphIndexPolicyCompositeIndexIndexToTerraform; function cosmosdbGremlinGraphIndexPolicyCompositeIndexIndexToHclTerraform(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 = { order: { value: cdktf.stringToHclTerraform(struct.order), isBlock: false, type: "simple", storageClassType: "string", }, path: { value: cdktf.stringToHclTerraform(struct.path), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cosmosdbGremlinGraphIndexPolicyCompositeIndexIndexToHclTerraform = cosmosdbGremlinGraphIndexPolicyCompositeIndexIndexToHclTerraform; class CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexOutputReference 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._order !== undefined) { hasAnyValues = true; internalValueResult.order = this._order; } if (this._path !== undefined) { hasAnyValues = true; internalValueResult.path = this._path; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._order = undefined; this._path = 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._order = value.order; this._path = value.path; } } get order() { return this.getStringAttribute('order'); } set order(value) { this._order = value; } // Temporarily expose input value. Use with caution. get orderInput() { return this._order; } get path() { return this.getStringAttribute('path'); } set path(value) { this._path = value; } // Temporarily expose input value. Use with caution. get pathInput() { return this._path; } } exports.CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexOutputReference = CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexOutputReference; _c = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexOutputReference", version: "12.27.0" }; class CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexList 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 CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexList = CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexList; _d = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexList[_d] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexList", version: "12.27.0" }; function cosmosdbGremlinGraphIndexPolicyCompositeIndexToTerraform(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 { index: cdktf.listMapper(cosmosdbGremlinGraphIndexPolicyCompositeIndexIndexToTerraform, true)(struct.index), }; } exports.cosmosdbGremlinGraphIndexPolicyCompositeIndexToTerraform = cosmosdbGremlinGraphIndexPolicyCompositeIndexToTerraform; function cosmosdbGremlinGraphIndexPolicyCompositeIndexToHclTerraform(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 = { index: { value: cdktf.listMapperHcl(cosmosdbGremlinGraphIndexPolicyCompositeIndexIndexToHclTerraform, true)(struct.index), isBlock: true, type: "list", storageClassType: "CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cosmosdbGremlinGraphIndexPolicyCompositeIndexToHclTerraform = cosmosdbGremlinGraphIndexPolicyCompositeIndexToHclTerraform; class CosmosdbGremlinGraphIndexPolicyCompositeIndexOutputReference 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; // index - computed: false, optional: false, required: true this._index = new CosmosdbGremlinGraphIndexPolicyCompositeIndexIndexList(this, "index", false); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._index?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.index = this._index?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._index.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._index.internalValue = value.index; } } get index() { return this._index; } putIndex(value) { this._index.internalValue = value; } // Temporarily expose input value. Use with caution. get indexInput() { return this._index.internalValue; } } exports.CosmosdbGremlinGraphIndexPolicyCompositeIndexOutputReference = CosmosdbGremlinGraphIndexPolicyCompositeIndexOutputReference; _e = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphIndexPolicyCompositeIndexOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphIndexPolicyCompositeIndexOutputReference", version: "12.27.0" }; class CosmosdbGremlinGraphIndexPolicyCompositeIndexList 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 CosmosdbGremlinGraphIndexPolicyCompositeIndexOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.CosmosdbGremlinGraphIndexPolicyCompositeIndexList = CosmosdbGremlinGraphIndexPolicyCompositeIndexList; _f = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphIndexPolicyCompositeIndexList[_f] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphIndexPolicyCompositeIndexList", version: "12.27.0" }; function cosmosdbGremlinGraphIndexPolicySpatialIndexToTerraform(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 { path: cdktf.stringToTerraform(struct.path), }; } exports.cosmosdbGremlinGraphIndexPolicySpatialIndexToTerraform = cosmosdbGremlinGraphIndexPolicySpatialIndexToTerraform; function cosmosdbGremlinGraphIndexPolicySpatialIndexToHclTerraform(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 = { path: { value: cdktf.stringToHclTerraform(struct.path), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cosmosdbGremlinGraphIndexPolicySpatialIndexToHclTerraform = cosmosdbGremlinGraphIndexPolicySpatialIndexToHclTerraform; class CosmosdbGremlinGraphIndexPolicySpatialIndexOutputReference 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._path !== undefined) { hasAnyValues = true; internalValueResult.path = this._path; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._path = 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._path = value.path; } } get path() { return this.getStringAttribute('path'); } set path(value) { this._path = value; } // Temporarily expose input value. Use with caution. get pathInput() { return this._path; } // types - computed: true, optional: false, required: false get types() { return cdktf.Fn.tolist(this.getListAttribute('types')); } } exports.CosmosdbGremlinGraphIndexPolicySpatialIndexOutputReference = CosmosdbGremlinGraphIndexPolicySpatialIndexOutputReference; _g = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphIndexPolicySpatialIndexOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphIndexPolicySpatialIndexOutputReference", version: "12.27.0" }; class CosmosdbGremlinGraphIndexPolicySpatialIndexList 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 CosmosdbGremlinGraphIndexPolicySpatialIndexOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.CosmosdbGremlinGraphIndexPolicySpatialIndexList = CosmosdbGremlinGraphIndexPolicySpatialIndexList; _h = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphIndexPolicySpatialIndexList[_h] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphIndexPolicySpatialIndexList", version: "12.27.0" }; function cosmosdbGremlinGraphIndexPolicyToTerraform(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 { automatic: cdktf.booleanToTerraform(struct.automatic), excluded_paths: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.excludedPaths), included_paths: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.includedPaths), indexing_mode: cdktf.stringToTerraform(struct.indexingMode), composite_index: cdktf.listMapper(cosmosdbGremlinGraphIndexPolicyCompositeIndexToTerraform, true)(struct.compositeIndex), spatial_index: cdktf.listMapper(cosmosdbGremlinGraphIndexPolicySpatialIndexToTerraform, true)(struct.spatialIndex), }; } exports.cosmosdbGremlinGraphIndexPolicyToTerraform = cosmosdbGremlinGraphIndexPolicyToTerraform; function cosmosdbGremlinGraphIndexPolicyToHclTerraform(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 = { automatic: { value: cdktf.booleanToHclTerraform(struct.automatic), isBlock: false, type: "simple", storageClassType: "boolean", }, excluded_paths: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.excludedPaths), isBlock: false, type: "set", storageClassType: "stringList", }, included_paths: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.includedPaths), isBlock: false, type: "set", storageClassType: "stringList", }, indexing_mode: { value: cdktf.stringToHclTerraform(struct.indexingMode), isBlock: false, type: "simple", storageClassType: "string", }, composite_index: { value: cdktf.listMapperHcl(cosmosdbGremlinGraphIndexPolicyCompositeIndexToHclTerraform, true)(struct.compositeIndex), isBlock: true, type: "list", storageClassType: "CosmosdbGremlinGraphIndexPolicyCompositeIndexList", }, spatial_index: { value: cdktf.listMapperHcl(cosmosdbGremlinGraphIndexPolicySpatialIndexToHclTerraform, true)(struct.spatialIndex), isBlock: true, type: "list", storageClassType: "CosmosdbGremlinGraphIndexPolicySpatialIndexList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cosmosdbGremlinGraphIndexPolicyToHclTerraform = cosmosdbGremlinGraphIndexPolicyToHclTerraform; class CosmosdbGremlinGraphIndexPolicyOutputReference 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; // composite_index - computed: false, optional: true, required: false this._compositeIndex = new CosmosdbGremlinGraphIndexPolicyCompositeIndexList(this, "composite_index", false); // spatial_index - computed: false, optional: true, required: false this._spatialIndex = new CosmosdbGremlinGraphIndexPolicySpatialIndexList(this, "spatial_index", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._automatic !== undefined) { hasAnyValues = true; internalValueResult.automatic = this._automatic; } if (this._excludedPaths !== undefined) { hasAnyValues = true; internalValueResult.excludedPaths = this._excludedPaths; } if (this._includedPaths !== undefined) { hasAnyValues = true; internalValueResult.includedPaths = this._includedPaths; } if (this._indexingMode !== undefined) { hasAnyValues = true; internalValueResult.indexingMode = this._indexingMode; } if (this._compositeIndex?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.compositeIndex = this._compositeIndex?.internalValue; } if (this._spatialIndex?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.spatialIndex = this._spatialIndex?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._automatic = undefined; this._excludedPaths = undefined; this._includedPaths = undefined; this._indexingMode = undefined; this._compositeIndex.internalValue = undefined; this._spatialIndex.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._automatic = value.automatic; this._excludedPaths = value.excludedPaths; this._includedPaths = value.includedPaths; this._indexingMode = value.indexingMode; this._compositeIndex.internalValue = value.compositeIndex; this._spatialIndex.internalValue = value.spatialIndex; } } get automatic() { return this.getBooleanAttribute('automatic'); } set automatic(value) { this._automatic = value; } resetAutomatic() { this._automatic = undefined; } // Temporarily expose input value. Use with caution. get automaticInput() { return this._automatic; } get excludedPaths() { return cdktf.Fn.tolist(this.getListAttribute('excluded_paths')); } set excludedPaths(value) { this._excludedPaths = value; } resetExcludedPaths() { this._excludedPaths = undefined; } // Temporarily expose input value. Use with caution. get excludedPathsInput() { return this._excludedPaths; } get includedPaths() { return cdktf.Fn.tolist(this.getListAttribute('included_paths')); } set includedPaths(value) { this._includedPaths = value; } resetIncludedPaths() { this._includedPaths = undefined; } // Temporarily expose input value. Use with caution. get includedPathsInput() { return this._includedPaths; } get indexingMode() { return this.getStringAttribute('indexing_mode'); } set indexingMode(value) { this._indexingMode = value; } // Temporarily expose input value. Use with caution. get indexingModeInput() { return this._indexingMode; } get compositeIndex() { return this._compositeIndex; } putCompositeIndex(value) { this._compositeIndex.internalValue = value; } resetCompositeIndex() { this._compositeIndex.internalValue = undefined; } // Temporarily expose input value. Use with caution. get compositeIndexInput() { return this._compositeIndex.internalValue; } get spatialIndex() { return this._spatialIndex; } putSpatialIndex(value) { this._spatialIndex.internalValue = value; } resetSpatialIndex() { this._spatialIndex.internalValue = undefined; } // Temporarily expose input value. Use with caution. get spatialIndexInput() { return this._spatialIndex.internalValue; } } exports.CosmosdbGremlinGraphIndexPolicyOutputReference = CosmosdbGremlinGraphIndexPolicyOutputReference; _j = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphIndexPolicyOutputReference[_j] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphIndexPolicyOutputReference", version: "12.27.0" }; function cosmosdbGremlinGraphTimeoutsToTerraform(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), read: cdktf.stringToTerraform(struct.read), update: cdktf.stringToTerraform(struct.update), }; } exports.cosmosdbGremlinGraphTimeoutsToTerraform = cosmosdbGremlinGraphTimeoutsToTerraform; function cosmosdbGremlinGraphTimeoutsToHclTerraform(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", }, read: { value: cdktf.stringToHclTerraform(struct.read), 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.cosmosdbGremlinGraphTimeoutsToHclTerraform = cosmosdbGremlinGraphTimeoutsToHclTerraform; class CosmosdbGremlinGraphTimeoutsOutputReference 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._read !== undefined) { hasAnyValues = true; internalValueResult.read = this._read; } 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._read = 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._read = value.read; 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 read() { return this.getStringAttribute('read'); } set read(value) { this._read = value; } resetRead() { this._read = undefined; } // Temporarily expose input value. Use with caution. get readInput() { return this._read; } 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.CosmosdbGremlinGraphTimeoutsOutputReference = CosmosdbGremlinGraphTimeoutsOutputReference; _k = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphTimeoutsOutputReference[_k] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphTimeoutsOutputReference", version: "12.27.0" }; function cosmosdbGremlinGraphUniqueKeyToTerraform(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 { paths: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.paths), }; } exports.cosmosdbGremlinGraphUniqueKeyToTerraform = cosmosdbGremlinGraphUniqueKeyToTerraform; function cosmosdbGremlinGraphUniqueKeyToHclTerraform(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 = { paths: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.paths), isBlock: false, type: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.cosmosdbGremlinGraphUniqueKeyToHclTerraform = cosmosdbGremlinGraphUniqueKeyToHclTerraform; class CosmosdbGremlinGraphUniqueKeyOutputReference 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._paths !== undefined) { hasAnyValues = true; internalValueResult.paths = this._paths; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._paths = 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._paths = value.paths; } } get paths() { return cdktf.Fn.tolist(this.getListAttribute('paths')); } set paths(value) { this._paths = value; } // Temporarily expose input value. Use with caution. get pathsInput() { return this._paths; } } exports.CosmosdbGremlinGraphUniqueKeyOutputReference = CosmosdbGremlinGraphUniqueKeyOutputReference; _l = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphUniqueKeyOutputReference[_l] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphUniqueKeyOutputReference", version: "12.27.0" }; class CosmosdbGremlinGraphUniqueKeyList 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 CosmosdbGremlinGraphUniqueKeyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.CosmosdbGremlinGraphUniqueKeyList = CosmosdbGremlinGraphUniqueKeyList; _m = JSII_RTTI_SYMBOL_1; CosmosdbGremlinGraphUniqueKeyList[_m] = { fqn: "@cdktf/provider-azurerm.cosmosdbGremlinGraph.CosmosdbGremlinGraphUniqueKeyList", version: "12.27.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/cosmosdb_gremlin_graph azurerm_cosmosdb_gremlin_graph} */ class CosmosdbGremlinGraph extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a CosmosdbGremlinGraph 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 CosmosdbGremlinGraph to import * @param importFromId The id of the existing CosmosdbGremlinGraph that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/cosmosdb_gremlin_graph#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the CosmosdbGremlinGraph to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_cosmosdb_gremlin_graph", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/cosmosdb_gremlin_graph azurerm_cosmosdb_gremlin_graph} 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 CosmosdbGremlinGraphConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'azurerm_cosmosdb_gremlin_graph', terraformGeneratorMetadata: { providerName: 'azurerm', providerVersion: '3.116.0', providerVersionConstraint: '~> 3.10' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // autoscale_settings - computed: false, optional: true, required: false this._autoscaleSettings = new CosmosdbGremlinGraphAutoscaleSettingsOutputReference(this, "autoscale_settings"); // conflict_resolution_policy - computed: false, optional: true, required: false this._conflictResolutionPolicy = new CosmosdbGremlinGraphConflictResolutionPolicyOutputReference(this, "conflict_resolution_policy"); // index_policy - computed: false, optional: true, required: false this._indexPolicy = new CosmosdbGremlinGraphIndexPolicyOutputReference(this, "index_policy"); // timeouts - computed: false, optional: true, required: false this._timeouts = new CosmosdbGremlinGraphTimeoutsOutputReference(this, "timeouts"); // unique_key - computed: false, optional: true, required: false this._uniqueKey = new CosmosdbGremlinGraphUniqueKeyList(this, "unique_key", true); this._accountName = config.accountName; this._analyticalStorageTtl = config.analyticalStorageTtl; this._databaseName = config.databaseName; this._defaultTtl = config.defaultTtl; this._id = config.id; this._name = config.name; this._partitionKeyPath = config.partitionKeyPath; this._partitionKeyVersion = config.partitionKeyVersion; this._resourceGroupName = config.resourceGroupName; this._throughput = config.throughput; this._autoscaleSettings.internalValue = config.autoscaleSettings; this._conflictResolutionPolicy.internalValue = config.conflictResolutionPolicy; this._indexPolicy.internalValue = config.indexPolicy; this._timeouts.internalValue = config.timeouts; this._uniqueKey.internalValue = config.uniqueKey; } get accountName() { return this.getStringAttribute('account_name'); } set accountName(value) { this._accountName = value; } // Temporarily expose input value. Use with caution. get accountNameInput() { return this._accountName; } get analyticalStorageTtl() { return this.getNumberAttribute('analytical_storage_ttl'); } set analyticalStorageTtl(value) { this._analyticalStorageTtl = value; } resetAnalyticalStorageTtl() { this._analyticalStorageTtl = undefined; } // Temporarily expose