// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Connect */ export interface ConnectContactFlowConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#content ConnectContactFlow#content} */ readonly content?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#content_hash ConnectContactFlow#content_hash} */ readonly contentHash?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#description ConnectContactFlow#description} */ readonly description?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#filename ConnectContactFlow#filename} */ readonly filename?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#instance_id ConnectContactFlow#instance_id} */ readonly instanceId: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#name ConnectContactFlow#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#tags ConnectContactFlow#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#tags_all ConnectContactFlow#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#type ConnectContactFlow#type} */ readonly type?: string; /** * timeouts block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#timeouts ConnectContactFlow#timeouts} */ readonly timeouts?: ConnectContactFlowTimeouts; } export interface ConnectContactFlowTimeouts { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#create ConnectContactFlow#create} */ readonly create?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html#update ConnectContactFlow#update} */ readonly update?: string; } export function connectContactFlowTimeoutsToTerraform(struct?: ConnectContactFlowTimeoutsOutputReference | ConnectContactFlowTimeouts): any { if (!cdktf.canInspect(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), update: cdktf.stringToTerraform(struct!.update), } } export class ConnectContactFlowTimeoutsOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ConnectContactFlowTimeouts | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ConnectContactFlowTimeouts | undefined) { if (value === undefined) { this.isEmptyObject = false; this._create = undefined; this._update = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._create = value.create; this._update = value.update; } } // create - computed: false, optional: true, required: false private _create?: string; public get create() { return this.getStringAttribute('create'); } public set create(value: string) { this._create = value; } public resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. public get createInput() { return this._create; } // update - computed: false, optional: true, required: false private _update?: string; public get update() { return this.getStringAttribute('update'); } public set update(value: string) { this._update = value; } public resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. public get updateInput() { return this._update; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html aws_connect_contact_flow} */ export class ConnectContactFlow extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_connect_contact_flow"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/connect_contact_flow.html aws_connect_contact_flow} 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 ConnectContactFlowConfig */ public constructor(scope: Construct, id: string, config: ConnectContactFlowConfig) { super(scope, id, { terraformResourceType: 'aws_connect_contact_flow', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._content = config.content; this._contentHash = config.contentHash; this._description = config.description; this._filename = config.filename; this._instanceId = config.instanceId; this._name = config.name; this._tags = config.tags; this._tagsAll = config.tagsAll; this._type = config.type; this._timeouts.internalValue = config.timeouts; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // contact_flow_id - computed: true, optional: false, required: false public get contactFlowId() { return this.getStringAttribute('contact_flow_id'); } // content - computed: true, optional: true, required: false private _content?: string; public get content() { return this.getStringAttribute('content'); } public set content(value: string) { this._content = value; } public resetContent() { this._content = undefined; } // Temporarily expose input value. Use with caution. public get contentInput() { return this._content; } // content_hash - computed: false, optional: true, required: false private _contentHash?: string; public get contentHash() { return this.getStringAttribute('content_hash'); } public set contentHash(value: string) { this._contentHash = value; } public resetContentHash() { this._contentHash = undefined; } // Temporarily expose input value. Use with caution. public get contentHashInput() { return this._contentHash; } // description - computed: false, optional: true, required: false private _description?: string; public get description() { return this.getStringAttribute('description'); } public set description(value: string) { this._description = value; } public resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. public get descriptionInput() { return this._description; } // filename - computed: false, optional: true, required: false private _filename?: string; public get filename() { return this.getStringAttribute('filename'); } public set filename(value: string) { this._filename = value; } public resetFilename() { this._filename = undefined; } // Temporarily expose input value. Use with caution. public get filenameInput() { return this._filename; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // instance_id - computed: false, optional: false, required: true private _instanceId?: string; public get instanceId() { return this.getStringAttribute('instance_id'); } public set instanceId(value: string) { this._instanceId = value; } // Temporarily expose input value. Use with caution. public get instanceIdInput() { return this._instanceId; } // name - computed: false, optional: false, required: true private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } // Temporarily expose input value. Use with caution. public get nameInput() { return this._name; } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // tags_all - computed: true, optional: true, required: false private _tagsAll?: { [key: string]: string } | cdktf.IResolvable; public get tagsAll() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags_all') as any; } public set tagsAll(value: { [key: string]: string } | cdktf.IResolvable) { this._tagsAll = value; } public resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. public get tagsAllInput() { return this._tagsAll; } // type - computed: false, optional: true, required: false private _type?: string; public get type() { return this.getStringAttribute('type'); } public set type(value: string) { this._type = value; } public resetType() { this._type = undefined; } // Temporarily expose input value. Use with caution. public get typeInput() { return this._type; } // timeouts - computed: false, optional: true, required: false private _timeouts = new ConnectContactFlowTimeoutsOutputReference(this as any, "timeouts", true); public get timeouts() { return this._timeouts; } public putTimeouts(value: ConnectContactFlowTimeouts) { this._timeouts.internalValue = value; } public resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get timeoutsInput() { return this._timeouts.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { content: cdktf.stringToTerraform(this._content), content_hash: cdktf.stringToTerraform(this._contentHash), description: cdktf.stringToTerraform(this._description), filename: cdktf.stringToTerraform(this._filename), instance_id: cdktf.stringToTerraform(this._instanceId), name: cdktf.stringToTerraform(this._name), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), type: cdktf.stringToTerraform(this._type), timeouts: connectContactFlowTimeoutsToTerraform(this._timeouts.internalValue), }; } }