UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,254 lines (1,253 loc) 192 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; Object.defineProperty(exports, "__esModule", { value: true }); exports.FilestoreInstance = exports.FilestoreInstanceTimeoutsOutputReference = exports.filestoreInstanceTimeoutsToHclTerraform = exports.filestoreInstanceTimeoutsToTerraform = exports.FilestoreInstancePerformanceConfigOutputReference = exports.filestoreInstancePerformanceConfigToHclTerraform = exports.filestoreInstancePerformanceConfigToTerraform = exports.FilestoreInstancePerformanceConfigIopsPerTbOutputReference = exports.filestoreInstancePerformanceConfigIopsPerTbToHclTerraform = exports.filestoreInstancePerformanceConfigIopsPerTbToTerraform = exports.FilestoreInstancePerformanceConfigFixedIopsOutputReference = exports.filestoreInstancePerformanceConfigFixedIopsToHclTerraform = exports.filestoreInstancePerformanceConfigFixedIopsToTerraform = exports.FilestoreInstanceNetworksList = exports.FilestoreInstanceNetworksOutputReference = exports.filestoreInstanceNetworksToHclTerraform = exports.filestoreInstanceNetworksToTerraform = exports.FilestoreInstanceFileSharesOutputReference = exports.filestoreInstanceFileSharesToHclTerraform = exports.filestoreInstanceFileSharesToTerraform = exports.FilestoreInstanceFileSharesNfsExportOptionsList = exports.FilestoreInstanceFileSharesNfsExportOptionsOutputReference = exports.filestoreInstanceFileSharesNfsExportOptionsToHclTerraform = exports.filestoreInstanceFileSharesNfsExportOptionsToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function filestoreInstanceFileSharesNfsExportOptionsToTerraform(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 { access_mode: cdktf.stringToTerraform(struct.accessMode), anon_gid: cdktf.numberToTerraform(struct.anonGid), anon_uid: cdktf.numberToTerraform(struct.anonUid), ip_ranges: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.ipRanges), squash_mode: cdktf.stringToTerraform(struct.squashMode), }; } exports.filestoreInstanceFileSharesNfsExportOptionsToTerraform = filestoreInstanceFileSharesNfsExportOptionsToTerraform; function filestoreInstanceFileSharesNfsExportOptionsToHclTerraform(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 = { access_mode: { value: cdktf.stringToHclTerraform(struct.accessMode), isBlock: false, type: "simple", storageClassType: "string", }, anon_gid: { value: cdktf.numberToHclTerraform(struct.anonGid), isBlock: false, type: "simple", storageClassType: "number", }, anon_uid: { value: cdktf.numberToHclTerraform(struct.anonUid), isBlock: false, type: "simple", storageClassType: "number", }, ip_ranges: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.ipRanges), isBlock: false, type: "list", storageClassType: "stringList", }, squash_mode: { value: cdktf.stringToHclTerraform(struct.squashMode), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.filestoreInstanceFileSharesNfsExportOptionsToHclTerraform = filestoreInstanceFileSharesNfsExportOptionsToHclTerraform; class FilestoreInstanceFileSharesNfsExportOptionsOutputReference 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._accessMode !== undefined) { hasAnyValues = true; internalValueResult.accessMode = this._accessMode; } if (this._anonGid !== undefined) { hasAnyValues = true; internalValueResult.anonGid = this._anonGid; } if (this._anonUid !== undefined) { hasAnyValues = true; internalValueResult.anonUid = this._anonUid; } if (this._ipRanges !== undefined) { hasAnyValues = true; internalValueResult.ipRanges = this._ipRanges; } if (this._squashMode !== undefined) { hasAnyValues = true; internalValueResult.squashMode = this._squashMode; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._accessMode = undefined; this._anonGid = undefined; this._anonUid = undefined; this._ipRanges = undefined; this._squashMode = 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._accessMode = value.accessMode; this._anonGid = value.anonGid; this._anonUid = value.anonUid; this._ipRanges = value.ipRanges; this._squashMode = value.squashMode; } } get accessMode() { return this.getStringAttribute('access_mode'); } set accessMode(value) { this._accessMode = value; } resetAccessMode() { this._accessMode = undefined; } // Temporarily expose input value. Use with caution. get accessModeInput() { return this._accessMode; } get anonGid() { return this.getNumberAttribute('anon_gid'); } set anonGid(value) { this._anonGid = value; } resetAnonGid() { this._anonGid = undefined; } // Temporarily expose input value. Use with caution. get anonGidInput() { return this._anonGid; } get anonUid() { return this.getNumberAttribute('anon_uid'); } set anonUid(value) { this._anonUid = value; } resetAnonUid() { this._anonUid = undefined; } // Temporarily expose input value. Use with caution. get anonUidInput() { return this._anonUid; } get ipRanges() { return this.getListAttribute('ip_ranges'); } set ipRanges(value) { this._ipRanges = value; } resetIpRanges() { this._ipRanges = undefined; } // Temporarily expose input value. Use with caution. get ipRangesInput() { return this._ipRanges; } get squashMode() { return this.getStringAttribute('squash_mode'); } set squashMode(value) { this._squashMode = value; } resetSquashMode() { this._squashMode = undefined; } // Temporarily expose input value. Use with caution. get squashModeInput() { return this._squashMode; } } exports.FilestoreInstanceFileSharesNfsExportOptionsOutputReference = FilestoreInstanceFileSharesNfsExportOptionsOutputReference; _a = JSII_RTTI_SYMBOL_1; FilestoreInstanceFileSharesNfsExportOptionsOutputReference[_a] = { fqn: "@cdktf/provider-google.filestoreInstance.FilestoreInstanceFileSharesNfsExportOptionsOutputReference", version: "14.12.0" }; class FilestoreInstanceFileSharesNfsExportOptionsList 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 FilestoreInstanceFileSharesNfsExportOptionsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.FilestoreInstanceFileSharesNfsExportOptionsList = FilestoreInstanceFileSharesNfsExportOptionsList; _b = JSII_RTTI_SYMBOL_1; FilestoreInstanceFileSharesNfsExportOptionsList[_b] = { fqn: "@cdktf/provider-google.filestoreInstance.FilestoreInstanceFileSharesNfsExportOptionsList", version: "14.12.0" }; function filestoreInstanceFileSharesToTerraform(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 { capacity_gb: cdktf.numberToTerraform(struct.capacityGb), name: cdktf.stringToTerraform(struct.name), source_backup: cdktf.stringToTerraform(struct.sourceBackup), nfs_export_options: cdktf.listMapper(filestoreInstanceFileSharesNfsExportOptionsToTerraform, true)(struct.nfsExportOptions), }; } exports.filestoreInstanceFileSharesToTerraform = filestoreInstanceFileSharesToTerraform; function filestoreInstanceFileSharesToHclTerraform(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 = { capacity_gb: { value: cdktf.numberToHclTerraform(struct.capacityGb), isBlock: false, type: "simple", storageClassType: "number", }, name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, source_backup: { value: cdktf.stringToHclTerraform(struct.sourceBackup), isBlock: false, type: "simple", storageClassType: "string", }, nfs_export_options: { value: cdktf.listMapperHcl(filestoreInstanceFileSharesNfsExportOptionsToHclTerraform, true)(struct.nfsExportOptions), isBlock: true, type: "list", storageClassType: "FilestoreInstanceFileSharesNfsExportOptionsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.filestoreInstanceFileSharesToHclTerraform = filestoreInstanceFileSharesToHclTerraform; class FilestoreInstanceFileSharesOutputReference 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; // nfs_export_options - computed: false, optional: true, required: false this._nfsExportOptions = new FilestoreInstanceFileSharesNfsExportOptionsList(this, "nfs_export_options", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._capacityGb !== undefined) { hasAnyValues = true; internalValueResult.capacityGb = this._capacityGb; } if (this._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._sourceBackup !== undefined) { hasAnyValues = true; internalValueResult.sourceBackup = this._sourceBackup; } if (this._nfsExportOptions?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.nfsExportOptions = this._nfsExportOptions?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._capacityGb = undefined; this._name = undefined; this._sourceBackup = undefined; this._nfsExportOptions.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._capacityGb = value.capacityGb; this._name = value.name; this._sourceBackup = value.sourceBackup; this._nfsExportOptions.internalValue = value.nfsExportOptions; } } get capacityGb() { return this.getNumberAttribute('capacity_gb'); } set capacityGb(value) { this._capacityGb = value; } // Temporarily expose input value. Use with caution. get capacityGbInput() { return this._capacityGb; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get sourceBackup() { return this.getStringAttribute('source_backup'); } set sourceBackup(value) { this._sourceBackup = value; } resetSourceBackup() { this._sourceBackup = undefined; } // Temporarily expose input value. Use with caution. get sourceBackupInput() { return this._sourceBackup; } get nfsExportOptions() { return this._nfsExportOptions; } putNfsExportOptions(value) { this._nfsExportOptions.internalValue = value; } resetNfsExportOptions() { this._nfsExportOptions.internalValue = undefined; } // Temporarily expose input value. Use with caution. get nfsExportOptionsInput() { return this._nfsExportOptions.internalValue; } } exports.FilestoreInstanceFileSharesOutputReference = FilestoreInstanceFileSharesOutputReference; _c = JSII_RTTI_SYMBOL_1; FilestoreInstanceFileSharesOutputReference[_c] = { fqn: "@cdktf/provider-google.filestoreInstance.FilestoreInstanceFileSharesOutputReference", version: "14.12.0" }; function filestoreInstanceNetworksToTerraform(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 { connect_mode: cdktf.stringToTerraform(struct.connectMode), modes: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.modes), network: cdktf.stringToTerraform(struct.network), reserved_ip_range: cdktf.stringToTerraform(struct.reservedIpRange), }; } exports.filestoreInstanceNetworksToTerraform = filestoreInstanceNetworksToTerraform; function filestoreInstanceNetworksToHclTerraform(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 = { connect_mode: { value: cdktf.stringToHclTerraform(struct.connectMode), isBlock: false, type: "simple", storageClassType: "string", }, modes: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.modes), isBlock: false, type: "list", storageClassType: "stringList", }, network: { value: cdktf.stringToHclTerraform(struct.network), isBlock: false, type: "simple", storageClassType: "string", }, reserved_ip_range: { value: cdktf.stringToHclTerraform(struct.reservedIpRange), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.filestoreInstanceNetworksToHclTerraform = filestoreInstanceNetworksToHclTerraform; class FilestoreInstanceNetworksOutputReference 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._connectMode !== undefined) { hasAnyValues = true; internalValueResult.connectMode = this._connectMode; } if (this._modes !== undefined) { hasAnyValues = true; internalValueResult.modes = this._modes; } if (this._network !== undefined) { hasAnyValues = true; internalValueResult.network = this._network; } if (this._reservedIpRange !== undefined) { hasAnyValues = true; internalValueResult.reservedIpRange = this._reservedIpRange; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._connectMode = undefined; this._modes = undefined; this._network = undefined; this._reservedIpRange = 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._connectMode = value.connectMode; this._modes = value.modes; this._network = value.network; this._reservedIpRange = value.reservedIpRange; } } get connectMode() { return this.getStringAttribute('connect_mode'); } set connectMode(value) { this._connectMode = value; } resetConnectMode() { this._connectMode = undefined; } // Temporarily expose input value. Use with caution. get connectModeInput() { return this._connectMode; } // ip_addresses - computed: true, optional: false, required: false get ipAddresses() { return this.getListAttribute('ip_addresses'); } get modes() { return this.getListAttribute('modes'); } set modes(value) { this._modes = value; } // Temporarily expose input value. Use with caution. get modesInput() { return this._modes; } get network() { return this.getStringAttribute('network'); } set network(value) { this._network = value; } // Temporarily expose input value. Use with caution. get networkInput() { return this._network; } get reservedIpRange() { return this.getStringAttribute('reserved_ip_range'); } set reservedIpRange(value) { this._reservedIpRange = value; } resetReservedIpRange() { this._reservedIpRange = undefined; } // Temporarily expose input value. Use with caution. get reservedIpRangeInput() { return this._reservedIpRange; } } exports.FilestoreInstanceNetworksOutputReference = FilestoreInstanceNetworksOutputReference; _d = JSII_RTTI_SYMBOL_1; FilestoreInstanceNetworksOutputReference[_d] = { fqn: "@cdktf/provider-google.filestoreInstance.FilestoreInstanceNetworksOutputReference", version: "14.12.0" }; class FilestoreInstanceNetworksList 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 FilestoreInstanceNetworksOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.FilestoreInstanceNetworksList = FilestoreInstanceNetworksList; _e = JSII_RTTI_SYMBOL_1; FilestoreInstanceNetworksList[_e] = { fqn: "@cdktf/provider-google.filestoreInstance.FilestoreInstanceNetworksList", version: "14.12.0" }; function filestoreInstancePerformanceConfigFixedIopsToTerraform(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_iops: cdktf.numberToTerraform(struct.maxIops), }; } exports.filestoreInstancePerformanceConfigFixedIopsToTerraform = filestoreInstancePerformanceConfigFixedIopsToTerraform; function filestoreInstancePerformanceConfigFixedIopsToHclTerraform(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_iops: { value: cdktf.numberToHclTerraform(struct.maxIops), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.filestoreInstancePerformanceConfigFixedIopsToHclTerraform = filestoreInstancePerformanceConfigFixedIopsToHclTerraform; class FilestoreInstancePerformanceConfigFixedIopsOutputReference 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._maxIops !== undefined) { hasAnyValues = true; internalValueResult.maxIops = this._maxIops; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._maxIops = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._maxIops = value.maxIops; } } get maxIops() { return this.getNumberAttribute('max_iops'); } set maxIops(value) { this._maxIops = value; } resetMaxIops() { this._maxIops = undefined; } // Temporarily expose input value. Use with caution. get maxIopsInput() { return this._maxIops; } } exports.FilestoreInstancePerformanceConfigFixedIopsOutputReference = FilestoreInstancePerformanceConfigFixedIopsOutputReference; _f = JSII_RTTI_SYMBOL_1; FilestoreInstancePerformanceConfigFixedIopsOutputReference[_f] = { fqn: "@cdktf/provider-google.filestoreInstance.FilestoreInstancePerformanceConfigFixedIopsOutputReference", version: "14.12.0" }; function filestoreInstancePerformanceConfigIopsPerTbToTerraform(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_iops_per_tb: cdktf.numberToTerraform(struct.maxIopsPerTb), }; } exports.filestoreInstancePerformanceConfigIopsPerTbToTerraform = filestoreInstancePerformanceConfigIopsPerTbToTerraform; function filestoreInstancePerformanceConfigIopsPerTbToHclTerraform(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_iops_per_tb: { value: cdktf.numberToHclTerraform(struct.maxIopsPerTb), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.filestoreInstancePerformanceConfigIopsPerTbToHclTerraform = filestoreInstancePerformanceConfigIopsPerTbToHclTerraform; class FilestoreInstancePerformanceConfigIopsPerTbOutputReference 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._maxIopsPerTb !== undefined) { hasAnyValues = true; internalValueResult.maxIopsPerTb = this._maxIopsPerTb; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._maxIopsPerTb = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._maxIopsPerTb = value.maxIopsPerTb; } } get maxIopsPerTb() { return this.getNumberAttribute('max_iops_per_tb'); } set maxIopsPerTb(value) { this._maxIopsPerTb = value; } resetMaxIopsPerTb() { this._maxIopsPerTb = undefined; } // Temporarily expose input value. Use with caution. get maxIopsPerTbInput() { return this._maxIopsPerTb; } } exports.FilestoreInstancePerformanceConfigIopsPerTbOutputReference = FilestoreInstancePerformanceConfigIopsPerTbOutputReference; _g = JSII_RTTI_SYMBOL_1; FilestoreInstancePerformanceConfigIopsPerTbOutputReference[_g] = { fqn: "@cdktf/provider-google.filestoreInstance.FilestoreInstancePerformanceConfigIopsPerTbOutputReference", version: "14.12.0" }; function filestoreInstancePerformanceConfigToTerraform(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 { fixed_iops: filestoreInstancePerformanceConfigFixedIopsToTerraform(struct.fixedIops), iops_per_tb: filestoreInstancePerformanceConfigIopsPerTbToTerraform(struct.iopsPerTb), }; } exports.filestoreInstancePerformanceConfigToTerraform = filestoreInstancePerformanceConfigToTerraform; function filestoreInstancePerformanceConfigToHclTerraform(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 = { fixed_iops: { value: filestoreInstancePerformanceConfigFixedIopsToHclTerraform(struct.fixedIops), isBlock: true, type: "list", storageClassType: "FilestoreInstancePerformanceConfigFixedIopsList", }, iops_per_tb: { value: filestoreInstancePerformanceConfigIopsPerTbToHclTerraform(struct.iopsPerTb), isBlock: true, type: "list", storageClassType: "FilestoreInstancePerformanceConfigIopsPerTbList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.filestoreInstancePerformanceConfigToHclTerraform = filestoreInstancePerformanceConfigToHclTerraform; class FilestoreInstancePerformanceConfigOutputReference 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; // fixed_iops - computed: false, optional: true, required: false this._fixedIops = new FilestoreInstancePerformanceConfigFixedIopsOutputReference(this, "fixed_iops"); // iops_per_tb - computed: false, optional: true, required: false this._iopsPerTb = new FilestoreInstancePerformanceConfigIopsPerTbOutputReference(this, "iops_per_tb"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._fixedIops?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.fixedIops = this._fixedIops?.internalValue; } if (this._iopsPerTb?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.iopsPerTb = this._iopsPerTb?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._fixedIops.internalValue = undefined; this._iopsPerTb.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._fixedIops.internalValue = value.fixedIops; this._iopsPerTb.internalValue = value.iopsPerTb; } } get fixedIops() { return this._fixedIops; } putFixedIops(value) { this._fixedIops.internalValue = value; } resetFixedIops() { this._fixedIops.internalValue = undefined; } // Temporarily expose input value. Use with caution. get fixedIopsInput() { return this._fixedIops.internalValue; } get iopsPerTb() { return this._iopsPerTb; } putIopsPerTb(value) { this._iopsPerTb.internalValue = value; } resetIopsPerTb() { this._iopsPerTb.internalValue = undefined; } // Temporarily expose input value. Use with caution. get iopsPerTbInput() { return this._iopsPerTb.internalValue; } } exports.FilestoreInstancePerformanceConfigOutputReference = FilestoreInstancePerformanceConfigOutputReference; _h = JSII_RTTI_SYMBOL_1; FilestoreInstancePerformanceConfigOutputReference[_h] = { fqn: "@cdktf/provider-google.filestoreInstance.FilestoreInstancePerformanceConfigOutputReference", version: "14.12.0" }; function filestoreInstanceTimeoutsToTerraform(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.filestoreInstanceTimeoutsToTerraform = filestoreInstanceTimeoutsToTerraform; function filestoreInstanceTimeoutsToHclTerraform(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.filestoreInstanceTimeoutsToHclTerraform = filestoreInstanceTimeoutsToHclTerraform; class FilestoreInstanceTimeoutsOutputReference 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.FilestoreInstanceTimeoutsOutputReference = FilestoreInstanceTimeoutsOutputReference; _j = JSII_RTTI_SYMBOL_1; FilestoreInstanceTimeoutsOutputReference[_j] = { fqn: "@cdktf/provider-google.filestoreInstance.FilestoreInstanceTimeoutsOutputReference", version: "14.12.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/filestore_instance google_filestore_instance} */ class FilestoreInstance extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a FilestoreInstance 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 FilestoreInstance to import * @param importFromId The id of the existing FilestoreInstance that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/filestore_instance#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the FilestoreInstance to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_filestore_instance", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/filestore_instance google_filestore_instance} 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 FilestoreInstanceConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_filestore_instance', 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 }); // effective_labels - computed: true, optional: false, required: false this._effectiveLabels = new cdktf.StringMap(this, "effective_labels"); // terraform_labels - computed: true, optional: false, required: false this._terraformLabels = new cdktf.StringMap(this, "terraform_labels"); // file_shares - computed: false, optional: false, required: true this._fileShares = new FilestoreInstanceFileSharesOutputReference(this, "file_shares"); // networks - computed: false, optional: false, required: true this._networks = new FilestoreInstanceNetworksList(this, "networks", false); // performance_config - computed: false, optional: true, required: false this._performanceConfig = new FilestoreInstancePerformanceConfigOutputReference(this, "performance_config"); // timeouts - computed: false, optional: true, required: false this._timeouts = new FilestoreInstanceTimeoutsOutputReference(this, "timeouts"); this._deletionProtectionEnabled = config.deletionProtectionEnabled; this._deletionProtectionReason = config.deletionProtectionReason; this._description = config.description; this._id = config.id; this._kmsKeyName = config.kmsKeyName; this._labels = config.labels; this._location = config.location; this._name = config.name; this._project = config.project; this._protocol = config.protocol; this._tier = config.tier; this._zone = config.zone; this._fileShares.internalValue = config.fileShares; this._networks.internalValue = config.networks; this._performanceConfig.internalValue = config.performanceConfig; this._timeouts.internalValue = config.timeouts; } // ========== // ATTRIBUTES // ========== // create_time - computed: true, optional: false, required: false get createTime() { return this.getStringAttribute('create_time'); } get deletionProtectionEnabled() { return this.getBooleanAttribute('deletion_protection_enabled'); } set deletionProtectionEnabled(value) { this._deletionProtectionEnabled = value; } resetDeletionProtectionEnabled() { this._deletionProtectionEnabled = undefined; } // Temporarily expose input value. Use with caution. get deletionProtectionEnabledInput() { return this._deletionProtectionEnabled; } get deletionProtectionReason() { return this.getStringAttribute('deletion_protection_reason'); } set deletionProtectionReason(value) { this._deletionProtectionReason = value; } resetDeletionProtectionReason() { this._deletionProtectionReason = undefined; } // Temporarily expose input value. Use with caution. get deletionProtectionReasonInput() { return this._deletionProtectionReason; } 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 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 kmsKeyName() { return this.getStringAttribute('kms_key_name'); } set kmsKeyName(value) { this._kmsKeyName = value; } resetKmsKeyName() { this._kmsKeyName = undefined; } // Temporarily expose input value. Use with caution. get kmsKeyNameInput() { return this._kmsKeyName; } 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; } get location() { return this.getStringAttribute('location'); } set location(value) { this._location = value; } resetLocation() { this._location = undefined; } // Temporarily expose input value. Use with caution. get locationInput() { return this._location; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._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 protocol() { return this.getStringAttribute('protocol'); } set protocol(value) { this._protocol = value; } resetProtocol() { this._protocol = undefined; } // Temporarily expose input value. Use with caution. get protocolInput() { return this._protocol; } get terraformLabels() { return this._terraformLabels; } get tier() { return this.getStringAttribute('tier'); } set tier(value) { this._tier = value; } // Temporarily expose input value. Use with caution. get tierInput() { return this._tier; } get zone() { return this.getStringAttribute('zone'); } set zone(value) { this._zone = value; } resetZone() { this._zone = undefined; } // Temporarily expose input value. Use with caution. get zoneInput() { return this._zone; } get fileShares() { return this._fileShares; } putFileShares(value) { this._fileShares.internalValue = value; } // Temporarily expose input value. Use with caution. get fileSharesInput() { return this._fileShares.internalValue; } get networks() { return this._networks; } putNetworks(value) { this._networks.internalValue = value; } // Temporarily expose input value. Use with caution. get networksInput() { return this._networks.internalValue; } get performanceConfig() { return this._performanceConfig; } putPerformanceConfig(value) { this._performanceConfig.internalValue = value; } resetPerformanceConfig() { this._performanceConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get performanceConfigInput() { return this._performanceConfig.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 { deletion_protection_enabled: cdktf.booleanToTerraform(this._deletionProtectionEnabled), deletion_protection_reason: cdktf.stringToTerraform(this._deletionProtectionReason), description: cdktf.stringToTerraform(this._description), id: cdktf.stringToTerraform(this._id), kms_key_name: cdktf.stringToTerraform(this._kmsKeyName), labels: cdktf.hashMapper(cdktf.stringToTerraform)(this._labels), location: cdktf.stringToTerraform(this._location), name: cdktf.stringToTerraform(this._name), project: cdktf.stringToTerraform(this._project), protocol: cdktf.stringToTerraform(this._protocol), tier: cdktf.stringToTerraform(this._tier), zone: cdktf.stringToTerraform(this._zone), file_shares: filestoreInstanceFileSharesToTerraform(this._fileShares.internalValue), networks: cdktf.listMapper(filestoreInstanceNetworksToTerraform, true)(this._networks.internalValue),