// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function configDeliveryChannelSnapshotDeliveryPropertiesToTerraform(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 {
        delivery_frequency: cdktf.stringToTerraform(struct.deliveryFrequency),
    };
}
export class ConfigDeliveryChannelSnapshotDeliveryPropertiesOutputReference 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._deliveryFrequency !== undefined) {
            hasAnyValues = true;
            internalValueResult.deliveryFrequency = this._deliveryFrequency;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._deliveryFrequency = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._deliveryFrequency = value.deliveryFrequency;
        }
    }
    // delivery_frequency - computed: false, optional: true, required: false
    _deliveryFrequency;
    get deliveryFrequency() {
        return this.getStringAttribute('delivery_frequency');
    }
    set deliveryFrequency(value) {
        this._deliveryFrequency = value;
    }
    resetDeliveryFrequency() {
        this._deliveryFrequency = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deliveryFrequencyInput() {
        return this._deliveryFrequency;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/config_delivery_channel aws_config_delivery_channel}
*/
export class ConfigDeliveryChannel extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_config_delivery_channel";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/config_delivery_channel aws_config_delivery_channel} 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 ConfigDeliveryChannelConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_config_delivery_channel',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._name = config.name;
        this._s3BucketName = config.s3BucketName;
        this._s3KeyPrefix = config.s3KeyPrefix;
        this._s3KmsKeyArn = config.s3KmsKeyArn;
        this._snsTopicArn = config.snsTopicArn;
        this._snapshotDeliveryProperties.internalValue = config.snapshotDeliveryProperties;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // name - computed: false, optional: true, required: false
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    resetName() {
        this._name = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // s3_bucket_name - computed: false, optional: false, required: true
    _s3BucketName;
    get s3BucketName() {
        return this.getStringAttribute('s3_bucket_name');
    }
    set s3BucketName(value) {
        this._s3BucketName = value;
    }
    // Temporarily expose input value. Use with caution.
    get s3BucketNameInput() {
        return this._s3BucketName;
    }
    // s3_key_prefix - computed: false, optional: true, required: false
    _s3KeyPrefix;
    get s3KeyPrefix() {
        return this.getStringAttribute('s3_key_prefix');
    }
    set s3KeyPrefix(value) {
        this._s3KeyPrefix = value;
    }
    resetS3KeyPrefix() {
        this._s3KeyPrefix = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get s3KeyPrefixInput() {
        return this._s3KeyPrefix;
    }
    // s3_kms_key_arn - computed: false, optional: true, required: false
    _s3KmsKeyArn;
    get s3KmsKeyArn() {
        return this.getStringAttribute('s3_kms_key_arn');
    }
    set s3KmsKeyArn(value) {
        this._s3KmsKeyArn = value;
    }
    resetS3KmsKeyArn() {
        this._s3KmsKeyArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get s3KmsKeyArnInput() {
        return this._s3KmsKeyArn;
    }
    // sns_topic_arn - computed: false, optional: true, required: false
    _snsTopicArn;
    get snsTopicArn() {
        return this.getStringAttribute('sns_topic_arn');
    }
    set snsTopicArn(value) {
        this._snsTopicArn = value;
    }
    resetSnsTopicArn() {
        this._snsTopicArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get snsTopicArnInput() {
        return this._snsTopicArn;
    }
    // snapshot_delivery_properties - computed: false, optional: true, required: false
    _snapshotDeliveryProperties = new ConfigDeliveryChannelSnapshotDeliveryPropertiesOutputReference(this, "snapshot_delivery_properties", true);
    get snapshotDeliveryProperties() {
        return this._snapshotDeliveryProperties;
    }
    putSnapshotDeliveryProperties(value) {
        this._snapshotDeliveryProperties.internalValue = value;
    }
    resetSnapshotDeliveryProperties() {
        this._snapshotDeliveryProperties.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get snapshotDeliveryPropertiesInput() {
        return this._snapshotDeliveryProperties.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            name: cdktf.stringToTerraform(this._name),
            s3_bucket_name: cdktf.stringToTerraform(this._s3BucketName),
            s3_key_prefix: cdktf.stringToTerraform(this._s3KeyPrefix),
            s3_kms_key_arn: cdktf.stringToTerraform(this._s3KmsKeyArn),
            sns_topic_arn: cdktf.stringToTerraform(this._snsTopicArn),
            snapshot_delivery_properties: configDeliveryChannelSnapshotDeliveryPropertiesToTerraform(this._snapshotDeliveryProperties.internalValue),
        };
    }
}
//# sourceMappingURL=config-delivery-channel.js.map