UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,001 lines (1,000 loc) 514 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y; Object.defineProperty(exports, "__esModule", { value: true }); exports.DatabaseMigrationServiceConnectionProfileOracleStaticServiceIpConnectivityOutputReference = exports.databaseMigrationServiceConnectionProfileOracleStaticServiceIpConnectivityToHclTerraform = exports.databaseMigrationServiceConnectionProfileOracleStaticServiceIpConnectivityToTerraform = exports.DatabaseMigrationServiceConnectionProfileOracleSslOutputReference = exports.databaseMigrationServiceConnectionProfileOracleSslToHclTerraform = exports.databaseMigrationServiceConnectionProfileOracleSslToTerraform = exports.DatabaseMigrationServiceConnectionProfileOraclePrivateConnectivityOutputReference = exports.databaseMigrationServiceConnectionProfileOraclePrivateConnectivityToHclTerraform = exports.databaseMigrationServiceConnectionProfileOraclePrivateConnectivityToTerraform = exports.DatabaseMigrationServiceConnectionProfileOracleForwardSshConnectivityOutputReference = exports.databaseMigrationServiceConnectionProfileOracleForwardSshConnectivityToHclTerraform = exports.databaseMigrationServiceConnectionProfileOracleForwardSshConnectivityToTerraform = exports.DatabaseMigrationServiceConnectionProfileMysqlOutputReference = exports.databaseMigrationServiceConnectionProfileMysqlToHclTerraform = exports.databaseMigrationServiceConnectionProfileMysqlToTerraform = exports.DatabaseMigrationServiceConnectionProfileMysqlSslOutputReference = exports.databaseMigrationServiceConnectionProfileMysqlSslToHclTerraform = exports.databaseMigrationServiceConnectionProfileMysqlSslToTerraform = exports.DatabaseMigrationServiceConnectionProfileCloudsqlOutputReference = exports.databaseMigrationServiceConnectionProfileCloudsqlToHclTerraform = exports.databaseMigrationServiceConnectionProfileCloudsqlToTerraform = exports.DatabaseMigrationServiceConnectionProfileCloudsqlSettingsOutputReference = exports.databaseMigrationServiceConnectionProfileCloudsqlSettingsToHclTerraform = exports.databaseMigrationServiceConnectionProfileCloudsqlSettingsToTerraform = exports.DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigOutputReference = exports.databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigToHclTerraform = exports.databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigToTerraform = exports.DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksList = exports.DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksOutputReference = exports.databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksToHclTerraform = exports.databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksToTerraform = exports.DatabaseMigrationServiceConnectionProfileAlloydbOutputReference = exports.databaseMigrationServiceConnectionProfileAlloydbToHclTerraform = exports.databaseMigrationServiceConnectionProfileAlloydbToTerraform = exports.DatabaseMigrationServiceConnectionProfileAlloydbSettingsOutputReference = exports.databaseMigrationServiceConnectionProfileAlloydbSettingsToHclTerraform = exports.databaseMigrationServiceConnectionProfileAlloydbSettingsToTerraform = exports.DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsOutputReference = exports.databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsToHclTerraform = exports.databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsToTerraform = exports.DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigOutputReference = exports.databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigToHclTerraform = exports.databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigToTerraform = exports.DatabaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserOutputReference = exports.databaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserToHclTerraform = exports.databaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserToTerraform = exports.DatabaseMigrationServiceConnectionProfileErrorList = exports.DatabaseMigrationServiceConnectionProfileErrorOutputReference = exports.databaseMigrationServiceConnectionProfileErrorToHclTerraform = exports.databaseMigrationServiceConnectionProfileErrorToTerraform = void 0; exports.DatabaseMigrationServiceConnectionProfile = exports.DatabaseMigrationServiceConnectionProfileTimeoutsOutputReference = exports.databaseMigrationServiceConnectionProfileTimeoutsToHclTerraform = exports.databaseMigrationServiceConnectionProfileTimeoutsToTerraform = exports.DatabaseMigrationServiceConnectionProfilePostgresqlOutputReference = exports.databaseMigrationServiceConnectionProfilePostgresqlToHclTerraform = exports.databaseMigrationServiceConnectionProfilePostgresqlToTerraform = exports.DatabaseMigrationServiceConnectionProfilePostgresqlSslOutputReference = exports.databaseMigrationServiceConnectionProfilePostgresqlSslToHclTerraform = exports.databaseMigrationServiceConnectionProfilePostgresqlSslToTerraform = exports.DatabaseMigrationServiceConnectionProfileOracleOutputReference = exports.databaseMigrationServiceConnectionProfileOracleToHclTerraform = exports.databaseMigrationServiceConnectionProfileOracleToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function databaseMigrationServiceConnectionProfileErrorToTerraform(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.databaseMigrationServiceConnectionProfileErrorToTerraform = databaseMigrationServiceConnectionProfileErrorToTerraform; function databaseMigrationServiceConnectionProfileErrorToHclTerraform(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.databaseMigrationServiceConnectionProfileErrorToHclTerraform = databaseMigrationServiceConnectionProfileErrorToHclTerraform; class DatabaseMigrationServiceConnectionProfileErrorOutputReference 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; // details - computed: true, optional: false, required: false this._details = new cdktf.StringMapList(this, "details", 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; } } // code - computed: true, optional: false, required: false get code() { return this.getNumberAttribute('code'); } get details() { return this._details; } // message - computed: true, optional: false, required: false get message() { return this.getStringAttribute('message'); } } exports.DatabaseMigrationServiceConnectionProfileErrorOutputReference = DatabaseMigrationServiceConnectionProfileErrorOutputReference; _a = JSII_RTTI_SYMBOL_1; DatabaseMigrationServiceConnectionProfileErrorOutputReference[_a] = { fqn: "@cdktf/provider-google.databaseMigrationServiceConnectionProfile.DatabaseMigrationServiceConnectionProfileErrorOutputReference", version: "14.12.0" }; class DatabaseMigrationServiceConnectionProfileErrorList 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 DatabaseMigrationServiceConnectionProfileErrorOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.DatabaseMigrationServiceConnectionProfileErrorList = DatabaseMigrationServiceConnectionProfileErrorList; _b = JSII_RTTI_SYMBOL_1; DatabaseMigrationServiceConnectionProfileErrorList[_b] = { fqn: "@cdktf/provider-google.databaseMigrationServiceConnectionProfile.DatabaseMigrationServiceConnectionProfileErrorList", version: "14.12.0" }; function databaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserToTerraform(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 { password: cdktf.stringToTerraform(struct.password), user: cdktf.stringToTerraform(struct.user), }; } exports.databaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserToTerraform = databaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserToTerraform; function databaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserToHclTerraform(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 = { password: { value: cdktf.stringToHclTerraform(struct.password), isBlock: false, type: "simple", storageClassType: "string", }, user: { value: cdktf.stringToHclTerraform(struct.user), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.databaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserToHclTerraform = databaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserToHclTerraform; class DatabaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserOutputReference 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._password !== undefined) { hasAnyValues = true; internalValueResult.password = this._password; } if (this._user !== undefined) { hasAnyValues = true; internalValueResult.user = this._user; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._password = undefined; this._user = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._password = value.password; this._user = value.user; } } get password() { return this.getStringAttribute('password'); } set password(value) { this._password = value; } // Temporarily expose input value. Use with caution. get passwordInput() { return this._password; } // password_set - computed: true, optional: false, required: false get passwordSet() { return this.getBooleanAttribute('password_set'); } get user() { return this.getStringAttribute('user'); } set user(value) { this._user = value; } // Temporarily expose input value. Use with caution. get userInput() { return this._user; } } exports.DatabaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserOutputReference = DatabaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserOutputReference; _c = JSII_RTTI_SYMBOL_1; DatabaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserOutputReference[_c] = { fqn: "@cdktf/provider-google.databaseMigrationServiceConnectionProfile.DatabaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserOutputReference", version: "14.12.0" }; function databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigToTerraform(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 { cpu_count: cdktf.numberToTerraform(struct.cpuCount), }; } exports.databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigToTerraform = databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigToTerraform; function databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigToHclTerraform(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 = { cpu_count: { value: cdktf.numberToHclTerraform(struct.cpuCount), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigToHclTerraform = databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigToHclTerraform; class DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigOutputReference 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._cpuCount !== undefined) { hasAnyValues = true; internalValueResult.cpuCount = this._cpuCount; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._cpuCount = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._cpuCount = value.cpuCount; } } get cpuCount() { return this.getNumberAttribute('cpu_count'); } set cpuCount(value) { this._cpuCount = value; } // Temporarily expose input value. Use with caution. get cpuCountInput() { return this._cpuCount; } } exports.DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigOutputReference = DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigOutputReference; _d = JSII_RTTI_SYMBOL_1; DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigOutputReference[_d] = { fqn: "@cdktf/provider-google.databaseMigrationServiceConnectionProfile.DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigOutputReference", version: "14.12.0" }; function databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsToTerraform(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 { database_flags: cdktf.hashMapper(cdktf.stringToTerraform)(struct.databaseFlags), id: cdktf.stringToTerraform(struct.id), labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.labels), machine_config: databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigToTerraform(struct.machineConfig), }; } exports.databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsToTerraform = databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsToTerraform; function databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsToHclTerraform(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 = { database_flags: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.databaseFlags), isBlock: false, type: "map", storageClassType: "stringMap", }, id: { value: cdktf.stringToHclTerraform(struct.id), isBlock: false, type: "simple", storageClassType: "string", }, labels: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.labels), isBlock: false, type: "map", storageClassType: "stringMap", }, machine_config: { value: databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigToHclTerraform(struct.machineConfig), isBlock: true, type: "list", storageClassType: "DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsToHclTerraform = databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsToHclTerraform; class DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsOutputReference 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; // machine_config - computed: false, optional: false, required: true this._machineConfig = new DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsMachineConfigOutputReference(this, "machine_config"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._databaseFlags !== undefined) { hasAnyValues = true; internalValueResult.databaseFlags = this._databaseFlags; } if (this._id !== undefined) { hasAnyValues = true; internalValueResult.id = this._id; } if (this._labels !== undefined) { hasAnyValues = true; internalValueResult.labels = this._labels; } if (this._machineConfig?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.machineConfig = this._machineConfig?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._databaseFlags = undefined; this._id = undefined; this._labels = undefined; this._machineConfig.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._databaseFlags = value.databaseFlags; this._id = value.id; this._labels = value.labels; this._machineConfig.internalValue = value.machineConfig; } } get databaseFlags() { return this.getStringMapAttribute('database_flags'); } set databaseFlags(value) { this._databaseFlags = value; } resetDatabaseFlags() { this._databaseFlags = undefined; } // Temporarily expose input value. Use with caution. get databaseFlagsInput() { return this._databaseFlags; } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } 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; } // private_ip - computed: true, optional: false, required: false get privateIp() { return this.getStringAttribute('private_ip'); } get machineConfig() { return this._machineConfig; } putMachineConfig(value) { this._machineConfig.internalValue = value; } // Temporarily expose input value. Use with caution. get machineConfigInput() { return this._machineConfig.internalValue; } } exports.DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsOutputReference = DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsOutputReference; _e = JSII_RTTI_SYMBOL_1; DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsOutputReference[_e] = { fqn: "@cdktf/provider-google.databaseMigrationServiceConnectionProfile.DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsOutputReference", version: "14.12.0" }; function databaseMigrationServiceConnectionProfileAlloydbSettingsToTerraform(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 { labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.labels), vpc_network: cdktf.stringToTerraform(struct.vpcNetwork), initial_user: databaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserToTerraform(struct.initialUser), primary_instance_settings: databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsToTerraform(struct.primaryInstanceSettings), }; } exports.databaseMigrationServiceConnectionProfileAlloydbSettingsToTerraform = databaseMigrationServiceConnectionProfileAlloydbSettingsToTerraform; function databaseMigrationServiceConnectionProfileAlloydbSettingsToHclTerraform(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 = { labels: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.labels), isBlock: false, type: "map", storageClassType: "stringMap", }, vpc_network: { value: cdktf.stringToHclTerraform(struct.vpcNetwork), isBlock: false, type: "simple", storageClassType: "string", }, initial_user: { value: databaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserToHclTerraform(struct.initialUser), isBlock: true, type: "list", storageClassType: "DatabaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserList", }, primary_instance_settings: { value: databaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsToHclTerraform(struct.primaryInstanceSettings), isBlock: true, type: "list", storageClassType: "DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.databaseMigrationServiceConnectionProfileAlloydbSettingsToHclTerraform = databaseMigrationServiceConnectionProfileAlloydbSettingsToHclTerraform; class DatabaseMigrationServiceConnectionProfileAlloydbSettingsOutputReference 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; // initial_user - computed: false, optional: false, required: true this._initialUser = new DatabaseMigrationServiceConnectionProfileAlloydbSettingsInitialUserOutputReference(this, "initial_user"); // primary_instance_settings - computed: false, optional: true, required: false this._primaryInstanceSettings = new DatabaseMigrationServiceConnectionProfileAlloydbSettingsPrimaryInstanceSettingsOutputReference(this, "primary_instance_settings"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._labels !== undefined) { hasAnyValues = true; internalValueResult.labels = this._labels; } if (this._vpcNetwork !== undefined) { hasAnyValues = true; internalValueResult.vpcNetwork = this._vpcNetwork; } if (this._initialUser?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.initialUser = this._initialUser?.internalValue; } if (this._primaryInstanceSettings?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.primaryInstanceSettings = this._primaryInstanceSettings?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._labels = undefined; this._vpcNetwork = undefined; this._initialUser.internalValue = undefined; this._primaryInstanceSettings.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._labels = value.labels; this._vpcNetwork = value.vpcNetwork; this._initialUser.internalValue = value.initialUser; this._primaryInstanceSettings.internalValue = value.primaryInstanceSettings; } } 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 vpcNetwork() { return this.getStringAttribute('vpc_network'); } set vpcNetwork(value) { this._vpcNetwork = value; } // Temporarily expose input value. Use with caution. get vpcNetworkInput() { return this._vpcNetwork; } get initialUser() { return this._initialUser; } putInitialUser(value) { this._initialUser.internalValue = value; } // Temporarily expose input value. Use with caution. get initialUserInput() { return this._initialUser.internalValue; } get primaryInstanceSettings() { return this._primaryInstanceSettings; } putPrimaryInstanceSettings(value) { this._primaryInstanceSettings.internalValue = value; } resetPrimaryInstanceSettings() { this._primaryInstanceSettings.internalValue = undefined; } // Temporarily expose input value. Use with caution. get primaryInstanceSettingsInput() { return this._primaryInstanceSettings.internalValue; } } exports.DatabaseMigrationServiceConnectionProfileAlloydbSettingsOutputReference = DatabaseMigrationServiceConnectionProfileAlloydbSettingsOutputReference; _f = JSII_RTTI_SYMBOL_1; DatabaseMigrationServiceConnectionProfileAlloydbSettingsOutputReference[_f] = { fqn: "@cdktf/provider-google.databaseMigrationServiceConnectionProfile.DatabaseMigrationServiceConnectionProfileAlloydbSettingsOutputReference", version: "14.12.0" }; function databaseMigrationServiceConnectionProfileAlloydbToTerraform(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 { cluster_id: cdktf.stringToTerraform(struct.clusterId), settings: databaseMigrationServiceConnectionProfileAlloydbSettingsToTerraform(struct.settings), }; } exports.databaseMigrationServiceConnectionProfileAlloydbToTerraform = databaseMigrationServiceConnectionProfileAlloydbToTerraform; function databaseMigrationServiceConnectionProfileAlloydbToHclTerraform(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 = { cluster_id: { value: cdktf.stringToHclTerraform(struct.clusterId), isBlock: false, type: "simple", storageClassType: "string", }, settings: { value: databaseMigrationServiceConnectionProfileAlloydbSettingsToHclTerraform(struct.settings), isBlock: true, type: "list", storageClassType: "DatabaseMigrationServiceConnectionProfileAlloydbSettingsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.databaseMigrationServiceConnectionProfileAlloydbToHclTerraform = databaseMigrationServiceConnectionProfileAlloydbToHclTerraform; class DatabaseMigrationServiceConnectionProfileAlloydbOutputReference 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; // settings - computed: false, optional: true, required: false this._settings = new DatabaseMigrationServiceConnectionProfileAlloydbSettingsOutputReference(this, "settings"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._clusterId !== undefined) { hasAnyValues = true; internalValueResult.clusterId = this._clusterId; } if (this._settings?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.settings = this._settings?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._clusterId = undefined; this._settings.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._clusterId = value.clusterId; this._settings.internalValue = value.settings; } } get clusterId() { return this.getStringAttribute('cluster_id'); } set clusterId(value) { this._clusterId = value; } // Temporarily expose input value. Use with caution. get clusterIdInput() { return this._clusterId; } get settings() { return this._settings; } putSettings(value) { this._settings.internalValue = value; } resetSettings() { this._settings.internalValue = undefined; } // Temporarily expose input value. Use with caution. get settingsInput() { return this._settings.internalValue; } } exports.DatabaseMigrationServiceConnectionProfileAlloydbOutputReference = DatabaseMigrationServiceConnectionProfileAlloydbOutputReference; _g = JSII_RTTI_SYMBOL_1; DatabaseMigrationServiceConnectionProfileAlloydbOutputReference[_g] = { fqn: "@cdktf/provider-google.databaseMigrationServiceConnectionProfile.DatabaseMigrationServiceConnectionProfileAlloydbOutputReference", version: "14.12.0" }; function databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksToTerraform(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 { expire_time: cdktf.stringToTerraform(struct.expireTime), label: cdktf.stringToTerraform(struct.label), ttl: cdktf.stringToTerraform(struct.ttl), value: cdktf.stringToTerraform(struct.value), }; } exports.databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksToTerraform = databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksToTerraform; function databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksToHclTerraform(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 = { expire_time: { value: cdktf.stringToHclTerraform(struct.expireTime), isBlock: false, type: "simple", storageClassType: "string", }, label: { value: cdktf.stringToHclTerraform(struct.label), isBlock: false, type: "simple", storageClassType: "string", }, ttl: { value: cdktf.stringToHclTerraform(struct.ttl), isBlock: false, type: "simple", storageClassType: "string", }, value: { value: cdktf.stringToHclTerraform(struct.value), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksToHclTerraform = databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksToHclTerraform; class DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksOutputReference 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._expireTime !== undefined) { hasAnyValues = true; internalValueResult.expireTime = this._expireTime; } if (this._label !== undefined) { hasAnyValues = true; internalValueResult.label = this._label; } if (this._ttl !== undefined) { hasAnyValues = true; internalValueResult.ttl = this._ttl; } if (this._value !== undefined) { hasAnyValues = true; internalValueResult.value = this._value; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._expireTime = undefined; this._label = undefined; this._ttl = undefined; this._value = 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._expireTime = value.expireTime; this._label = value.label; this._ttl = value.ttl; this._value = value.value; } } get expireTime() { return this.getStringAttribute('expire_time'); } set expireTime(value) { this._expireTime = value; } resetExpireTime() { this._expireTime = undefined; } // Temporarily expose input value. Use with caution. get expireTimeInput() { return this._expireTime; } get label() { return this.getStringAttribute('label'); } set label(value) { this._label = value; } resetLabel() { this._label = undefined; } // Temporarily expose input value. Use with caution. get labelInput() { return this._label; } get ttl() { return this.getStringAttribute('ttl'); } set ttl(value) { this._ttl = value; } resetTtl() { this._ttl = undefined; } // Temporarily expose input value. Use with caution. get ttlInput() { return this._ttl; } get value() { return this.getStringAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksOutputReference = DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksOutputReference; _h = JSII_RTTI_SYMBOL_1; DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksOutputReference[_h] = { fqn: "@cdktf/provider-google.databaseMigrationServiceConnectionProfile.DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksOutputReference", version: "14.12.0" }; class DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksList 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 DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksList = DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksList; _j = JSII_RTTI_SYMBOL_1; DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksList[_j] = { fqn: "@cdktf/provider-google.databaseMigrationServiceConnectionProfile.DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksList", version: "14.12.0" }; function databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigToTerraform(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 { enable_ipv4: cdktf.booleanToTerraform(struct.enableIpv4), private_network: cdktf.stringToTerraform(struct.privateNetwork), require_ssl: cdktf.booleanToTerraform(struct.requireSsl), authorized_networks: cdktf.listMapper(databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksToTerraform, true)(struct.authorizedNetworks), }; } exports.databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigToTerraform = databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigToTerraform; function databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigToHclTerraform(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 = { enable_ipv4: { value: cdktf.booleanToHclTerraform(struct.enableIpv4), isBlock: false, type: "simple", storageClassType: "boolean", }, private_network: { value: cdktf.stringToHclTerraform(struct.privateNetwork), isBlock: false, type: "simple", storageClassType: "string", }, require_ssl: { value: cdktf.booleanToHclTerraform(struct.requireSsl), isBlock: false, type: "simple", storageClassType: "boolean", }, authorized_networks: { value: cdktf.listMapperHcl(databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksToHclTerraform, true)(struct.authorizedNetworks), isBlock: true, type: "list", storageClassType: "DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigToHclTerraform = databaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigToHclTerraform; class DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigOutputReference 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; // authorized_networks - computed: false, optional: true, required: false this._authorizedNetworks = new DatabaseMigrationServiceConnectionProfileCloudsqlSettingsIpConfigAuthorizedNetworksList(this, "authorized_networks", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._enableIpv4 !== undefined) { hasAnyValues = true; internalValueResult.enableIpv4 = this._enableIpv4; } if (this._privateNetwork !== undefined) { hasAnyValues = true; internalValueResult.privateNetwork = this._privateNetwork; } if (this._requireSsl !== undefined) { hasAnyValues = true; internalValueResult.requireSsl = this._requireSsl; } if (this._authorizedNetworks?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.authorizedNetworks = this._authorizedNetworks?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._enableIpv4 = undefined; this._privateNetwork = undefined; this._requireSsl = undefined; this._authorizedNetworks.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enableIpv4 = value.enableIpv4; this._privateNetwork = value.privateNetwork; this._requireSsl = value.requireSsl; this._authorizedNetworks.internalValue = value.authorizedNetworks; } } get enableIpv4() { return this.getBooleanAttribute('enable_ipv4'); } set enableIpv4(value) { this._enableIpv4 = value; } resetEnableIpv4() { this._enableIpv4 = undefined; } // Temporarily expose input value. Use with caution. get enableIpv4Input() { return this._enableIpv4; } get privateNetwork() { return this.getStringAttribute('private_network'); } set privateNetwork(value) { this._privateNetwork = value; } resetPrivateNetwork() { this._privateNetwork = undefined; } // Temporarily expose input value. Use with caution. get privateNetworkInput() { return this._privateNetwork; } get requireSsl() { return this.getBooleanAttribute('require_ssl'); } set requireSsl(value) { this._requireSsl = value; } resetRequireSsl() { this._requireSsl = undefined; } // Temporarily expose input value. Use with caution. get requireSslInput() { return this._requireSsl; } get authorizedNetworks() { return this._authorizedNetworks; } putAuthorizedNetworks(value) { this._authorizedNetworks.internalValue = value; }