// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function sesConfigurationSetDeliveryOptionsToTerraform(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 {
        tls_policy: cdktf.stringToTerraform(struct.tlsPolicy),
    };
}
export class SesConfigurationSetDeliveryOptionsOutputReference 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._tlsPolicy !== undefined) {
            hasAnyValues = true;
            internalValueResult.tlsPolicy = this._tlsPolicy;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._tlsPolicy = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._tlsPolicy = value.tlsPolicy;
        }
    }
    // tls_policy - computed: false, optional: true, required: false
    _tlsPolicy;
    get tlsPolicy() {
        return this.getStringAttribute('tls_policy');
    }
    set tlsPolicy(value) {
        this._tlsPolicy = value;
    }
    resetTlsPolicy() {
        this._tlsPolicy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tlsPolicyInput() {
        return this._tlsPolicy;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/ses_configuration_set aws_ses_configuration_set}
*/
export class SesConfigurationSet extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_ses_configuration_set";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/ses_configuration_set aws_ses_configuration_set} 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 SesConfigurationSetConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_ses_configuration_set',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._name = config.name;
        this._reputationMetricsEnabled = config.reputationMetricsEnabled;
        this._sendingEnabled = config.sendingEnabled;
        this._deliveryOptions.internalValue = config.deliveryOptions;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // last_fresh_start - computed: true, optional: false, required: false
    get lastFreshStart() {
        return this.getStringAttribute('last_fresh_start');
    }
    // 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;
    }
    // reputation_metrics_enabled - computed: false, optional: true, required: false
    _reputationMetricsEnabled;
    get reputationMetricsEnabled() {
        return this.getBooleanAttribute('reputation_metrics_enabled');
    }
    set reputationMetricsEnabled(value) {
        this._reputationMetricsEnabled = value;
    }
    resetReputationMetricsEnabled() {
        this._reputationMetricsEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get reputationMetricsEnabledInput() {
        return this._reputationMetricsEnabled;
    }
    // sending_enabled - computed: false, optional: true, required: false
    _sendingEnabled;
    get sendingEnabled() {
        return this.getBooleanAttribute('sending_enabled');
    }
    set sendingEnabled(value) {
        this._sendingEnabled = value;
    }
    resetSendingEnabled() {
        this._sendingEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sendingEnabledInput() {
        return this._sendingEnabled;
    }
    // delivery_options - computed: false, optional: true, required: false
    _deliveryOptions = new SesConfigurationSetDeliveryOptionsOutputReference(this, "delivery_options", true);
    get deliveryOptions() {
        return this._deliveryOptions;
    }
    putDeliveryOptions(value) {
        this._deliveryOptions.internalValue = value;
    }
    resetDeliveryOptions() {
        this._deliveryOptions.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deliveryOptionsInput() {
        return this._deliveryOptions.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            name: cdktf.stringToTerraform(this._name),
            reputation_metrics_enabled: cdktf.booleanToTerraform(this._reputationMetricsEnabled),
            sending_enabled: cdktf.booleanToTerraform(this._sendingEnabled),
            delivery_options: sesConfigurationSetDeliveryOptionsToTerraform(this._deliveryOptions.internalValue),
        };
    }
}
//# sourceMappingURL=ses-configuration-set.js.map