// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function datasyncLocationHdfsNameNodeToTerraform(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 {
        hostname: cdktf.stringToTerraform(struct.hostname),
        port: cdktf.numberToTerraform(struct.port),
    };
}
export function datasyncLocationHdfsQopConfigurationToTerraform(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 {
        data_transfer_protection: cdktf.stringToTerraform(struct.dataTransferProtection),
        rpc_protection: cdktf.stringToTerraform(struct.rpcProtection),
    };
}
export class DatasyncLocationHdfsQopConfigurationOutputReference 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._dataTransferProtection !== undefined) {
            hasAnyValues = true;
            internalValueResult.dataTransferProtection = this._dataTransferProtection;
        }
        if (this._rpcProtection !== undefined) {
            hasAnyValues = true;
            internalValueResult.rpcProtection = this._rpcProtection;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._dataTransferProtection = undefined;
            this._rpcProtection = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._dataTransferProtection = value.dataTransferProtection;
            this._rpcProtection = value.rpcProtection;
        }
    }
    // data_transfer_protection - computed: false, optional: true, required: false
    _dataTransferProtection;
    get dataTransferProtection() {
        return this.getStringAttribute('data_transfer_protection');
    }
    set dataTransferProtection(value) {
        this._dataTransferProtection = value;
    }
    resetDataTransferProtection() {
        this._dataTransferProtection = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dataTransferProtectionInput() {
        return this._dataTransferProtection;
    }
    // rpc_protection - computed: false, optional: true, required: false
    _rpcProtection;
    get rpcProtection() {
        return this.getStringAttribute('rpc_protection');
    }
    set rpcProtection(value) {
        this._rpcProtection = value;
    }
    resetRpcProtection() {
        this._rpcProtection = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get rpcProtectionInput() {
        return this._rpcProtection;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/datasync_location_hdfs aws_datasync_location_hdfs}
*/
export class DatasyncLocationHdfs extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_datasync_location_hdfs";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/datasync_location_hdfs aws_datasync_location_hdfs} 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 DatasyncLocationHdfsConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_datasync_location_hdfs',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._agentArns = config.agentArns;
        this._authenticationType = config.authenticationType;
        this._blockSize = config.blockSize;
        this._kerberosKeytab = config.kerberosKeytab;
        this._kerberosKrb5Conf = config.kerberosKrb5Conf;
        this._kerberosPrincipal = config.kerberosPrincipal;
        this._kmsKeyProviderUri = config.kmsKeyProviderUri;
        this._replicationFactor = config.replicationFactor;
        this._simpleUser = config.simpleUser;
        this._subdirectory = config.subdirectory;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._nameNode = config.nameNode;
        this._qopConfiguration.internalValue = config.qopConfiguration;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // agent_arns - computed: false, optional: false, required: true
    _agentArns;
    get agentArns() {
        return cdktf.Fn.tolist(this.getListAttribute('agent_arns'));
    }
    set agentArns(value) {
        this._agentArns = value;
    }
    // Temporarily expose input value. Use with caution.
    get agentArnsInput() {
        return this._agentArns;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // authentication_type - computed: false, optional: true, required: false
    _authenticationType;
    get authenticationType() {
        return this.getStringAttribute('authentication_type');
    }
    set authenticationType(value) {
        this._authenticationType = value;
    }
    resetAuthenticationType() {
        this._authenticationType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get authenticationTypeInput() {
        return this._authenticationType;
    }
    // block_size - computed: false, optional: true, required: false
    _blockSize;
    get blockSize() {
        return this.getNumberAttribute('block_size');
    }
    set blockSize(value) {
        this._blockSize = value;
    }
    resetBlockSize() {
        this._blockSize = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get blockSizeInput() {
        return this._blockSize;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // kerberos_keytab - computed: false, optional: true, required: false
    _kerberosKeytab;
    get kerberosKeytab() {
        return this.getStringAttribute('kerberos_keytab');
    }
    set kerberosKeytab(value) {
        this._kerberosKeytab = value;
    }
    resetKerberosKeytab() {
        this._kerberosKeytab = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kerberosKeytabInput() {
        return this._kerberosKeytab;
    }
    // kerberos_krb5_conf - computed: false, optional: true, required: false
    _kerberosKrb5Conf;
    get kerberosKrb5Conf() {
        return this.getStringAttribute('kerberos_krb5_conf');
    }
    set kerberosKrb5Conf(value) {
        this._kerberosKrb5Conf = value;
    }
    resetKerberosKrb5Conf() {
        this._kerberosKrb5Conf = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kerberosKrb5ConfInput() {
        return this._kerberosKrb5Conf;
    }
    // kerberos_principal - computed: false, optional: true, required: false
    _kerberosPrincipal;
    get kerberosPrincipal() {
        return this.getStringAttribute('kerberos_principal');
    }
    set kerberosPrincipal(value) {
        this._kerberosPrincipal = value;
    }
    resetKerberosPrincipal() {
        this._kerberosPrincipal = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kerberosPrincipalInput() {
        return this._kerberosPrincipal;
    }
    // kms_key_provider_uri - computed: false, optional: true, required: false
    _kmsKeyProviderUri;
    get kmsKeyProviderUri() {
        return this.getStringAttribute('kms_key_provider_uri');
    }
    set kmsKeyProviderUri(value) {
        this._kmsKeyProviderUri = value;
    }
    resetKmsKeyProviderUri() {
        this._kmsKeyProviderUri = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kmsKeyProviderUriInput() {
        return this._kmsKeyProviderUri;
    }
    // replication_factor - computed: false, optional: true, required: false
    _replicationFactor;
    get replicationFactor() {
        return this.getNumberAttribute('replication_factor');
    }
    set replicationFactor(value) {
        this._replicationFactor = value;
    }
    resetReplicationFactor() {
        this._replicationFactor = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get replicationFactorInput() {
        return this._replicationFactor;
    }
    // simple_user - computed: false, optional: true, required: false
    _simpleUser;
    get simpleUser() {
        return this.getStringAttribute('simple_user');
    }
    set simpleUser(value) {
        this._simpleUser = value;
    }
    resetSimpleUser() {
        this._simpleUser = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get simpleUserInput() {
        return this._simpleUser;
    }
    // subdirectory - computed: false, optional: true, required: false
    _subdirectory;
    get subdirectory() {
        return this.getStringAttribute('subdirectory');
    }
    set subdirectory(value) {
        this._subdirectory = value;
    }
    resetSubdirectory() {
        this._subdirectory = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get subdirectoryInput() {
        return this._subdirectory;
    }
    // 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;
    }
    // uri - computed: true, optional: false, required: false
    get uri() {
        return this.getStringAttribute('uri');
    }
    // name_node - computed: false, optional: false, required: true
    _nameNode;
    get nameNode() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('name_node')));
    }
    set nameNode(value) {
        this._nameNode = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameNodeInput() {
        return this._nameNode;
    }
    // qop_configuration - computed: false, optional: true, required: false
    _qopConfiguration = new DatasyncLocationHdfsQopConfigurationOutputReference(this, "qop_configuration", true);
    get qopConfiguration() {
        return this._qopConfiguration;
    }
    putQopConfiguration(value) {
        this._qopConfiguration.internalValue = value;
    }
    resetQopConfiguration() {
        this._qopConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get qopConfigurationInput() {
        return this._qopConfiguration.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            agent_arns: cdktf.listMapper(cdktf.stringToTerraform)(this._agentArns),
            authentication_type: cdktf.stringToTerraform(this._authenticationType),
            block_size: cdktf.numberToTerraform(this._blockSize),
            kerberos_keytab: cdktf.stringToTerraform(this._kerberosKeytab),
            kerberos_krb5_conf: cdktf.stringToTerraform(this._kerberosKrb5Conf),
            kerberos_principal: cdktf.stringToTerraform(this._kerberosPrincipal),
            kms_key_provider_uri: cdktf.stringToTerraform(this._kmsKeyProviderUri),
            replication_factor: cdktf.numberToTerraform(this._replicationFactor),
            simple_user: cdktf.stringToTerraform(this._simpleUser),
            subdirectory: cdktf.stringToTerraform(this._subdirectory),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            name_node: cdktf.listMapper(datasyncLocationHdfsNameNodeToTerraform)(this._nameNode),
            qop_configuration: datasyncLocationHdfsQopConfigurationToTerraform(this._qopConfiguration.internalValue),
        };
    }
}
//# sourceMappingURL=datasync-location-hdfs.js.map