// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function macieS3BucketAssociationClassificationTypeToTerraform(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 {
        continuous: cdktf.stringToTerraform(struct.continuous),
        one_time: cdktf.stringToTerraform(struct.oneTime),
    };
}
export class MacieS3BucketAssociationClassificationTypeOutputReference 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._continuous !== undefined) {
            hasAnyValues = true;
            internalValueResult.continuous = this._continuous;
        }
        if (this._oneTime !== undefined) {
            hasAnyValues = true;
            internalValueResult.oneTime = this._oneTime;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._continuous = undefined;
            this._oneTime = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._continuous = value.continuous;
            this._oneTime = value.oneTime;
        }
    }
    // continuous - computed: false, optional: true, required: false
    _continuous;
    get continuous() {
        return this.getStringAttribute('continuous');
    }
    set continuous(value) {
        this._continuous = value;
    }
    resetContinuous() {
        this._continuous = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get continuousInput() {
        return this._continuous;
    }
    // one_time - computed: false, optional: true, required: false
    _oneTime;
    get oneTime() {
        return this.getStringAttribute('one_time');
    }
    set oneTime(value) {
        this._oneTime = value;
    }
    resetOneTime() {
        this._oneTime = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get oneTimeInput() {
        return this._oneTime;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/macie_s3_bucket_association aws_macie_s3_bucket_association}
*/
export class MacieS3BucketAssociation extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_macie_s3_bucket_association";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/macie_s3_bucket_association aws_macie_s3_bucket_association} 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 MacieS3BucketAssociationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_macie_s3_bucket_association',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._bucketName = config.bucketName;
        this._memberAccountId = config.memberAccountId;
        this._prefix = config.prefix;
        this._classificationType.internalValue = config.classificationType;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // bucket_name - computed: false, optional: false, required: true
    _bucketName;
    get bucketName() {
        return this.getStringAttribute('bucket_name');
    }
    set bucketName(value) {
        this._bucketName = value;
    }
    // Temporarily expose input value. Use with caution.
    get bucketNameInput() {
        return this._bucketName;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // member_account_id - computed: false, optional: true, required: false
    _memberAccountId;
    get memberAccountId() {
        return this.getStringAttribute('member_account_id');
    }
    set memberAccountId(value) {
        this._memberAccountId = value;
    }
    resetMemberAccountId() {
        this._memberAccountId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get memberAccountIdInput() {
        return this._memberAccountId;
    }
    // prefix - computed: false, optional: true, required: false
    _prefix;
    get prefix() {
        return this.getStringAttribute('prefix');
    }
    set prefix(value) {
        this._prefix = value;
    }
    resetPrefix() {
        this._prefix = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get prefixInput() {
        return this._prefix;
    }
    // classification_type - computed: false, optional: true, required: false
    _classificationType = new MacieS3BucketAssociationClassificationTypeOutputReference(this, "classification_type", true);
    get classificationType() {
        return this._classificationType;
    }
    putClassificationType(value) {
        this._classificationType.internalValue = value;
    }
    resetClassificationType() {
        this._classificationType.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get classificationTypeInput() {
        return this._classificationType.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            bucket_name: cdktf.stringToTerraform(this._bucketName),
            member_account_id: cdktf.stringToTerraform(this._memberAccountId),
            prefix: cdktf.stringToTerraform(this._prefix),
            classification_type: macieS3BucketAssociationClassificationTypeToTerraform(this._classificationType.internalValue),
        };
    }
}
//# sourceMappingURL=macie-s3-bucket-association.js.map