// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function s3BucketNotificationLambdaFunctionToTerraform(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 {
        events: cdktf.listMapper(cdktf.stringToTerraform)(struct.events),
        filter_prefix: cdktf.stringToTerraform(struct.filterPrefix),
        filter_suffix: cdktf.stringToTerraform(struct.filterSuffix),
        lambda_function_arn: cdktf.stringToTerraform(struct.lambdaFunctionArn),
    };
}
export function s3BucketNotificationQueueToTerraform(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 {
        events: cdktf.listMapper(cdktf.stringToTerraform)(struct.events),
        filter_prefix: cdktf.stringToTerraform(struct.filterPrefix),
        filter_suffix: cdktf.stringToTerraform(struct.filterSuffix),
        queue_arn: cdktf.stringToTerraform(struct.queueArn),
    };
}
export function s3BucketNotificationTopicToTerraform(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 {
        events: cdktf.listMapper(cdktf.stringToTerraform)(struct.events),
        filter_prefix: cdktf.stringToTerraform(struct.filterPrefix),
        filter_suffix: cdktf.stringToTerraform(struct.filterSuffix),
        topic_arn: cdktf.stringToTerraform(struct.topicArn),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket_notification aws_s3_bucket_notification}
*/
export class S3BucketNotification extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_s3_bucket_notification";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/s3_bucket_notification aws_s3_bucket_notification} 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 S3BucketNotificationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_s3_bucket_notification',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._bucket = config.bucket;
        this._eventbridge = config.eventbridge;
        this._lambdaFunction = config.lambdaFunction;
        this._queue = config.queue;
        this._topic = config.topic;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // bucket - computed: false, optional: false, required: true
    _bucket;
    get bucket() {
        return this.getStringAttribute('bucket');
    }
    set bucket(value) {
        this._bucket = value;
    }
    // Temporarily expose input value. Use with caution.
    get bucketInput() {
        return this._bucket;
    }
    // eventbridge - computed: false, optional: true, required: false
    _eventbridge;
    get eventbridge() {
        return this.getBooleanAttribute('eventbridge');
    }
    set eventbridge(value) {
        this._eventbridge = value;
    }
    resetEventbridge() {
        this._eventbridge = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get eventbridgeInput() {
        return this._eventbridge;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // lambda_function - computed: false, optional: true, required: false
    _lambdaFunction;
    get lambdaFunction() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('lambda_function');
    }
    set lambdaFunction(value) {
        this._lambdaFunction = value;
    }
    resetLambdaFunction() {
        this._lambdaFunction = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get lambdaFunctionInput() {
        return this._lambdaFunction;
    }
    // queue - computed: false, optional: true, required: false
    _queue;
    get queue() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('queue');
    }
    set queue(value) {
        this._queue = value;
    }
    resetQueue() {
        this._queue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get queueInput() {
        return this._queue;
    }
    // topic - computed: false, optional: true, required: false
    _topic;
    get topic() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('topic');
    }
    set topic(value) {
        this._topic = value;
    }
    resetTopic() {
        this._topic = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get topicInput() {
        return this._topic;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            bucket: cdktf.stringToTerraform(this._bucket),
            eventbridge: cdktf.booleanToTerraform(this._eventbridge),
            lambda_function: cdktf.listMapper(s3BucketNotificationLambdaFunctionToTerraform)(this._lambdaFunction),
            queue: cdktf.listMapper(s3BucketNotificationQueueToTerraform)(this._queue),
            topic: cdktf.listMapper(s3BucketNotificationTopicToTerraform)(this._topic),
        };
    }
}
//# sourceMappingURL=s3-bucket-notification.js.map