UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

338 lines 46.1 kB
"use strict"; var _a, _b; Object.defineProperty(exports, "__esModule", { value: true }); exports.IapWebCloudRunServiceIamMember = exports.IapWebCloudRunServiceIamMemberConditionOutputReference = void 0; exports.iapWebCloudRunServiceIamMemberConditionToTerraform = iapWebCloudRunServiceIamMemberConditionToTerraform; exports.iapWebCloudRunServiceIamMemberConditionToHclTerraform = iapWebCloudRunServiceIamMemberConditionToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function iapWebCloudRunServiceIamMemberConditionToTerraform(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 { description: cdktf.stringToTerraform(struct.description), expression: cdktf.stringToTerraform(struct.expression), title: cdktf.stringToTerraform(struct.title), }; } function iapWebCloudRunServiceIamMemberConditionToHclTerraform(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 = { description: { value: cdktf.stringToHclTerraform(struct.description), isBlock: false, type: "simple", storageClassType: "string", }, expression: { value: cdktf.stringToHclTerraform(struct.expression), isBlock: false, type: "simple", storageClassType: "string", }, title: { value: cdktf.stringToHclTerraform(struct.title), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class IapWebCloudRunServiceIamMemberConditionOutputReference 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._description !== undefined) { hasAnyValues = true; internalValueResult.description = this._description; } if (this._expression !== undefined) { hasAnyValues = true; internalValueResult.expression = this._expression; } if (this._title !== undefined) { hasAnyValues = true; internalValueResult.title = this._title; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._description = undefined; this._expression = undefined; this._title = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._description = value.description; this._expression = value.expression; this._title = value.title; } } 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 expression() { return this.getStringAttribute('expression'); } set expression(value) { this._expression = value; } // Temporarily expose input value. Use with caution. get expressionInput() { return this._expression; } get title() { return this.getStringAttribute('title'); } set title(value) { this._title = value; } // Temporarily expose input value. Use with caution. get titleInput() { return this._title; } } exports.IapWebCloudRunServiceIamMemberConditionOutputReference = IapWebCloudRunServiceIamMemberConditionOutputReference; _a = JSII_RTTI_SYMBOL_1; IapWebCloudRunServiceIamMemberConditionOutputReference[_a] = { fqn: "@cdktf/provider-google.iapWebCloudRunServiceIamMember.IapWebCloudRunServiceIamMemberConditionOutputReference", version: "14.35.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/iap_web_cloud_run_service_iam_member google_iap_web_cloud_run_service_iam_member} */ class IapWebCloudRunServiceIamMember extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a IapWebCloudRunServiceIamMember 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 IapWebCloudRunServiceIamMember to import * @param importFromId The id of the existing IapWebCloudRunServiceIamMember that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/iap_web_cloud_run_service_iam_member#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the IapWebCloudRunServiceIamMember to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_iap_web_cloud_run_service_iam_member", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/iap_web_cloud_run_service_iam_member google_iap_web_cloud_run_service_iam_member} 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 IapWebCloudRunServiceIamMemberConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_iap_web_cloud_run_service_iam_member', terraformGeneratorMetadata: { providerName: 'google', providerVersion: '6.36.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 }); // condition - computed: false, optional: true, required: false this._condition = new IapWebCloudRunServiceIamMemberConditionOutputReference(this, "condition"); this._cloudRunServiceName = config.cloudRunServiceName; this._id = config.id; this._location = config.location; this._member = config.member; this._project = config.project; this._role = config.role; this._condition.internalValue = config.condition; } get cloudRunServiceName() { return this.getStringAttribute('cloud_run_service_name'); } set cloudRunServiceName(value) { this._cloudRunServiceName = value; } // Temporarily expose input value. Use with caution. get cloudRunServiceNameInput() { return this._cloudRunServiceName; } // etag - computed: true, optional: false, required: false get etag() { return this.getStringAttribute('etag'); } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get location() { return this.getStringAttribute('location'); } set location(value) { this._location = value; } resetLocation() { this._location = undefined; } // Temporarily expose input value. Use with caution. get locationInput() { return this._location; } get member() { return this.getStringAttribute('member'); } set member(value) { this._member = value; } // Temporarily expose input value. Use with caution. get memberInput() { return this._member; } 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 role() { return this.getStringAttribute('role'); } set role(value) { this._role = value; } // Temporarily expose input value. Use with caution. get roleInput() { return this._role; } get condition() { return this._condition; } putCondition(value) { this._condition.internalValue = value; } resetCondition() { this._condition.internalValue = undefined; } // Temporarily expose input value. Use with caution. get conditionInput() { return this._condition.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { cloud_run_service_name: cdktf.stringToTerraform(this._cloudRunServiceName), id: cdktf.stringToTerraform(this._id), location: cdktf.stringToTerraform(this._location), member: cdktf.stringToTerraform(this._member), project: cdktf.stringToTerraform(this._project), role: cdktf.stringToTerraform(this._role), condition: iapWebCloudRunServiceIamMemberConditionToTerraform(this._condition.internalValue), }; } synthesizeHclAttributes() { const attrs = { cloud_run_service_name: { value: cdktf.stringToHclTerraform(this._cloudRunServiceName), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false, type: "simple", storageClassType: "string", }, location: { value: cdktf.stringToHclTerraform(this._location), isBlock: false, type: "simple", storageClassType: "string", }, member: { value: cdktf.stringToHclTerraform(this._member), isBlock: false, type: "simple", storageClassType: "string", }, project: { value: cdktf.stringToHclTerraform(this._project), isBlock: false, type: "simple", storageClassType: "string", }, role: { value: cdktf.stringToHclTerraform(this._role), isBlock: false, type: "simple", storageClassType: "string", }, condition: { value: iapWebCloudRunServiceIamMemberConditionToHclTerraform(this._condition.internalValue), isBlock: true, type: "list", storageClassType: "IapWebCloudRunServiceIamMemberConditionList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } } exports.IapWebCloudRunServiceIamMember = IapWebCloudRunServiceIamMember; _b = JSII_RTTI_SYMBOL_1; IapWebCloudRunServiceIamMember[_b] = { fqn: "@cdktf/provider-google.iapWebCloudRunServiceIamMember.IapWebCloudRunServiceIamMember", version: "14.35.0" }; // ================= // STATIC PROPERTIES // ================= IapWebCloudRunServiceIamMember.tfResourceType = "google_iap_web_clo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