// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function glueConnectionPhysicalConnectionRequirementsToTerraform(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 {
        availability_zone: cdktf.stringToTerraform(struct.availabilityZone),
        security_group_id_list: cdktf.listMapper(cdktf.stringToTerraform)(struct.securityGroupIdList),
        subnet_id: cdktf.stringToTerraform(struct.subnetId),
    };
}
export class GlueConnectionPhysicalConnectionRequirementsOutputReference 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._availabilityZone !== undefined) {
            hasAnyValues = true;
            internalValueResult.availabilityZone = this._availabilityZone;
        }
        if (this._securityGroupIdList !== undefined) {
            hasAnyValues = true;
            internalValueResult.securityGroupIdList = this._securityGroupIdList;
        }
        if (this._subnetId !== undefined) {
            hasAnyValues = true;
            internalValueResult.subnetId = this._subnetId;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._availabilityZone = undefined;
            this._securityGroupIdList = undefined;
            this._subnetId = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._availabilityZone = value.availabilityZone;
            this._securityGroupIdList = value.securityGroupIdList;
            this._subnetId = value.subnetId;
        }
    }
    // availability_zone - computed: false, optional: true, required: false
    _availabilityZone;
    get availabilityZone() {
        return this.getStringAttribute('availability_zone');
    }
    set availabilityZone(value) {
        this._availabilityZone = value;
    }
    resetAvailabilityZone() {
        this._availabilityZone = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get availabilityZoneInput() {
        return this._availabilityZone;
    }
    // security_group_id_list - computed: false, optional: true, required: false
    _securityGroupIdList;
    get securityGroupIdList() {
        return cdktf.Fn.tolist(this.getListAttribute('security_group_id_list'));
    }
    set securityGroupIdList(value) {
        this._securityGroupIdList = value;
    }
    resetSecurityGroupIdList() {
        this._securityGroupIdList = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get securityGroupIdListInput() {
        return this._securityGroupIdList;
    }
    // subnet_id - computed: false, optional: true, required: false
    _subnetId;
    get subnetId() {
        return this.getStringAttribute('subnet_id');
    }
    set subnetId(value) {
        this._subnetId = value;
    }
    resetSubnetId() {
        this._subnetId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get subnetIdInput() {
        return this._subnetId;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/glue_connection aws_glue_connection}
*/
export class GlueConnection extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_glue_connection";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/glue_connection aws_glue_connection} 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 GlueConnectionConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_glue_connection',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._catalogId = config.catalogId;
        this._connectionProperties = config.connectionProperties;
        this._connectionType = config.connectionType;
        this._description = config.description;
        this._matchCriteria = config.matchCriteria;
        this._name = config.name;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._physicalConnectionRequirements.internalValue = config.physicalConnectionRequirements;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // catalog_id - computed: true, optional: true, required: false
    _catalogId;
    get catalogId() {
        return this.getStringAttribute('catalog_id');
    }
    set catalogId(value) {
        this._catalogId = value;
    }
    resetCatalogId() {
        this._catalogId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get catalogIdInput() {
        return this._catalogId;
    }
    // connection_properties - computed: false, optional: true, required: false
    _connectionProperties;
    get connectionProperties() {
        return this.getStringMapAttribute('connection_properties');
    }
    set connectionProperties(value) {
        this._connectionProperties = value;
    }
    resetConnectionProperties() {
        this._connectionProperties = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get connectionPropertiesInput() {
        return this._connectionProperties;
    }
    // connection_type - computed: false, optional: true, required: false
    _connectionType;
    get connectionType() {
        return this.getStringAttribute('connection_type');
    }
    set connectionType(value) {
        this._connectionType = value;
    }
    resetConnectionType() {
        this._connectionType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get connectionTypeInput() {
        return this._connectionType;
    }
    // description - computed: false, optional: true, required: false
    _description;
    get description() {
        return this.getStringAttribute('description');
    }
    set description(value) {
        this._description = value;
    }
    resetDescription() {
        this._description = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get descriptionInput() {
        return this._description;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // match_criteria - computed: false, optional: true, required: false
    _matchCriteria;
    get matchCriteria() {
        return this.getListAttribute('match_criteria');
    }
    set matchCriteria(value) {
        this._matchCriteria = value;
    }
    resetMatchCriteria() {
        this._matchCriteria = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get matchCriteriaInput() {
        return this._matchCriteria;
    }
    // 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;
    }
    // tags - computed: false, optional: true, required: false
    _tags;
    get tags() {
        return this.getStringMapAttribute('tags');
    }
    set tags(value) {
        this._tags = value;
    }
    resetTags() {
        this._tags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsInput() {
        return this._tags;
    }
    // tags_all - computed: true, optional: true, required: false
    _tagsAll;
    get tagsAll() {
        return this.getStringMapAttribute('tags_all');
    }
    set tagsAll(value) {
        this._tagsAll = value;
    }
    resetTagsAll() {
        this._tagsAll = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsAllInput() {
        return this._tagsAll;
    }
    // physical_connection_requirements - computed: false, optional: true, required: false
    _physicalConnectionRequirements = new GlueConnectionPhysicalConnectionRequirementsOutputReference(this, "physical_connection_requirements", true);
    get physicalConnectionRequirements() {
        return this._physicalConnectionRequirements;
    }
    putPhysicalConnectionRequirements(value) {
        this._physicalConnectionRequirements.internalValue = value;
    }
    resetPhysicalConnectionRequirements() {
        this._physicalConnectionRequirements.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get physicalConnectionRequirementsInput() {
        return this._physicalConnectionRequirements.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            catalog_id: cdktf.stringToTerraform(this._catalogId),
            connection_properties: cdktf.hashMapper(cdktf.stringToTerraform)(this._connectionProperties),
            connection_type: cdktf.stringToTerraform(this._connectionType),
            description: cdktf.stringToTerraform(this._description),
            match_criteria: cdktf.listMapper(cdktf.stringToTerraform)(this._matchCriteria),
            name: cdktf.stringToTerraform(this._name),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            physical_connection_requirements: glueConnectionPhysicalConnectionRequirementsToTerraform(this._physicalConnectionRequirements.internalValue),
        };
    }
}
//# sourceMappingURL=glue-connection.js.map