UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,238 lines 200 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; Object.defineProperty(exports, "__esModule", { value: true }); exports.EventarcTrigger = exports.EventarcTriggerTransportOutputReference = exports.eventarcTriggerTransportToHclTerraform = exports.eventarcTriggerTransportToTerraform = exports.EventarcTriggerTransportPubsubOutputReference = exports.eventarcTriggerTransportPubsubToHclTerraform = exports.eventarcTriggerTransportPubsubToTerraform = exports.EventarcTriggerTimeoutsOutputReference = exports.eventarcTriggerTimeoutsToHclTerraform = exports.eventarcTriggerTimeoutsToTerraform = exports.EventarcTriggerMatchingCriteriaList = exports.EventarcTriggerMatchingCriteriaOutputReference = exports.eventarcTriggerMatchingCriteriaToHclTerraform = exports.eventarcTriggerMatchingCriteriaToTerraform = exports.EventarcTriggerDestinationOutputReference = exports.eventarcTriggerDestinationToHclTerraform = exports.eventarcTriggerDestinationToTerraform = exports.EventarcTriggerDestinationNetworkConfigOutputReference = exports.eventarcTriggerDestinationNetworkConfigToHclTerraform = exports.eventarcTriggerDestinationNetworkConfigToTerraform = exports.EventarcTriggerDestinationHttpEndpointOutputReference = exports.eventarcTriggerDestinationHttpEndpointToHclTerraform = exports.eventarcTriggerDestinationHttpEndpointToTerraform = exports.EventarcTriggerDestinationGkeOutputReference = exports.eventarcTriggerDestinationGkeToHclTerraform = exports.eventarcTriggerDestinationGkeToTerraform = exports.EventarcTriggerDestinationCloudRunServiceOutputReference = exports.eventarcTriggerDestinationCloudRunServiceToHclTerraform = exports.eventarcTriggerDestinationCloudRunServiceToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function eventarcTriggerDestinationCloudRunServiceToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { path: cdktf.stringToTerraform(struct.path), region: cdktf.stringToTerraform(struct.region), service: cdktf.stringToTerraform(struct.service), }; } exports.eventarcTriggerDestinationCloudRunServiceToTerraform = eventarcTriggerDestinationCloudRunServiceToTerraform; function eventarcTriggerDestinationCloudRunServiceToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { path: { value: cdktf.stringToHclTerraform(struct.path), isBlock: false, type: "simple", storageClassType: "string", }, region: { value: cdktf.stringToHclTerraform(struct.region), isBlock: false, type: "simple", storageClassType: "string", }, service: { value: cdktf.stringToHclTerraform(struct.service), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.eventarcTriggerDestinationCloudRunServiceToHclTerraform = eventarcTriggerDestinationCloudRunServiceToHclTerraform; class EventarcTriggerDestinationCloudRunServiceOutputReference 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._path !== undefined) { hasAnyValues = true; internalValueResult.path = this._path; } if (this._region !== undefined) { hasAnyValues = true; internalValueResult.region = this._region; } if (this._service !== undefined) { hasAnyValues = true; internalValueResult.service = this._service; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._path = undefined; this._region = undefined; this._service = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._path = value.path; this._region = value.region; this._service = value.service; } } get path() { return this.getStringAttribute('path'); } set path(value) { this._path = value; } resetPath() { this._path = undefined; } // Temporarily expose input value. Use with caution. get pathInput() { return this._path; } get region() { return this.getStringAttribute('region'); } set region(value) { this._region = value; } resetRegion() { this._region = undefined; } // Temporarily expose input value. Use with caution. get regionInput() { return this._region; } get service() { return this.getStringAttribute('service'); } set service(value) { this._service = value; } // Temporarily expose input value. Use with caution. get serviceInput() { return this._service; } } exports.EventarcTriggerDestinationCloudRunServiceOutputReference = EventarcTriggerDestinationCloudRunServiceOutputReference; _a = JSII_RTTI_SYMBOL_1; EventarcTriggerDestinationCloudRunServiceOutputReference[_a] = { fqn: "@cdktf/provider-google.eventarcTrigger.EventarcTriggerDestinationCloudRunServiceOutputReference", version: "14.12.0" }; function eventarcTriggerDestinationGkeToTerraform(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: cdktf.stringToTerraform(struct.cluster), location: cdktf.stringToTerraform(struct.location), namespace: cdktf.stringToTerraform(struct.namespace), path: cdktf.stringToTerraform(struct.path), service: cdktf.stringToTerraform(struct.service), }; } exports.eventarcTriggerDestinationGkeToTerraform = eventarcTriggerDestinationGkeToTerraform; function eventarcTriggerDestinationGkeToHclTerraform(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: { value: cdktf.stringToHclTerraform(struct.cluster), isBlock: false, type: "simple", storageClassType: "string", }, location: { value: cdktf.stringToHclTerraform(struct.location), isBlock: false, type: "simple", storageClassType: "string", }, namespace: { value: cdktf.stringToHclTerraform(struct.namespace), isBlock: false, type: "simple", storageClassType: "string", }, path: { value: cdktf.stringToHclTerraform(struct.path), isBlock: false, type: "simple", storageClassType: "string", }, service: { value: cdktf.stringToHclTerraform(struct.service), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.eventarcTriggerDestinationGkeToHclTerraform = eventarcTriggerDestinationGkeToHclTerraform; class EventarcTriggerDestinationGkeOutputReference 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._cluster !== undefined) { hasAnyValues = true; internalValueResult.cluster = this._cluster; } if (this._location !== undefined) { hasAnyValues = true; internalValueResult.location = this._location; } if (this._namespace !== undefined) { hasAnyValues = true; internalValueResult.namespace = this._namespace; } if (this._path !== undefined) { hasAnyValues = true; internalValueResult.path = this._path; } if (this._service !== undefined) { hasAnyValues = true; internalValueResult.service = this._service; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._cluster = undefined; this._location = undefined; this._namespace = undefined; this._path = undefined; this._service = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._cluster = value.cluster; this._location = value.location; this._namespace = value.namespace; this._path = value.path; this._service = value.service; } } get cluster() { return this.getStringAttribute('cluster'); } set cluster(value) { this._cluster = value; } // Temporarily expose input value. Use with caution. get clusterInput() { return this._cluster; } get location() { return this.getStringAttribute('location'); } set location(value) { this._location = value; } // Temporarily expose input value. Use with caution. get locationInput() { return this._location; } get namespace() { return this.getStringAttribute('namespace'); } set namespace(value) { this._namespace = value; } // Temporarily expose input value. Use with caution. get namespaceInput() { return this._namespace; } get path() { return this.getStringAttribute('path'); } set path(value) { this._path = value; } resetPath() { this._path = undefined; } // Temporarily expose input value. Use with caution. get pathInput() { return this._path; } get service() { return this.getStringAttribute('service'); } set service(value) { this._service = value; } // Temporarily expose input value. Use with caution. get serviceInput() { return this._service; } } exports.EventarcTriggerDestinationGkeOutputReference = EventarcTriggerDestinationGkeOutputReference; _b = JSII_RTTI_SYMBOL_1; EventarcTriggerDestinationGkeOutputReference[_b] = { fqn: "@cdktf/provider-google.eventarcTrigger.EventarcTriggerDestinationGkeOutputReference", version: "14.12.0" }; function eventarcTriggerDestinationHttpEndpointToTerraform(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), }; } exports.eventarcTriggerDestinationHttpEndpointToTerraform = eventarcTriggerDestinationHttpEndpointToTerraform; function eventarcTriggerDestinationHttpEndpointToHclTerraform(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)); } exports.eventarcTriggerDestinationHttpEndpointToHclTerraform = eventarcTriggerDestinationHttpEndpointToHclTerraform; class EventarcTriggerDestinationHttpEndpointOutputReference 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; } // Temporarily expose input value. Use with caution. get uriInput() { return this._uri; } } exports.EventarcTriggerDestinationHttpEndpointOutputReference = EventarcTriggerDestinationHttpEndpointOutputReference; _c = JSII_RTTI_SYMBOL_1; EventarcTriggerDestinationHttpEndpointOutputReference[_c] = { fqn: "@cdktf/provider-google.eventarcTrigger.EventarcTriggerDestinationHttpEndpointOutputReference", version: "14.12.0" }; function eventarcTriggerDestinationNetworkConfigToTerraform(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 { network_attachment: cdktf.stringToTerraform(struct.networkAttachment), }; } exports.eventarcTriggerDestinationNetworkConfigToTerraform = eventarcTriggerDestinationNetworkConfigToTerraform; function eventarcTriggerDestinationNetworkConfigToHclTerraform(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 = { network_attachment: { value: cdktf.stringToHclTerraform(struct.networkAttachment), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.eventarcTriggerDestinationNetworkConfigToHclTerraform = eventarcTriggerDestinationNetworkConfigToHclTerraform; class EventarcTriggerDestinationNetworkConfigOutputReference 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._networkAttachment !== undefined) { hasAnyValues = true; internalValueResult.networkAttachment = this._networkAttachment; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._networkAttachment = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._networkAttachment = value.networkAttachment; } } get networkAttachment() { return this.getStringAttribute('network_attachment'); } set networkAttachment(value) { this._networkAttachment = value; } // Temporarily expose input value. Use with caution. get networkAttachmentInput() { return this._networkAttachment; } } exports.EventarcTriggerDestinationNetworkConfigOutputReference = EventarcTriggerDestinationNetworkConfigOutputReference; _d = JSII_RTTI_SYMBOL_1; EventarcTriggerDestinationNetworkConfigOutputReference[_d] = { fqn: "@cdktf/provider-google.eventarcTrigger.EventarcTriggerDestinationNetworkConfigOutputReference", version: "14.12.0" }; function eventarcTriggerDestinationToTerraform(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 { workflow: cdktf.stringToTerraform(struct.workflow), cloud_run_service: eventarcTriggerDestinationCloudRunServiceToTerraform(struct.cloudRunService), gke: eventarcTriggerDestinationGkeToTerraform(struct.gke), http_endpoint: eventarcTriggerDestinationHttpEndpointToTerraform(struct.httpEndpoint), network_config: eventarcTriggerDestinationNetworkConfigToTerraform(struct.networkConfig), }; } exports.eventarcTriggerDestinationToTerraform = eventarcTriggerDestinationToTerraform; function eventarcTriggerDestinationToHclTerraform(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 = { workflow: { value: cdktf.stringToHclTerraform(struct.workflow), isBlock: false, type: "simple", storageClassType: "string", }, cloud_run_service: { value: eventarcTriggerDestinationCloudRunServiceToHclTerraform(struct.cloudRunService), isBlock: true, type: "list", storageClassType: "EventarcTriggerDestinationCloudRunServiceList", }, gke: { value: eventarcTriggerDestinationGkeToHclTerraform(struct.gke), isBlock: true, type: "list", storageClassType: "EventarcTriggerDestinationGkeList", }, http_endpoint: { value: eventarcTriggerDestinationHttpEndpointToHclTerraform(struct.httpEndpoint), isBlock: true, type: "list", storageClassType: "EventarcTriggerDestinationHttpEndpointList", }, network_config: { value: eventarcTriggerDestinationNetworkConfigToHclTerraform(struct.networkConfig), isBlock: true, type: "list", storageClassType: "EventarcTriggerDestinationNetworkConfigList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.eventarcTriggerDestinationToHclTerraform = eventarcTriggerDestinationToHclTerraform; class EventarcTriggerDestinationOutputReference 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; // cloud_run_service - computed: false, optional: true, required: false this._cloudRunService = new EventarcTriggerDestinationCloudRunServiceOutputReference(this, "cloud_run_service"); // gke - computed: false, optional: true, required: false this._gke = new EventarcTriggerDestinationGkeOutputReference(this, "gke"); // http_endpoint - computed: false, optional: true, required: false this._httpEndpoint = new EventarcTriggerDestinationHttpEndpointOutputReference(this, "http_endpoint"); // network_config - computed: false, optional: true, required: false this._networkConfig = new EventarcTriggerDestinationNetworkConfigOutputReference(this, "network_config"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._workflow !== undefined) { hasAnyValues = true; internalValueResult.workflow = this._workflow; } if (this._cloudRunService?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.cloudRunService = this._cloudRunService?.internalValue; } if (this._gke?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.gke = this._gke?.internalValue; } if (this._httpEndpoint?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.httpEndpoint = this._httpEndpoint?.internalValue; } if (this._networkConfig?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.networkConfig = this._networkConfig?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._workflow = undefined; this._cloudRunService.internalValue = undefined; this._gke.internalValue = undefined; this._httpEndpoint.internalValue = undefined; this._networkConfig.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._workflow = value.workflow; this._cloudRunService.internalValue = value.cloudRunService; this._gke.internalValue = value.gke; this._httpEndpoint.internalValue = value.httpEndpoint; this._networkConfig.internalValue = value.networkConfig; } } // cloud_function - computed: true, optional: false, required: false get cloudFunction() { return this.getStringAttribute('cloud_function'); } get workflow() { return this.getStringAttribute('workflow'); } set workflow(value) { this._workflow = value; } resetWorkflow() { this._workflow = undefined; } // Temporarily expose input value. Use with caution. get workflowInput() { return this._workflow; } get cloudRunService() { return this._cloudRunService; } putCloudRunService(value) { this._cloudRunService.internalValue = value; } resetCloudRunService() { this._cloudRunService.internalValue = undefined; } // Temporarily expose input value. Use with caution. get cloudRunServiceInput() { return this._cloudRunService.internalValue; } get gke() { return this._gke; } putGke(value) { this._gke.internalValue = value; } resetGke() { this._gke.internalValue = undefined; } // Temporarily expose input value. Use with caution. get gkeInput() { return this._gke.internalValue; } get httpEndpoint() { return this._httpEndpoint; } putHttpEndpoint(value) { this._httpEndpoint.internalValue = value; } resetHttpEndpoint() { this._httpEndpoint.internalValue = undefined; } // Temporarily expose input value. Use with caution. get httpEndpointInput() { return this._httpEndpoint.internalValue; } get networkConfig() { return this._networkConfig; } putNetworkConfig(value) { this._networkConfig.internalValue = value; } resetNetworkConfig() { this._networkConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get networkConfigInput() { return this._networkConfig.internalValue; } } exports.EventarcTriggerDestinationOutputReference = EventarcTriggerDestinationOutputReference; _e = JSII_RTTI_SYMBOL_1; EventarcTriggerDestinationOutputReference[_e] = { fqn: "@cdktf/provider-google.eventarcTrigger.EventarcTriggerDestinationOutputReference", version: "14.12.0" }; function eventarcTriggerMatchingCriteriaToTerraform(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 { attribute: cdktf.stringToTerraform(struct.attribute), operator: cdktf.stringToTerraform(struct.operator), value: cdktf.stringToTerraform(struct.value), }; } exports.eventarcTriggerMatchingCriteriaToTerraform = eventarcTriggerMatchingCriteriaToTerraform; function eventarcTriggerMatchingCriteriaToHclTerraform(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 = { attribute: { value: cdktf.stringToHclTerraform(struct.attribute), isBlock: false, type: "simple", storageClassType: "string", }, operator: { value: cdktf.stringToHclTerraform(struct.operator), 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.eventarcTriggerMatchingCriteriaToHclTerraform = eventarcTriggerMatchingCriteriaToHclTerraform; class EventarcTriggerMatchingCriteriaOutputReference 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._attribute !== undefined) { hasAnyValues = true; internalValueResult.attribute = this._attribute; } if (this._operator !== undefined) { hasAnyValues = true; internalValueResult.operator = this._operator; } 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._attribute = undefined; this._operator = 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._attribute = value.attribute; this._operator = value.operator; this._value = value.value; } } get attribute() { return this.getStringAttribute('attribute'); } set attribute(value) { this._attribute = value; } // Temporarily expose input value. Use with caution. get attributeInput() { return this._attribute; } get operator() { return this.getStringAttribute('operator'); } set operator(value) { this._operator = value; } resetOperator() { this._operator = undefined; } // Temporarily expose input value. Use with caution. get operatorInput() { return this._operator; } 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.EventarcTriggerMatchingCriteriaOutputReference = EventarcTriggerMatchingCriteriaOutputReference; _f = JSII_RTTI_SYMBOL_1; EventarcTriggerMatchingCriteriaOutputReference[_f] = { fqn: "@cdktf/provider-google.eventarcTrigger.EventarcTriggerMatchingCriteriaOutputReference", version: "14.12.0" }; class EventarcTriggerMatchingCriteriaList 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 EventarcTriggerMatchingCriteriaOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.EventarcTriggerMatchingCriteriaList = EventarcTriggerMatchingCriteriaList; _g = JSII_RTTI_SYMBOL_1; EventarcTriggerMatchingCriteriaList[_g] = { fqn: "@cdktf/provider-google.eventarcTrigger.EventarcTriggerMatchingCriteriaList", version: "14.12.0" }; function eventarcTriggerTimeoutsToTerraform(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.eventarcTriggerTimeoutsToTerraform = eventarcTriggerTimeoutsToTerraform; function eventarcTriggerTimeoutsToHclTerraform(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.eventarcTriggerTimeoutsToHclTerraform = eventarcTriggerTimeoutsToHclTerraform; class EventarcTriggerTimeoutsOutputReference 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.EventarcTriggerTimeoutsOutputReference = EventarcTriggerTimeoutsOutputReference; _h = JSII_RTTI_SYMBOL_1; EventarcTriggerTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-google.eventarcTrigger.EventarcTriggerTimeoutsOutputReference", version: "14.12.0" }; function eventarcTriggerTransportPubsubToTerraform(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 { topic: cdktf.stringToTerraform(struct.topic), }; } exports.eventarcTriggerTransportPubsubToTerraform = eventarcTriggerTransportPubsubToTerraform; function eventarcTriggerTransportPubsubToHclTerraform(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 = { topic: { value: cdktf.stringToHclTerraform(struct.topic), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.eventarcTriggerTransportPubsubToHclTerraform = eventarcTriggerTransportPubsubToHclTerraform; class EventarcTriggerTransportPubsubOutputReference 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._topic !== undefined) { hasAnyValues = true; internalValueResult.topic = this._topic; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._topic = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._topic = value.topic; } } // subscription - computed: true, optional: false, required: false get subscription() { return this.getStringAttribute('subscription'); } get topic() { return this.getStringAttribute('topic'); } set topic(value) { this._topic = value; } resetTopic() { this._topic = undefined; } // Temporarily expose input value. Use with caution. get topicInput() { return this._topic; } } exports.EventarcTriggerTransportPubsubOutputReference = EventarcTriggerTransportPubsubOutputReference; _j = JSII_RTTI_SYMBOL_1; EventarcTriggerTransportPubsubOutputReference[_j] = { fqn: "@cdktf/provider-google.eventarcTrigger.EventarcTriggerTransportPubsubOutputReference", version: "14.12.0" }; function eventarcTriggerTransportToTerraform(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 { pubsub: eventarcTriggerTransportPubsubToTerraform(struct.pubsub), }; } exports.eventarcTriggerTransportToTerraform = eventarcTriggerTransportToTerraform; function eventarcTriggerTransportToHclTerraform(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 = { pubsub: { value: eventarcTriggerTransportPubsubToHclTerraform(struct.pubsub), isBlock: true, type: "list", storageClassType: "EventarcTriggerTransportPubsubList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.eventarcTriggerTransportToHclTerraform = eventarcTriggerTransportToHclTerraform; class EventarcTriggerTransportOutputReference 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; // pubsub - computed: false, optional: true, required: false this._pubsub = new EventarcTriggerTransportPubsubOutputReference(this, "pubsub"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._pubsub?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.pubsub = this._pubsub?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._pubsub.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._pubsub.internalValue = value.pubsub; } } get pubsub() { return this._pubsub; } putPubsub(value) { this._pubsub.internalValue = value; } resetPubsub() { this._pubsub.internalValue = undefined; } // Temporarily expose input value. Use with caution. get pubsubInput() { return this._pubsub.internalValue; } } exports.EventarcTriggerTransportOutputReference = EventarcTriggerTransportOutputReference; _k = JSII_RTTI_SYMBOL_1; EventarcTriggerTransportOutputReference[_k] = { fqn: "@cdktf/provider-google.eventarcTrigger.EventarcTriggerTransportOutputReference", version: "14.12.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/eventarc_trigger google_eventarc_trigger} */ class EventarcTrigger extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a EventarcTrigger 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 EventarcTrigger to import * @param importFromId The id of the existing EventarcTrigger that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/eventarc_trigger#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the EventarcTrigger to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_eventarc_trigger", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/eventarc_trigger google_eventarc_trigger} 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 EventarcTriggerConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_eventarc_trigger', 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 }); // conditions - computed: true, optional: false, required: false this._conditions = new cdktf.StringMap(this, "conditions"); // 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 EventarcTriggerDestinationOutputReference(this, "destination"); // matching_criteria - computed: false, optional: false, required: true this._matchingCriteria = new EventarcTriggerMatchingCriteriaList(this, "matching_criteria", true); // timeouts - computed: false, optional: true, required: false this._timeouts = new EventarcTriggerTimeoutsOutputReference(this, "timeouts"); // transport - computed: false, optional: true, required: false this._transport = new EventarcTriggerTransportOutputReference(this, "transport"); this._channel = config.channel; this._eventDataContentType = config.eventDataContentType; this._id = config.id; this._labels = config.labels; this._location = config.location; this._name = config.name; this._project = config.project; this._serviceAccount = config.serviceAccount; this._destination.internalValue = config.destination; this._matchingCriteria.internalValue = config.matchingCriteria; this._timeouts.internalValue = config.timeouts; this._transport.internalValue = config.transport; } get channel() { return this.getStringAttribute('channel'); } set channel(value) { this._channel = value; } resetChannel() { this._channel = undefined; } // Temporarily expose input value. Use with caution. get channelInput() { return this._channel; } get conditions() { return this._conditions; } // create_time - computed: true, optional: false, required: false get createTime() { return this.getStringAttribute('create_time'); } get effectiveLabels() { return this._effectiveLabels; } // etag - computed: true, optional: false, required: false get etag() { return this.getStringAttribute('etag'); } get eventDataContentType() { return this.getStringAttribute('event_data_content_type'); } set eventDataContentType(value) { this._eventDataContentType = value; } resetEventDataContentType() { this._eventDataContentType = undefined; } // Temporarily expose input value. Use with caution. get eventDataContentTypeInput() { return this._eventDataContentType; } 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 location() { return this.getStringAttribute('location'); } set location(value) { this._location = value; } // Temporarily expose input value. Use with caution. get locationInput() { return this._location; } get name() { return this.getStringAttribute('name'); } set name(value) { this._n