// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function codecommitTriggerTriggerToTerraform(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 {
        branches: cdktf.listMapper(cdktf.stringToTerraform)(struct.branches),
        custom_data: cdktf.stringToTerraform(struct.customData),
        destination_arn: cdktf.stringToTerraform(struct.destinationArn),
        events: cdktf.listMapper(cdktf.stringToTerraform)(struct.events),
        name: cdktf.stringToTerraform(struct.name),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/codecommit_trigger aws_codecommit_trigger}
*/
export class CodecommitTrigger extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_codecommit_trigger";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/codecommit_trigger aws_codecommit_trigger} 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 CodecommitTriggerConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_codecommit_trigger',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._repositoryName = config.repositoryName;
        this._trigger = config.trigger;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // configuration_id - computed: true, optional: false, required: false
    get configurationId() {
        return this.getStringAttribute('configuration_id');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // repository_name - computed: false, optional: false, required: true
    _repositoryName;
    get repositoryName() {
        return this.getStringAttribute('repository_name');
    }
    set repositoryName(value) {
        this._repositoryName = value;
    }
    // Temporarily expose input value. Use with caution.
    get repositoryNameInput() {
        return this._repositoryName;
    }
    // trigger - computed: false, optional: false, required: true
    _trigger;
    get trigger() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('trigger')));
    }
    set trigger(value) {
        this._trigger = value;
    }
    // Temporarily expose input value. Use with caution.
    get triggerInput() {
        return this._trigger;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            repository_name: cdktf.stringToTerraform(this._repositoryName),
            trigger: cdktf.listMapper(codecommitTriggerTriggerToTerraform)(this._trigger),
        };
    }
}
//# sourceMappingURL=codecommit-trigger.js.map