UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,305 lines (1,304 loc) 193 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g; Object.defineProperty(exports, "__esModule", { value: true }); exports.NetworkManagementConnectivityTest = exports.NetworkManagementConnectivityTestTimeoutsOutputReference = exports.NetworkManagementConnectivityTestSourceOutputReference = exports.NetworkManagementConnectivityTestSourceCloudRunRevisionOutputReference = exports.NetworkManagementConnectivityTestSourceCloudFunctionOutputReference = exports.NetworkManagementConnectivityTestSourceAppEngineVersionOutputReference = exports.NetworkManagementConnectivityTestDestinationOutputReference = void 0; exports.networkManagementConnectivityTestDestinationToTerraform = networkManagementConnectivityTestDestinationToTerraform; exports.networkManagementConnectivityTestDestinationToHclTerraform = networkManagementConnectivityTestDestinationToHclTerraform; exports.networkManagementConnectivityTestSourceAppEngineVersionToTerraform = networkManagementConnectivityTestSourceAppEngineVersionToTerraform; exports.networkManagementConnectivityTestSourceAppEngineVersionToHclTerraform = networkManagementConnectivityTestSourceAppEngineVersionToHclTerraform; exports.networkManagementConnectivityTestSourceCloudFunctionToTerraform = networkManagementConnectivityTestSourceCloudFunctionToTerraform; exports.networkManagementConnectivityTestSourceCloudFunctionToHclTerraform = networkManagementConnectivityTestSourceCloudFunctionToHclTerraform; exports.networkManagementConnectivityTestSourceCloudRunRevisionToTerraform = networkManagementConnectivityTestSourceCloudRunRevisionToTerraform; exports.networkManagementConnectivityTestSourceCloudRunRevisionToHclTerraform = networkManagementConnectivityTestSourceCloudRunRevisionToHclTerraform; exports.networkManagementConnectivityTestSourceToTerraform = networkManagementConnectivityTestSourceToTerraform; exports.networkManagementConnectivityTestSourceToHclTerraform = networkManagementConnectivityTestSourceToHclTerraform; exports.networkManagementConnectivityTestTimeoutsToTerraform = networkManagementConnectivityTestTimeoutsToTerraform; exports.networkManagementConnectivityTestTimeoutsToHclTerraform = networkManagementConnectivityTestTimeoutsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function networkManagementConnectivityTestDestinationToTerraform(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 { cloud_sql_instance: cdktf.stringToTerraform(struct.cloudSqlInstance), forwarding_rule: cdktf.stringToTerraform(struct.forwardingRule), fqdn: cdktf.stringToTerraform(struct.fqdn), gke_master_cluster: cdktf.stringToTerraform(struct.gkeMasterCluster), instance: cdktf.stringToTerraform(struct.instance), ip_address: cdktf.stringToTerraform(struct.ipAddress), network: cdktf.stringToTerraform(struct.network), port: cdktf.numberToTerraform(struct.port), project_id: cdktf.stringToTerraform(struct.projectId), redis_cluster: cdktf.stringToTerraform(struct.redisCluster), redis_instance: cdktf.stringToTerraform(struct.redisInstance), }; } function networkManagementConnectivityTestDestinationToHclTerraform(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 = { cloud_sql_instance: { value: cdktf.stringToHclTerraform(struct.cloudSqlInstance), isBlock: false, type: "simple", storageClassType: "string", }, forwarding_rule: { value: cdktf.stringToHclTerraform(struct.forwardingRule), isBlock: false, type: "simple", storageClassType: "string", }, fqdn: { value: cdktf.stringToHclTerraform(struct.fqdn), isBlock: false, type: "simple", storageClassType: "string", }, gke_master_cluster: { value: cdktf.stringToHclTerraform(struct.gkeMasterCluster), isBlock: false, type: "simple", storageClassType: "string", }, instance: { value: cdktf.stringToHclTerraform(struct.instance), isBlock: false, type: "simple", storageClassType: "string", }, ip_address: { value: cdktf.stringToHclTerraform(struct.ipAddress), isBlock: false, type: "simple", storageClassType: "string", }, network: { value: cdktf.stringToHclTerraform(struct.network), isBlock: false, type: "simple", storageClassType: "string", }, port: { value: cdktf.numberToHclTerraform(struct.port), isBlock: false, type: "simple", storageClassType: "number", }, project_id: { value: cdktf.stringToHclTerraform(struct.projectId), isBlock: false, type: "simple", storageClassType: "string", }, redis_cluster: { value: cdktf.stringToHclTerraform(struct.redisCluster), isBlock: false, type: "simple", storageClassType: "string", }, redis_instance: { value: cdktf.stringToHclTerraform(struct.redisInstance), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class NetworkManagementConnectivityTestDestinationOutputReference 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._cloudSqlInstance !== undefined) { hasAnyValues = true; internalValueResult.cloudSqlInstance = this._cloudSqlInstance; } if (this._forwardingRule !== undefined) { hasAnyValues = true; internalValueResult.forwardingRule = this._forwardingRule; } if (this._fqdn !== undefined) { hasAnyValues = true; internalValueResult.fqdn = this._fqdn; } if (this._gkeMasterCluster !== undefined) { hasAnyValues = true; internalValueResult.gkeMasterCluster = this._gkeMasterCluster; } if (this._instance !== undefined) { hasAnyValues = true; internalValueResult.instance = this._instance; } if (this._ipAddress !== undefined) { hasAnyValues = true; internalValueResult.ipAddress = this._ipAddress; } if (this._network !== undefined) { hasAnyValues = true; internalValueResult.network = this._network; } if (this._port !== undefined) { hasAnyValues = true; internalValueResult.port = this._port; } if (this._projectId !== undefined) { hasAnyValues = true; internalValueResult.projectId = this._projectId; } if (this._redisCluster !== undefined) { hasAnyValues = true; internalValueResult.redisCluster = this._redisCluster; } if (this._redisInstance !== undefined) { hasAnyValues = true; internalValueResult.redisInstance = this._redisInstance; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._cloudSqlInstance = undefined; this._forwardingRule = undefined; this._fqdn = undefined; this._gkeMasterCluster = undefined; this._instance = undefined; this._ipAddress = undefined; this._network = undefined; this._port = undefined; this._projectId = undefined; this._redisCluster = undefined; this._redisInstance = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._cloudSqlInstance = value.cloudSqlInstance; this._forwardingRule = value.forwardingRule; this._fqdn = value.fqdn; this._gkeMasterCluster = value.gkeMasterCluster; this._instance = value.instance; this._ipAddress = value.ipAddress; this._network = value.network; this._port = value.port; this._projectId = value.projectId; this._redisCluster = value.redisCluster; this._redisInstance = value.redisInstance; } } get cloudSqlInstance() { return this.getStringAttribute('cloud_sql_instance'); } set cloudSqlInstance(value) { this._cloudSqlInstance = value; } resetCloudSqlInstance() { this._cloudSqlInstance = undefined; } // Temporarily expose input value. Use with caution. get cloudSqlInstanceInput() { return this._cloudSqlInstance; } get forwardingRule() { return this.getStringAttribute('forwarding_rule'); } set forwardingRule(value) { this._forwardingRule = value; } resetForwardingRule() { this._forwardingRule = undefined; } // Temporarily expose input value. Use with caution. get forwardingRuleInput() { return this._forwardingRule; } get fqdn() { return this.getStringAttribute('fqdn'); } set fqdn(value) { this._fqdn = value; } resetFqdn() { this._fqdn = undefined; } // Temporarily expose input value. Use with caution. get fqdnInput() { return this._fqdn; } get gkeMasterCluster() { return this.getStringAttribute('gke_master_cluster'); } set gkeMasterCluster(value) { this._gkeMasterCluster = value; } resetGkeMasterCluster() { this._gkeMasterCluster = undefined; } // Temporarily expose input value. Use with caution. get gkeMasterClusterInput() { return this._gkeMasterCluster; } get instance() { return this.getStringAttribute('instance'); } set instance(value) { this._instance = value; } resetInstance() { this._instance = undefined; } // Temporarily expose input value. Use with caution. get instanceInput() { return this._instance; } get ipAddress() { return this.getStringAttribute('ip_address'); } set ipAddress(value) { this._ipAddress = value; } resetIpAddress() { this._ipAddress = undefined; } // Temporarily expose input value. Use with caution. get ipAddressInput() { return this._ipAddress; } get network() { return this.getStringAttribute('network'); } set network(value) { this._network = value; } resetNetwork() { this._network = undefined; } // Temporarily expose input value. Use with caution. get networkInput() { return this._network; } get port() { return this.getNumberAttribute('port'); } set port(value) { this._port = value; } resetPort() { this._port = undefined; } // Temporarily expose input value. Use with caution. get portInput() { return this._port; } get projectId() { return this.getStringAttribute('project_id'); } set projectId(value) { this._projectId = value; } resetProjectId() { this._projectId = undefined; } // Temporarily expose input value. Use with caution. get projectIdInput() { return this._projectId; } get redisCluster() { return this.getStringAttribute('redis_cluster'); } set redisCluster(value) { this._redisCluster = value; } resetRedisCluster() { this._redisCluster = undefined; } // Temporarily expose input value. Use with caution. get redisClusterInput() { return this._redisCluster; } get redisInstance() { return this.getStringAttribute('redis_instance'); } set redisInstance(value) { this._redisInstance = value; } resetRedisInstance() { this._redisInstance = undefined; } // Temporarily expose input value. Use with caution. get redisInstanceInput() { return this._redisInstance; } } exports.NetworkManagementConnectivityTestDestinationOutputReference = NetworkManagementConnectivityTestDestinationOutputReference; _a = JSII_RTTI_SYMBOL_1; NetworkManagementConnectivityTestDestinationOutputReference[_a] = { fqn: "@cdktf/provider-google.networkManagementConnectivityTest.NetworkManagementConnectivityTestDestinationOutputReference", version: "16.3.0" }; function networkManagementConnectivityTestSourceAppEngineVersionToTerraform(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 { uri: cdktf.stringToTerraform(struct.uri), }; } function networkManagementConnectivityTestSourceAppEngineVersionToHclTerraform(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 = { uri: { value: cdktf.stringToHclTerraform(struct.uri), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class NetworkManagementConnectivityTestSourceAppEngineVersionOutputReference 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._uri !== undefined) { hasAnyValues = true; internalValueResult.uri = this._uri; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._uri = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._uri = value.uri; } } get uri() { return this.getStringAttribute('uri'); } set uri(value) { this._uri = value; } resetUri() { this._uri = undefined; } // Temporarily expose input value. Use with caution. get uriInput() { return this._uri; } } exports.NetworkManagementConnectivityTestSourceAppEngineVersionOutputReference = NetworkManagementConnectivityTestSourceAppEngineVersionOutputReference; _b = JSII_RTTI_SYMBOL_1; NetworkManagementConnectivityTestSourceAppEngineVersionOutputReference[_b] = { fqn: "@cdktf/provider-google.networkManagementConnectivityTest.NetworkManagementConnectivityTestSourceAppEngineVersionOutputReference", version: "16.3.0" }; function networkManagementConnectivityTestSourceCloudFunctionToTerraform(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 { uri: cdktf.stringToTerraform(struct.uri), }; } function networkManagementConnectivityTestSourceCloudFunctionToHclTerraform(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 = { uri: { value: cdktf.stringToHclTerraform(struct.uri), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class NetworkManagementConnectivityTestSourceCloudFunctionOutputReference 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._uri !== undefined) { hasAnyValues = true; internalValueResult.uri = this._uri; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._uri = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._uri = value.uri; } } get uri() { return this.getStringAttribute('uri'); } set uri(value) { this._uri = value; } resetUri() { this._uri = undefined; } // Temporarily expose input value. Use with caution. get uriInput() { return this._uri; } } exports.NetworkManagementConnectivityTestSourceCloudFunctionOutputReference = NetworkManagementConnectivityTestSourceCloudFunctionOutputReference; _c = JSII_RTTI_SYMBOL_1; NetworkManagementConnectivityTestSourceCloudFunctionOutputReference[_c] = { fqn: "@cdktf/provider-google.networkManagementConnectivityTest.NetworkManagementConnectivityTestSourceCloudFunctionOutputReference", version: "16.3.0" }; function networkManagementConnectivityTestSourceCloudRunRevisionToTerraform(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 { uri: cdktf.stringToTerraform(struct.uri), }; } function networkManagementConnectivityTestSourceCloudRunRevisionToHclTerraform(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 = { uri: { value: cdktf.stringToHclTerraform(struct.uri), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class NetworkManagementConnectivityTestSourceCloudRunRevisionOutputReference 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._uri !== undefined) { hasAnyValues = true; internalValueResult.uri = this._uri; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._uri = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._uri = value.uri; } } get uri() { return this.getStringAttribute('uri'); } set uri(value) { this._uri = value; } resetUri() { this._uri = undefined; } // Temporarily expose input value. Use with caution. get uriInput() { return this._uri; } } exports.NetworkManagementConnectivityTestSourceCloudRunRevisionOutputReference = NetworkManagementConnectivityTestSourceCloudRunRevisionOutputReference; _d = JSII_RTTI_SYMBOL_1; NetworkManagementConnectivityTestSourceCloudRunRevisionOutputReference[_d] = { fqn: "@cdktf/provider-google.networkManagementConnectivityTest.NetworkManagementConnectivityTestSourceCloudRunRevisionOutputReference", version: "16.3.0" }; function networkManagementConnectivityTestSourceToTerraform(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 { cloud_sql_instance: cdktf.stringToTerraform(struct.cloudSqlInstance), gke_master_cluster: cdktf.stringToTerraform(struct.gkeMasterCluster), instance: cdktf.stringToTerraform(struct.instance), ip_address: cdktf.stringToTerraform(struct.ipAddress), network: cdktf.stringToTerraform(struct.network), network_type: cdktf.stringToTerraform(struct.networkType), port: cdktf.numberToTerraform(struct.port), project_id: cdktf.stringToTerraform(struct.projectId), app_engine_version: networkManagementConnectivityTestSourceAppEngineVersionToTerraform(struct.appEngineVersion), cloud_function: networkManagementConnectivityTestSourceCloudFunctionToTerraform(struct.cloudFunction), cloud_run_revision: networkManagementConnectivityTestSourceCloudRunRevisionToTerraform(struct.cloudRunRevision), }; } function networkManagementConnectivityTestSourceToHclTerraform(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 = { cloud_sql_instance: { value: cdktf.stringToHclTerraform(struct.cloudSqlInstance), isBlock: false, type: "simple", storageClassType: "string", }, gke_master_cluster: { value: cdktf.stringToHclTerraform(struct.gkeMasterCluster), isBlock: false, type: "simple", storageClassType: "string", }, instance: { value: cdktf.stringToHclTerraform(struct.instance), isBlock: false, type: "simple", storageClassType: "string", }, ip_address: { value: cdktf.stringToHclTerraform(struct.ipAddress), isBlock: false, type: "simple", storageClassType: "string", }, network: { value: cdktf.stringToHclTerraform(struct.network), isBlock: false, type: "simple", storageClassType: "string", }, network_type: { value: cdktf.stringToHclTerraform(struct.networkType), isBlock: false, type: "simple", storageClassType: "string", }, port: { value: cdktf.numberToHclTerraform(struct.port), isBlock: false, type: "simple", storageClassType: "number", }, project_id: { value: cdktf.stringToHclTerraform(struct.projectId), isBlock: false, type: "simple", storageClassType: "string", }, app_engine_version: { value: networkManagementConnectivityTestSourceAppEngineVersionToHclTerraform(struct.appEngineVersion), isBlock: true, type: "list", storageClassType: "NetworkManagementConnectivityTestSourceAppEngineVersionList", }, cloud_function: { value: networkManagementConnectivityTestSourceCloudFunctionToHclTerraform(struct.cloudFunction), isBlock: true, type: "list", storageClassType: "NetworkManagementConnectivityTestSourceCloudFunctionList", }, cloud_run_revision: { value: networkManagementConnectivityTestSourceCloudRunRevisionToHclTerraform(struct.cloudRunRevision), isBlock: true, type: "list", storageClassType: "NetworkManagementConnectivityTestSourceCloudRunRevisionList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class NetworkManagementConnectivityTestSourceOutputReference 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; // app_engine_version - computed: false, optional: true, required: false this._appEngineVersion = new NetworkManagementConnectivityTestSourceAppEngineVersionOutputReference(this, "app_engine_version"); // cloud_function - computed: false, optional: true, required: false this._cloudFunction = new NetworkManagementConnectivityTestSourceCloudFunctionOutputReference(this, "cloud_function"); // cloud_run_revision - computed: false, optional: true, required: false this._cloudRunRevision = new NetworkManagementConnectivityTestSourceCloudRunRevisionOutputReference(this, "cloud_run_revision"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._cloudSqlInstance !== undefined) { hasAnyValues = true; internalValueResult.cloudSqlInstance = this._cloudSqlInstance; } if (this._gkeMasterCluster !== undefined) { hasAnyValues = true; internalValueResult.gkeMasterCluster = this._gkeMasterCluster; } if (this._instance !== undefined) { hasAnyValues = true; internalValueResult.instance = this._instance; } if (this._ipAddress !== undefined) { hasAnyValues = true; internalValueResult.ipAddress = this._ipAddress; } if (this._network !== undefined) { hasAnyValues = true; internalValueResult.network = this._network; } if (this._networkType !== undefined) { hasAnyValues = true; internalValueResult.networkType = this._networkType; } if (this._port !== undefined) { hasAnyValues = true; internalValueResult.port = this._port; } if (this._projectId !== undefined) { hasAnyValues = true; internalValueResult.projectId = this._projectId; } if (this._appEngineVersion?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.appEngineVersion = this._appEngineVersion?.internalValue; } if (this._cloudFunction?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.cloudFunction = this._cloudFunction?.internalValue; } if (this._cloudRunRevision?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.cloudRunRevision = this._cloudRunRevision?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._cloudSqlInstance = undefined; this._gkeMasterCluster = undefined; this._instance = undefined; this._ipAddress = undefined; this._network = undefined; this._networkType = undefined; this._port = undefined; this._projectId = undefined; this._appEngineVersion.internalValue = undefined; this._cloudFunction.internalValue = undefined; this._cloudRunRevision.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._cloudSqlInstance = value.cloudSqlInstance; this._gkeMasterCluster = value.gkeMasterCluster; this._instance = value.instance; this._ipAddress = value.ipAddress; this._network = value.network; this._networkType = value.networkType; this._port = value.port; this._projectId = value.projectId; this._appEngineVersion.internalValue = value.appEngineVersion; this._cloudFunction.internalValue = value.cloudFunction; this._cloudRunRevision.internalValue = value.cloudRunRevision; } } get cloudSqlInstance() { return this.getStringAttribute('cloud_sql_instance'); } set cloudSqlInstance(value) { this._cloudSqlInstance = value; } resetCloudSqlInstance() { this._cloudSqlInstance = undefined; } // Temporarily expose input value. Use with caution. get cloudSqlInstanceInput() { return this._cloudSqlInstance; } get gkeMasterCluster() { return this.getStringAttribute('gke_master_cluster'); } set gkeMasterCluster(value) { this._gkeMasterCluster = value; } resetGkeMasterCluster() { this._gkeMasterCluster = undefined; } // Temporarily expose input value. Use with caution. get gkeMasterClusterInput() { return this._gkeMasterCluster; } get instance() { return this.getStringAttribute('instance'); } set instance(value) { this._instance = value; } resetInstance() { this._instance = undefined; } // Temporarily expose input value. Use with caution. get instanceInput() { return this._instance; } get ipAddress() { return this.getStringAttribute('ip_address'); } set ipAddress(value) { this._ipAddress = value; } resetIpAddress() { this._ipAddress = undefined; } // Temporarily expose input value. Use with caution. get ipAddressInput() { return this._ipAddress; } get network() { return this.getStringAttribute('network'); } set network(value) { this._network = value; } resetNetwork() { this._network = undefined; } // Temporarily expose input value. Use with caution. get networkInput() { return this._network; } get networkType() { return this.getStringAttribute('network_type'); } set networkType(value) { this._networkType = value; } resetNetworkType() { this._networkType = undefined; } // Temporarily expose input value. Use with caution. get networkTypeInput() { return this._networkType; } get port() { return this.getNumberAttribute('port'); } set port(value) { this._port = value; } resetPort() { this._port = undefined; } // Temporarily expose input value. Use with caution. get portInput() { return this._port; } get projectId() { return this.getStringAttribute('project_id'); } set projectId(value) { this._projectId = value; } resetProjectId() { this._projectId = undefined; } // Temporarily expose input value. Use with caution. get projectIdInput() { return this._projectId; } get appEngineVersion() { return this._appEngineVersion; } putAppEngineVersion(value) { this._appEngineVersion.internalValue = value; } resetAppEngineVersion() { this._appEngineVersion.internalValue = undefined; } // Temporarily expose input value. Use with caution. get appEngineVersionInput() { return this._appEngineVersion.internalValue; } get cloudFunction() { return this._cloudFunction; } putCloudFunction(value) { this._cloudFunction.internalValue = value; } resetCloudFunction() { this._cloudFunction.internalValue = undefined; } // Temporarily expose input value. Use with caution. get cloudFunctionInput() { return this._cloudFunction.internalValue; } get cloudRunRevision() { return this._cloudRunRevision; } putCloudRunRevision(value) { this._cloudRunRevision.internalValue = value; } resetCloudRunRevision() { this._cloudRunRevision.internalValue = undefined; } // Temporarily expose input value. Use with caution. get cloudRunRevisionInput() { return this._cloudRunRevision.internalValue; } } exports.NetworkManagementConnectivityTestSourceOutputReference = NetworkManagementConnectivityTestSourceOutputReference; _e = JSII_RTTI_SYMBOL_1; NetworkManagementConnectivityTestSourceOutputReference[_e] = { fqn: "@cdktf/provider-google.networkManagementConnectivityTest.NetworkManagementConnectivityTestSourceOutputReference", version: "16.3.0" }; function networkManagementConnectivityTestTimeoutsToTerraform(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), }; } function networkManagementConnectivityTestTimeoutsToHclTerraform(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)); } class NetworkManagementConnectivityTestTimeoutsOutputReference 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.NetworkManagementConnectivityTestTimeoutsOutputReference = NetworkManagementConnectivityTestTimeoutsOutputReference; _f = JSII_RTTI_SYMBOL_1; NetworkManagementConnectivityTestTimeoutsOutputReference[_f] = { fqn: "@cdktf/provider-google.networkManagementConnectivityTest.NetworkManagementConnectivityTestTimeoutsOutputReference", version: "16.3.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.41.0/docs/resources/network_management_connectivity_test google_network_management_connectivity_test} */ class NetworkManagementConnectivityTest extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a NetworkManagementConnectivityTest 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 NetworkManagementConnectivityTest to import * @param importFromId The id of the existing NetworkManagementConnectivityTest that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.41.0/docs/resources/network_management_connectivity_test#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the NetworkManagementConnectivityTest to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_network_management_connectivity_test", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.41.0/docs/resources/network_management_connectivity_test google_network_management_connectivity_test} 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 NetworkManagementConnectivityTestConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_network_management_connectivity_test', terraformGeneratorMetadata: { providerName: 'google', providerVersion: '6.41.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"); // destination - computed: false, optional: false, required: true this._destination = new NetworkManagementConnectivityTestDestinationOutputReference(this, "destination"); // source - computed: false, optional: false, required: true this._source = new NetworkManagementConnectivityTestSourceOutputReference(this, "source"); // timeouts - computed: false, optional: true, required: false this._timeouts = new NetworkManagementConnectivityTestTimeoutsOutputReference(this, "timeouts"); this._bypassFirewallChecks = config.bypassFirewallChecks; this._description = config.description; this._id = config.id; this._labels = config.labels; this._name = config.name; this._project = config.project; this._protocol = config.protocol; this._relatedProjects = config.relatedProjects; this._roundTrip = config.roundTrip; this._destination.internalValue = config.destination; this._source.internalValue = config.source; this._timeouts.internalValue = config.timeouts; } get bypassFirewallChecks() { return this.getBooleanAttribute('bypass_firewall_checks'); } set bypassFirewallChecks(value) { this._bypassFirewallChecks = value; } resetBypassFirewallChecks() { this._bypassFirewallChecks = undefined; } // Temporarily expose input value. Use with caution. get bypassFirewallChecksInput() { return this._bypassFirewallChecks; } 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; } 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 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 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 relatedProjects() { return this.getListAttribute('related_projects'); } set relatedProjects(value) { this._relatedProjects = value; } resetRelatedProjects() { this._relatedProjects = undefined; } // Temporarily expose input value. Use with caution. get relatedProjectsInput() { return this._relatedProjects; } get roundTrip() { return this.getBooleanAttribute('round_trip'); } set roundTrip(value) { this._roundTrip = value; } resetRoundTrip() { this._roundTrip = undefined; } // Temporarily expose input value. Use with caution. get roundTripInput() { return this._roundTrip; } get terraformLabels() { return this._terraformLabels; } get destination() { return this._destination; } putDestination(value) { this._destination.internalValue = value; } // Temporarily expose input value. Use with caution. get destinationInput() { return this._destination.internalValue; } get source() { return this._source; } putSource(value) { this._source.internalValue = value; } // Temporarily expose input value. Use with caution. get sourceInput() { return this._source.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 { bypass_firewall_checks: cdktf.booleanToTerraform(this._bypassFirewallChecks), description: cdktf.stringToTerraform(this._description), id: cdktf.stringToTerraform(this._id), labels: cdktf.hashMapper(cdktf.stringToTerraform)(this._labels), name: cdktf.stringToTerraform(this._name), project: cdktf.stringToTerraform(this._project), protocol: cdktf.stringToTerraform(this._protocol), related_projects: cdktf.listMapper(cdktf.stringToTerraform, false)(this._relatedProjects), round_trip: cdktf.booleanToTerraform(this._roundTrip), destination: networkManagementConnectivityTestDestinationToTerraform(this._destination.internalValue), source: networkManagementConnectivityTestSourceToTerraform(this._source.internalValue), timeouts: networkManagementConnectivityTestTimeoutsToTerraform(this._timeouts.internalValue), }; } synthesizeHclAttributes() { const attrs = { bypass_firewall_checks: { value: cdktf.booleanToHclTerraform(this._bypassFirewallChecks), isBlock: false, type: "simple", storageClassType: "boolean", }, description: { value: cdktf.stringToHclTerraform(this._description), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false,