// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function transferServerEndpointDetailsToTerraform(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 {
        address_allocation_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.addressAllocationIds),
        security_group_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.securityGroupIds),
        subnet_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.subnetIds),
        vpc_endpoint_id: cdktf.stringToTerraform(struct.vpcEndpointId),
        vpc_id: cdktf.stringToTerraform(struct.vpcId),
    };
}
export class TransferServerEndpointDetailsOutputReference 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._addressAllocationIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.addressAllocationIds = this._addressAllocationIds;
        }
        if (this._securityGroupIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.securityGroupIds = this._securityGroupIds;
        }
        if (this._subnetIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.subnetIds = this._subnetIds;
        }
        if (this._vpcEndpointId !== undefined) {
            hasAnyValues = true;
            internalValueResult.vpcEndpointId = this._vpcEndpointId;
        }
        if (this._vpcId !== undefined) {
            hasAnyValues = true;
            internalValueResult.vpcId = this._vpcId;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._addressAllocationIds = undefined;
            this._securityGroupIds = undefined;
            this._subnetIds = undefined;
            this._vpcEndpointId = undefined;
            this._vpcId = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._addressAllocationIds = value.addressAllocationIds;
            this._securityGroupIds = value.securityGroupIds;
            this._subnetIds = value.subnetIds;
            this._vpcEndpointId = value.vpcEndpointId;
            this._vpcId = value.vpcId;
        }
    }
    // address_allocation_ids - computed: false, optional: true, required: false
    _addressAllocationIds;
    get addressAllocationIds() {
        return cdktf.Fn.tolist(this.getListAttribute('address_allocation_ids'));
    }
    set addressAllocationIds(value) {
        this._addressAllocationIds = value;
    }
    resetAddressAllocationIds() {
        this._addressAllocationIds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get addressAllocationIdsInput() {
        return this._addressAllocationIds;
    }
    // security_group_ids - computed: true, optional: true, required: false
    _securityGroupIds;
    get securityGroupIds() {
        return cdktf.Fn.tolist(this.getListAttribute('security_group_ids'));
    }
    set securityGroupIds(value) {
        this._securityGroupIds = value;
    }
    resetSecurityGroupIds() {
        this._securityGroupIds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get securityGroupIdsInput() {
        return this._securityGroupIds;
    }
    // subnet_ids - computed: false, optional: true, required: false
    _subnetIds;
    get subnetIds() {
        return cdktf.Fn.tolist(this.getListAttribute('subnet_ids'));
    }
    set subnetIds(value) {
        this._subnetIds = value;
    }
    resetSubnetIds() {
        this._subnetIds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get subnetIdsInput() {
        return this._subnetIds;
    }
    // vpc_endpoint_id - computed: true, optional: true, required: false
    _vpcEndpointId;
    get vpcEndpointId() {
        return this.getStringAttribute('vpc_endpoint_id');
    }
    set vpcEndpointId(value) {
        this._vpcEndpointId = value;
    }
    resetVpcEndpointId() {
        this._vpcEndpointId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get vpcEndpointIdInput() {
        return this._vpcEndpointId;
    }
    // vpc_id - computed: false, optional: true, required: false
    _vpcId;
    get vpcId() {
        return this.getStringAttribute('vpc_id');
    }
    set vpcId(value) {
        this._vpcId = value;
    }
    resetVpcId() {
        this._vpcId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get vpcIdInput() {
        return this._vpcId;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/transfer_server aws_transfer_server}
*/
export class TransferServer extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_transfer_server";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/transfer_server aws_transfer_server} 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 TransferServerConfig = {}
    */
    constructor(scope, id, config = {}) {
        super(scope, id, {
            terraformResourceType: 'aws_transfer_server',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._certificate = config.certificate;
        this._directoryId = config.directoryId;
        this._domain = config.domain;
        this._endpointType = config.endpointType;
        this._forceDestroy = config.forceDestroy;
        this._function = config.function;
        this._hostKey = config.hostKey;
        this._identityProviderType = config.identityProviderType;
        this._invocationRole = config.invocationRole;
        this._loggingRole = config.loggingRole;
        this._protocols = config.protocols;
        this._securityPolicyName = config.securityPolicyName;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._url = config.url;
        this._endpointDetails.internalValue = config.endpointDetails;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // certificate - computed: false, optional: true, required: false
    _certificate;
    get certificate() {
        return this.getStringAttribute('certificate');
    }
    set certificate(value) {
        this._certificate = value;
    }
    resetCertificate() {
        this._certificate = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get certificateInput() {
        return this._certificate;
    }
    // directory_id - computed: false, optional: true, required: false
    _directoryId;
    get directoryId() {
        return this.getStringAttribute('directory_id');
    }
    set directoryId(value) {
        this._directoryId = value;
    }
    resetDirectoryId() {
        this._directoryId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get directoryIdInput() {
        return this._directoryId;
    }
    // domain - computed: false, optional: true, required: false
    _domain;
    get domain() {
        return this.getStringAttribute('domain');
    }
    set domain(value) {
        this._domain = value;
    }
    resetDomain() {
        this._domain = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get domainInput() {
        return this._domain;
    }
    // endpoint - computed: true, optional: false, required: false
    get endpoint() {
        return this.getStringAttribute('endpoint');
    }
    // endpoint_type - computed: false, optional: true, required: false
    _endpointType;
    get endpointType() {
        return this.getStringAttribute('endpoint_type');
    }
    set endpointType(value) {
        this._endpointType = value;
    }
    resetEndpointType() {
        this._endpointType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get endpointTypeInput() {
        return this._endpointType;
    }
    // force_destroy - computed: false, optional: true, required: false
    _forceDestroy;
    get forceDestroy() {
        return this.getBooleanAttribute('force_destroy');
    }
    set forceDestroy(value) {
        this._forceDestroy = value;
    }
    resetForceDestroy() {
        this._forceDestroy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get forceDestroyInput() {
        return this._forceDestroy;
    }
    // function - computed: false, optional: true, required: false
    _function;
    get function() {
        return this.getStringAttribute('function');
    }
    set function(value) {
        this._function = value;
    }
    resetFunction() {
        this._function = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get functionInput() {
        return this._function;
    }
    // host_key - computed: false, optional: true, required: false
    _hostKey;
    get hostKey() {
        return this.getStringAttribute('host_key');
    }
    set hostKey(value) {
        this._hostKey = value;
    }
    resetHostKey() {
        this._hostKey = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get hostKeyInput() {
        return this._hostKey;
    }
    // host_key_fingerprint - computed: true, optional: false, required: false
    get hostKeyFingerprint() {
        return this.getStringAttribute('host_key_fingerprint');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // identity_provider_type - computed: false, optional: true, required: false
    _identityProviderType;
    get identityProviderType() {
        return this.getStringAttribute('identity_provider_type');
    }
    set identityProviderType(value) {
        this._identityProviderType = value;
    }
    resetIdentityProviderType() {
        this._identityProviderType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get identityProviderTypeInput() {
        return this._identityProviderType;
    }
    // invocation_role - computed: false, optional: true, required: false
    _invocationRole;
    get invocationRole() {
        return this.getStringAttribute('invocation_role');
    }
    set invocationRole(value) {
        this._invocationRole = value;
    }
    resetInvocationRole() {
        this._invocationRole = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get invocationRoleInput() {
        return this._invocationRole;
    }
    // logging_role - computed: false, optional: true, required: false
    _loggingRole;
    get loggingRole() {
        return this.getStringAttribute('logging_role');
    }
    set loggingRole(value) {
        this._loggingRole = value;
    }
    resetLoggingRole() {
        this._loggingRole = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get loggingRoleInput() {
        return this._loggingRole;
    }
    // protocols - computed: true, optional: true, required: false
    _protocols;
    get protocols() {
        return cdktf.Fn.tolist(this.getListAttribute('protocols'));
    }
    set protocols(value) {
        this._protocols = value;
    }
    resetProtocols() {
        this._protocols = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get protocolsInput() {
        return this._protocols;
    }
    // security_policy_name - computed: false, optional: true, required: false
    _securityPolicyName;
    get securityPolicyName() {
        return this.getStringAttribute('security_policy_name');
    }
    set securityPolicyName(value) {
        this._securityPolicyName = value;
    }
    resetSecurityPolicyName() {
        this._securityPolicyName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get securityPolicyNameInput() {
        return this._securityPolicyName;
    }
    // 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;
    }
    // url - computed: false, optional: true, required: false
    _url;
    get url() {
        return this.getStringAttribute('url');
    }
    set url(value) {
        this._url = value;
    }
    resetUrl() {
        this._url = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get urlInput() {
        return this._url;
    }
    // endpoint_details - computed: false, optional: true, required: false
    _endpointDetails = new TransferServerEndpointDetailsOutputReference(this, "endpoint_details", true);
    get endpointDetails() {
        return this._endpointDetails;
    }
    putEndpointDetails(value) {
        this._endpointDetails.internalValue = value;
    }
    resetEndpointDetails() {
        this._endpointDetails.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get endpointDetailsInput() {
        return this._endpointDetails.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            certificate: cdktf.stringToTerraform(this._certificate),
            directory_id: cdktf.stringToTerraform(this._directoryId),
            domain: cdktf.stringToTerraform(this._domain),
            endpoint_type: cdktf.stringToTerraform(this._endpointType),
            force_destroy: cdktf.booleanToTerraform(this._forceDestroy),
            function: cdktf.stringToTerraform(this._function),
            host_key: cdktf.stringToTerraform(this._hostKey),
            identity_provider_type: cdktf.stringToTerraform(this._identityProviderType),
            invocation_role: cdktf.stringToTerraform(this._invocationRole),
            logging_role: cdktf.stringToTerraform(this._loggingRole),
            protocols: cdktf.listMapper(cdktf.stringToTerraform)(this._protocols),
            security_policy_name: cdktf.stringToTerraform(this._securityPolicyName),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            url: cdktf.stringToTerraform(this._url),
            endpoint_details: transferServerEndpointDetailsToTerraform(this._endpointDetails.internalValue),
        };
    }
}
//# sourceMappingURL=transfer-server.js.map