// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function glueSecurityConfigurationEncryptionConfigurationCloudwatchEncryptionToTerraform(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 {
        cloudwatch_encryption_mode: cdktf.stringToTerraform(struct.cloudwatchEncryptionMode),
        kms_key_arn: cdktf.stringToTerraform(struct.kmsKeyArn),
    };
}
export class GlueSecurityConfigurationEncryptionConfigurationCloudwatchEncryptionOutputReference 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._cloudwatchEncryptionMode !== undefined) {
            hasAnyValues = true;
            internalValueResult.cloudwatchEncryptionMode = this._cloudwatchEncryptionMode;
        }
        if (this._kmsKeyArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.kmsKeyArn = this._kmsKeyArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._cloudwatchEncryptionMode = undefined;
            this._kmsKeyArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._cloudwatchEncryptionMode = value.cloudwatchEncryptionMode;
            this._kmsKeyArn = value.kmsKeyArn;
        }
    }
    // cloudwatch_encryption_mode - computed: false, optional: true, required: false
    _cloudwatchEncryptionMode;
    get cloudwatchEncryptionMode() {
        return this.getStringAttribute('cloudwatch_encryption_mode');
    }
    set cloudwatchEncryptionMode(value) {
        this._cloudwatchEncryptionMode = value;
    }
    resetCloudwatchEncryptionMode() {
        this._cloudwatchEncryptionMode = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cloudwatchEncryptionModeInput() {
        return this._cloudwatchEncryptionMode;
    }
    // kms_key_arn - computed: false, optional: true, required: false
    _kmsKeyArn;
    get kmsKeyArn() {
        return this.getStringAttribute('kms_key_arn');
    }
    set kmsKeyArn(value) {
        this._kmsKeyArn = value;
    }
    resetKmsKeyArn() {
        this._kmsKeyArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kmsKeyArnInput() {
        return this._kmsKeyArn;
    }
}
export function glueSecurityConfigurationEncryptionConfigurationJobBookmarksEncryptionToTerraform(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 {
        job_bookmarks_encryption_mode: cdktf.stringToTerraform(struct.jobBookmarksEncryptionMode),
        kms_key_arn: cdktf.stringToTerraform(struct.kmsKeyArn),
    };
}
export class GlueSecurityConfigurationEncryptionConfigurationJobBookmarksEncryptionOutputReference 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._jobBookmarksEncryptionMode !== undefined) {
            hasAnyValues = true;
            internalValueResult.jobBookmarksEncryptionMode = this._jobBookmarksEncryptionMode;
        }
        if (this._kmsKeyArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.kmsKeyArn = this._kmsKeyArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._jobBookmarksEncryptionMode = undefined;
            this._kmsKeyArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._jobBookmarksEncryptionMode = value.jobBookmarksEncryptionMode;
            this._kmsKeyArn = value.kmsKeyArn;
        }
    }
    // job_bookmarks_encryption_mode - computed: false, optional: true, required: false
    _jobBookmarksEncryptionMode;
    get jobBookmarksEncryptionMode() {
        return this.getStringAttribute('job_bookmarks_encryption_mode');
    }
    set jobBookmarksEncryptionMode(value) {
        this._jobBookmarksEncryptionMode = value;
    }
    resetJobBookmarksEncryptionMode() {
        this._jobBookmarksEncryptionMode = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get jobBookmarksEncryptionModeInput() {
        return this._jobBookmarksEncryptionMode;
    }
    // kms_key_arn - computed: false, optional: true, required: false
    _kmsKeyArn;
    get kmsKeyArn() {
        return this.getStringAttribute('kms_key_arn');
    }
    set kmsKeyArn(value) {
        this._kmsKeyArn = value;
    }
    resetKmsKeyArn() {
        this._kmsKeyArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kmsKeyArnInput() {
        return this._kmsKeyArn;
    }
}
export function glueSecurityConfigurationEncryptionConfigurationS3EncryptionToTerraform(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 {
        kms_key_arn: cdktf.stringToTerraform(struct.kmsKeyArn),
        s3_encryption_mode: cdktf.stringToTerraform(struct.s3EncryptionMode),
    };
}
export class GlueSecurityConfigurationEncryptionConfigurationS3EncryptionOutputReference 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._kmsKeyArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.kmsKeyArn = this._kmsKeyArn;
        }
        if (this._s3EncryptionMode !== undefined) {
            hasAnyValues = true;
            internalValueResult.s3EncryptionMode = this._s3EncryptionMode;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._kmsKeyArn = undefined;
            this._s3EncryptionMode = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._kmsKeyArn = value.kmsKeyArn;
            this._s3EncryptionMode = value.s3EncryptionMode;
        }
    }
    // kms_key_arn - computed: false, optional: true, required: false
    _kmsKeyArn;
    get kmsKeyArn() {
        return this.getStringAttribute('kms_key_arn');
    }
    set kmsKeyArn(value) {
        this._kmsKeyArn = value;
    }
    resetKmsKeyArn() {
        this._kmsKeyArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kmsKeyArnInput() {
        return this._kmsKeyArn;
    }
    // s3_encryption_mode - computed: false, optional: true, required: false
    _s3EncryptionMode;
    get s3EncryptionMode() {
        return this.getStringAttribute('s3_encryption_mode');
    }
    set s3EncryptionMode(value) {
        this._s3EncryptionMode = value;
    }
    resetS3EncryptionMode() {
        this._s3EncryptionMode = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get s3EncryptionModeInput() {
        return this._s3EncryptionMode;
    }
}
export function glueSecurityConfigurationEncryptionConfigurationToTerraform(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 {
        cloudwatch_encryption: glueSecurityConfigurationEncryptionConfigurationCloudwatchEncryptionToTerraform(struct.cloudwatchEncryption),
        job_bookmarks_encryption: glueSecurityConfigurationEncryptionConfigurationJobBookmarksEncryptionToTerraform(struct.jobBookmarksEncryption),
        s3_encryption: glueSecurityConfigurationEncryptionConfigurationS3EncryptionToTerraform(struct.s3Encryption),
    };
}
export class GlueSecurityConfigurationEncryptionConfigurationOutputReference 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._cloudwatchEncryption?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.cloudwatchEncryption = this._cloudwatchEncryption?.internalValue;
        }
        if (this._jobBookmarksEncryption?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.jobBookmarksEncryption = this._jobBookmarksEncryption?.internalValue;
        }
        if (this._s3Encryption?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.s3Encryption = this._s3Encryption?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._cloudwatchEncryption.internalValue = undefined;
            this._jobBookmarksEncryption.internalValue = undefined;
            this._s3Encryption.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._cloudwatchEncryption.internalValue = value.cloudwatchEncryption;
            this._jobBookmarksEncryption.internalValue = value.jobBookmarksEncryption;
            this._s3Encryption.internalValue = value.s3Encryption;
        }
    }
    // cloudwatch_encryption - computed: false, optional: false, required: true
    _cloudwatchEncryption = new GlueSecurityConfigurationEncryptionConfigurationCloudwatchEncryptionOutputReference(this, "cloudwatch_encryption", true);
    get cloudwatchEncryption() {
        return this._cloudwatchEncryption;
    }
    putCloudwatchEncryption(value) {
        this._cloudwatchEncryption.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get cloudwatchEncryptionInput() {
        return this._cloudwatchEncryption.internalValue;
    }
    // job_bookmarks_encryption - computed: false, optional: false, required: true
    _jobBookmarksEncryption = new GlueSecurityConfigurationEncryptionConfigurationJobBookmarksEncryptionOutputReference(this, "job_bookmarks_encryption", true);
    get jobBookmarksEncryption() {
        return this._jobBookmarksEncryption;
    }
    putJobBookmarksEncryption(value) {
        this._jobBookmarksEncryption.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get jobBookmarksEncryptionInput() {
        return this._jobBookmarksEncryption.internalValue;
    }
    // s3_encryption - computed: false, optional: false, required: true
    _s3Encryption = new GlueSecurityConfigurationEncryptionConfigurationS3EncryptionOutputReference(this, "s3_encryption", true);
    get s3Encryption() {
        return this._s3Encryption;
    }
    putS3Encryption(value) {
        this._s3Encryption.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get s3EncryptionInput() {
        return this._s3Encryption.internalValue;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/glue_security_configuration aws_glue_security_configuration}
*/
export class GlueSecurityConfiguration extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_glue_security_configuration";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/glue_security_configuration aws_glue_security_configuration} 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 GlueSecurityConfigurationConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_glue_security_configuration',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._name = config.name;
        this._encryptionConfiguration.internalValue = config.encryptionConfiguration;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // 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;
    }
    // encryption_configuration - computed: false, optional: false, required: true
    _encryptionConfiguration = new GlueSecurityConfigurationEncryptionConfigurationOutputReference(this, "encryption_configuration", true);
    get encryptionConfiguration() {
        return this._encryptionConfiguration;
    }
    putEncryptionConfiguration(value) {
        this._encryptionConfiguration.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get encryptionConfigurationInput() {
        return this._encryptionConfiguration.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            name: cdktf.stringToTerraform(this._name),
            encryption_configuration: glueSecurityConfigurationEncryptionConfigurationToTerraform(this._encryptionConfiguration.internalValue),
        };
    }
}
//# sourceMappingURL=glue-security-configuration.js.map