// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function redshiftScheduledActionTargetActionPauseClusterToTerraform(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_identifier: cdktf.stringToTerraform(struct.clusterIdentifier),
    };
}
export class RedshiftScheduledActionTargetActionPauseClusterOutputReference extends cdktf.ComplexObject {
    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
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._clusterIdentifier !== undefined) {
            hasAnyValues = true;
            internalValueResult.clusterIdentifier = this._clusterIdentifier;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._clusterIdentifier = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._clusterIdentifier = value.clusterIdentifier;
        }
    }
    // cluster_identifier - computed: false, optional: false, required: true
    _clusterIdentifier;
    get clusterIdentifier() {
        return this.getStringAttribute('cluster_identifier');
    }
    set clusterIdentifier(value) {
        this._clusterIdentifier = value;
    }
    // Temporarily expose input value. Use with caution.
    get clusterIdentifierInput() {
        return this._clusterIdentifier;
    }
}
export function redshiftScheduledActionTargetActionResizeClusterToTerraform(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 {
        classic: cdktf.booleanToTerraform(struct.classic),
        cluster_identifier: cdktf.stringToTerraform(struct.clusterIdentifier),
        cluster_type: cdktf.stringToTerraform(struct.clusterType),
        node_type: cdktf.stringToTerraform(struct.nodeType),
        number_of_nodes: cdktf.numberToTerraform(struct.numberOfNodes),
    };
}
export class RedshiftScheduledActionTargetActionResizeClusterOutputReference extends cdktf.ComplexObject {
    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
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._classic !== undefined) {
            hasAnyValues = true;
            internalValueResult.classic = this._classic;
        }
        if (this._clusterIdentifier !== undefined) {
            hasAnyValues = true;
            internalValueResult.clusterIdentifier = this._clusterIdentifier;
        }
        if (this._clusterType !== undefined) {
            hasAnyValues = true;
            internalValueResult.clusterType = this._clusterType;
        }
        if (this._nodeType !== undefined) {
            hasAnyValues = true;
            internalValueResult.nodeType = this._nodeType;
        }
        if (this._numberOfNodes !== undefined) {
            hasAnyValues = true;
            internalValueResult.numberOfNodes = this._numberOfNodes;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._classic = undefined;
            this._clusterIdentifier = undefined;
            this._clusterType = undefined;
            this._nodeType = undefined;
            this._numberOfNodes = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._classic = value.classic;
            this._clusterIdentifier = value.clusterIdentifier;
            this._clusterType = value.clusterType;
            this._nodeType = value.nodeType;
            this._numberOfNodes = value.numberOfNodes;
        }
    }
    // classic - computed: false, optional: true, required: false
    _classic;
    get classic() {
        return this.getBooleanAttribute('classic');
    }
    set classic(value) {
        this._classic = value;
    }
    resetClassic() {
        this._classic = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get classicInput() {
        return this._classic;
    }
    // cluster_identifier - computed: false, optional: false, required: true
    _clusterIdentifier;
    get clusterIdentifier() {
        return this.getStringAttribute('cluster_identifier');
    }
    set clusterIdentifier(value) {
        this._clusterIdentifier = value;
    }
    // Temporarily expose input value. Use with caution.
    get clusterIdentifierInput() {
        return this._clusterIdentifier;
    }
    // cluster_type - computed: false, optional: true, required: false
    _clusterType;
    get clusterType() {
        return this.getStringAttribute('cluster_type');
    }
    set clusterType(value) {
        this._clusterType = value;
    }
    resetClusterType() {
        this._clusterType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get clusterTypeInput() {
        return this._clusterType;
    }
    // node_type - computed: false, optional: true, required: false
    _nodeType;
    get nodeType() {
        return this.getStringAttribute('node_type');
    }
    set nodeType(value) {
        this._nodeType = value;
    }
    resetNodeType() {
        this._nodeType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nodeTypeInput() {
        return this._nodeType;
    }
    // number_of_nodes - computed: false, optional: true, required: false
    _numberOfNodes;
    get numberOfNodes() {
        return this.getNumberAttribute('number_of_nodes');
    }
    set numberOfNodes(value) {
        this._numberOfNodes = value;
    }
    resetNumberOfNodes() {
        this._numberOfNodes = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get numberOfNodesInput() {
        return this._numberOfNodes;
    }
}
export function redshiftScheduledActionTargetActionResumeClusterToTerraform(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_identifier: cdktf.stringToTerraform(struct.clusterIdentifier),
    };
}
export class RedshiftScheduledActionTargetActionResumeClusterOutputReference extends cdktf.ComplexObject {
    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
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._clusterIdentifier !== undefined) {
            hasAnyValues = true;
            internalValueResult.clusterIdentifier = this._clusterIdentifier;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._clusterIdentifier = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._clusterIdentifier = value.clusterIdentifier;
        }
    }
    // cluster_identifier - computed: false, optional: false, required: true
    _clusterIdentifier;
    get clusterIdentifier() {
        return this.getStringAttribute('cluster_identifier');
    }
    set clusterIdentifier(value) {
        this._clusterIdentifier = value;
    }
    // Temporarily expose input value. Use with caution.
    get clusterIdentifierInput() {
        return this._clusterIdentifier;
    }
}
export function redshiftScheduledActionTargetActionToTerraform(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 {
        pause_cluster: redshiftScheduledActionTargetActionPauseClusterToTerraform(struct.pauseCluster),
        resize_cluster: redshiftScheduledActionTargetActionResizeClusterToTerraform(struct.resizeCluster),
        resume_cluster: redshiftScheduledActionTargetActionResumeClusterToTerraform(struct.resumeCluster),
    };
}
export class RedshiftScheduledActionTargetActionOutputReference extends cdktf.ComplexObject {
    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
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._pauseCluster?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.pauseCluster = this._pauseCluster?.internalValue;
        }
        if (this._resizeCluster?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.resizeCluster = this._resizeCluster?.internalValue;
        }
        if (this._resumeCluster?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.resumeCluster = this._resumeCluster?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._pauseCluster.internalValue = undefined;
            this._resizeCluster.internalValue = undefined;
            this._resumeCluster.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._pauseCluster.internalValue = value.pauseCluster;
            this._resizeCluster.internalValue = value.resizeCluster;
            this._resumeCluster.internalValue = value.resumeCluster;
        }
    }
    // pause_cluster - computed: false, optional: true, required: false
    _pauseCluster = new RedshiftScheduledActionTargetActionPauseClusterOutputReference(this, "pause_cluster", true);
    get pauseCluster() {
        return this._pauseCluster;
    }
    putPauseCluster(value) {
        this._pauseCluster.internalValue = value;
    }
    resetPauseCluster() {
        this._pauseCluster.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get pauseClusterInput() {
        return this._pauseCluster.internalValue;
    }
    // resize_cluster - computed: false, optional: true, required: false
    _resizeCluster = new RedshiftScheduledActionTargetActionResizeClusterOutputReference(this, "resize_cluster", true);
    get resizeCluster() {
        return this._resizeCluster;
    }
    putResizeCluster(value) {
        this._resizeCluster.internalValue = value;
    }
    resetResizeCluster() {
        this._resizeCluster.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resizeClusterInput() {
        return this._resizeCluster.internalValue;
    }
    // resume_cluster - computed: false, optional: true, required: false
    _resumeCluster = new RedshiftScheduledActionTargetActionResumeClusterOutputReference(this, "resume_cluster", true);
    get resumeCluster() {
        return this._resumeCluster;
    }
    putResumeCluster(value) {
        this._resumeCluster.internalValue = value;
    }
    resetResumeCluster() {
        this._resumeCluster.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get resumeClusterInput() {
        return this._resumeCluster.internalValue;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/redshift_scheduled_action aws_redshift_scheduled_action}
*/
export class RedshiftScheduledAction extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_redshift_scheduled_action";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/redshift_scheduled_action aws_redshift_scheduled_action} 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 RedshiftScheduledActionConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_redshift_scheduled_action',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._enable = config.enable;
        this._endTime = config.endTime;
        this._iamRole = config.iamRole;
        this._name = config.name;
        this._schedule = config.schedule;
        this._startTime = config.startTime;
        this._targetAction.internalValue = config.targetAction;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // description - computed: false, optional: true, required: false
    _description;
    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;
    }
    // enable - computed: false, optional: true, required: false
    _enable;
    get enable() {
        return this.getBooleanAttribute('enable');
    }
    set enable(value) {
        this._enable = value;
    }
    resetEnable() {
        this._enable = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableInput() {
        return this._enable;
    }
    // end_time - computed: false, optional: true, required: false
    _endTime;
    get endTime() {
        return this.getStringAttribute('end_time');
    }
    set endTime(value) {
        this._endTime = value;
    }
    resetEndTime() {
        this._endTime = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get endTimeInput() {
        return this._endTime;
    }
    // iam_role - computed: false, optional: false, required: true
    _iamRole;
    get iamRole() {
        return this.getStringAttribute('iam_role');
    }
    set iamRole(value) {
        this._iamRole = value;
    }
    // Temporarily expose input value. Use with caution.
    get iamRoleInput() {
        return this._iamRole;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // name - computed: false, optional: false, required: true
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // schedule - computed: false, optional: false, required: true
    _schedule;
    get schedule() {
        return this.getStringAttribute('schedule');
    }
    set schedule(value) {
        this._schedule = value;
    }
    // Temporarily expose input value. Use with caution.
    get scheduleInput() {
        return this._schedule;
    }
    // start_time - computed: false, optional: true, required: false
    _startTime;
    get startTime() {
        return this.getStringAttribute('start_time');
    }
    set startTime(value) {
        this._startTime = value;
    }
    resetStartTime() {
        this._startTime = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get startTimeInput() {
        return this._startTime;
    }
    // target_action - computed: false, optional: false, required: true
    _targetAction = new RedshiftScheduledActionTargetActionOutputReference(this, "target_action", true);
    get targetAction() {
        return this._targetAction;
    }
    putTargetAction(value) {
        this._targetAction.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get targetActionInput() {
        return this._targetAction.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            description: cdktf.stringToTerraform(this._description),
            enable: cdktf.booleanToTerraform(this._enable),
            end_time: cdktf.stringToTerraform(this._endTime),
            iam_role: cdktf.stringToTerraform(this._iamRole),
            name: cdktf.stringToTerraform(this._name),
            schedule: cdktf.stringToTerraform(this._schedule),
            start_time: cdktf.stringToTerraform(this._startTime),
            target_action: redshiftScheduledActionTargetActionToTerraform(this._targetAction.internalValue),
        };
    }
}
//# sourceMappingURL=redshift-scheduled-action.js.map