// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function sesReceiptRuleAddHeaderActionToTerraform(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 {
        header_name: cdktf.stringToTerraform(struct.headerName),
        header_value: cdktf.stringToTerraform(struct.headerValue),
        position: cdktf.numberToTerraform(struct.position),
    };
}
export function sesReceiptRuleBounceActionToTerraform(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 {
        message: cdktf.stringToTerraform(struct.message),
        position: cdktf.numberToTerraform(struct.position),
        sender: cdktf.stringToTerraform(struct.sender),
        smtp_reply_code: cdktf.stringToTerraform(struct.smtpReplyCode),
        status_code: cdktf.stringToTerraform(struct.statusCode),
        topic_arn: cdktf.stringToTerraform(struct.topicArn),
    };
}
export function sesReceiptRuleLambdaActionToTerraform(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 {
        function_arn: cdktf.stringToTerraform(struct.functionArn),
        invocation_type: cdktf.stringToTerraform(struct.invocationType),
        position: cdktf.numberToTerraform(struct.position),
        topic_arn: cdktf.stringToTerraform(struct.topicArn),
    };
}
export function sesReceiptRuleS3ActionToTerraform(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 {
        bucket_name: cdktf.stringToTerraform(struct.bucketName),
        kms_key_arn: cdktf.stringToTerraform(struct.kmsKeyArn),
        object_key_prefix: cdktf.stringToTerraform(struct.objectKeyPrefix),
        position: cdktf.numberToTerraform(struct.position),
        topic_arn: cdktf.stringToTerraform(struct.topicArn),
    };
}
export function sesReceiptRuleSnsActionToTerraform(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 {
        encoding: cdktf.stringToTerraform(struct.encoding),
        position: cdktf.numberToTerraform(struct.position),
        topic_arn: cdktf.stringToTerraform(struct.topicArn),
    };
}
export function sesReceiptRuleStopActionToTerraform(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 {
        position: cdktf.numberToTerraform(struct.position),
        scope: cdktf.stringToTerraform(struct.scope),
        topic_arn: cdktf.stringToTerraform(struct.topicArn),
    };
}
export function sesReceiptRuleWorkmailActionToTerraform(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 {
        organization_arn: cdktf.stringToTerraform(struct.organizationArn),
        position: cdktf.numberToTerraform(struct.position),
        topic_arn: cdktf.stringToTerraform(struct.topicArn),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/ses_receipt_rule aws_ses_receipt_rule}
*/
export class SesReceiptRule extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_ses_receipt_rule";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/ses_receipt_rule aws_ses_receipt_rule} 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 SesReceiptRuleConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_ses_receipt_rule',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._after = config.after;
        this._enabled = config.enabled;
        this._name = config.name;
        this._recipients = config.recipients;
        this._ruleSetName = config.ruleSetName;
        this._scanEnabled = config.scanEnabled;
        this._tlsPolicy = config.tlsPolicy;
        this._addHeaderAction = config.addHeaderAction;
        this._bounceAction = config.bounceAction;
        this._lambdaAction = config.lambdaAction;
        this._s3Action = config.s3Action;
        this._snsAction = config.snsAction;
        this._stopAction = config.stopAction;
        this._workmailAction = config.workmailAction;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // after - computed: false, optional: true, required: false
    _after;
    get after() {
        return this.getStringAttribute('after');
    }
    set after(value) {
        this._after = value;
    }
    resetAfter() {
        this._after = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get afterInput() {
        return this._after;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // enabled - computed: false, optional: true, required: false
    _enabled;
    get enabled() {
        return this.getBooleanAttribute('enabled');
    }
    set enabled(value) {
        this._enabled = value;
    }
    resetEnabled() {
        this._enabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enabledInput() {
        return this._enabled;
    }
    // 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;
    }
    // recipients - computed: false, optional: true, required: false
    _recipients;
    get recipients() {
        return cdktf.Fn.tolist(this.getListAttribute('recipients'));
    }
    set recipients(value) {
        this._recipients = value;
    }
    resetRecipients() {
        this._recipients = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get recipientsInput() {
        return this._recipients;
    }
    // rule_set_name - computed: false, optional: false, required: true
    _ruleSetName;
    get ruleSetName() {
        return this.getStringAttribute('rule_set_name');
    }
    set ruleSetName(value) {
        this._ruleSetName = value;
    }
    // Temporarily expose input value. Use with caution.
    get ruleSetNameInput() {
        return this._ruleSetName;
    }
    // scan_enabled - computed: false, optional: true, required: false
    _scanEnabled;
    get scanEnabled() {
        return this.getBooleanAttribute('scan_enabled');
    }
    set scanEnabled(value) {
        this._scanEnabled = value;
    }
    resetScanEnabled() {
        this._scanEnabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get scanEnabledInput() {
        return this._scanEnabled;
    }
    // tls_policy - computed: true, 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;
    }
    // add_header_action - computed: false, optional: true, required: false
    _addHeaderAction;
    get addHeaderAction() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('add_header_action')));
    }
    set addHeaderAction(value) {
        this._addHeaderAction = value;
    }
    resetAddHeaderAction() {
        this._addHeaderAction = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get addHeaderActionInput() {
        return this._addHeaderAction;
    }
    // bounce_action - computed: false, optional: true, required: false
    _bounceAction;
    get bounceAction() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('bounce_action')));
    }
    set bounceAction(value) {
        this._bounceAction = value;
    }
    resetBounceAction() {
        this._bounceAction = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get bounceActionInput() {
        return this._bounceAction;
    }
    // lambda_action - computed: false, optional: true, required: false
    _lambdaAction;
    get lambdaAction() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('lambda_action')));
    }
    set lambdaAction(value) {
        this._lambdaAction = value;
    }
    resetLambdaAction() {
        this._lambdaAction = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get lambdaActionInput() {
        return this._lambdaAction;
    }
    // s3_action - computed: false, optional: true, required: false
    _s3Action;
    get s3Action() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('s3_action')));
    }
    set s3Action(value) {
        this._s3Action = value;
    }
    resetS3Action() {
        this._s3Action = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get s3ActionInput() {
        return this._s3Action;
    }
    // sns_action - computed: false, optional: true, required: false
    _snsAction;
    get snsAction() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('sns_action')));
    }
    set snsAction(value) {
        this._snsAction = value;
    }
    resetSnsAction() {
        this._snsAction = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get snsActionInput() {
        return this._snsAction;
    }
    // stop_action - computed: false, optional: true, required: false
    _stopAction;
    get stopAction() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('stop_action')));
    }
    set stopAction(value) {
        this._stopAction = value;
    }
    resetStopAction() {
        this._stopAction = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get stopActionInput() {
        return this._stopAction;
    }
    // workmail_action - computed: false, optional: true, required: false
    _workmailAction;
    get workmailAction() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('workmail_action')));
    }
    set workmailAction(value) {
        this._workmailAction = value;
    }
    resetWorkmailAction() {
        this._workmailAction = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get workmailActionInput() {
        return this._workmailAction;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            after: cdktf.stringToTerraform(this._after),
            enabled: cdktf.booleanToTerraform(this._enabled),
            name: cdktf.stringToTerraform(this._name),
            recipients: cdktf.listMapper(cdktf.stringToTerraform)(this._recipients),
            rule_set_name: cdktf.stringToTerraform(this._ruleSetName),
            scan_enabled: cdktf.booleanToTerraform(this._scanEnabled),
            tls_policy: cdktf.stringToTerraform(this._tlsPolicy),
            add_header_action: cdktf.listMapper(sesReceiptRuleAddHeaderActionToTerraform)(this._addHeaderAction),
            bounce_action: cdktf.listMapper(sesReceiptRuleBounceActionToTerraform)(this._bounceAction),
            lambda_action: cdktf.listMapper(sesReceiptRuleLambdaActionToTerraform)(this._lambdaAction),
            s3_action: cdktf.listMapper(sesReceiptRuleS3ActionToTerraform)(this._s3Action),
            sns_action: cdktf.listMapper(sesReceiptRuleSnsActionToTerraform)(this._snsAction),
            stop_action: cdktf.listMapper(sesReceiptRuleStopActionToTerraform)(this._stopAction),
            workmail_action: cdktf.listMapper(sesReceiptRuleWorkmailActionToTerraform)(this._workmailAction),
        };
    }
}
//# sourceMappingURL=ses-receipt-rule.js.map