// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function appstreamFleetComputeCapacityToTerraform(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 {
        desired_instances: cdktf.numberToTerraform(struct.desiredInstances),
    };
}
export class AppstreamFleetComputeCapacityOutputReference 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._desiredInstances !== undefined) {
            hasAnyValues = true;
            internalValueResult.desiredInstances = this._desiredInstances;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._desiredInstances = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._desiredInstances = value.desiredInstances;
        }
    }
    // available - computed: true, optional: false, required: false
    get available() {
        return this.getNumberAttribute('available');
    }
    // desired_instances - computed: false, optional: false, required: true
    _desiredInstances;
    get desiredInstances() {
        return this.getNumberAttribute('desired_instances');
    }
    set desiredInstances(value) {
        this._desiredInstances = value;
    }
    // Temporarily expose input value. Use with caution.
    get desiredInstancesInput() {
        return this._desiredInstances;
    }
    // in_use - computed: true, optional: false, required: false
    get inUse() {
        return this.getNumberAttribute('in_use');
    }
    // running - computed: true, optional: false, required: false
    get running() {
        return this.getNumberAttribute('running');
    }
}
export function appstreamFleetDomainJoinInfoToTerraform(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 {
        directory_name: cdktf.stringToTerraform(struct.directoryName),
        organizational_unit_distinguished_name: cdktf.stringToTerraform(struct.organizationalUnitDistinguishedName),
    };
}
export class AppstreamFleetDomainJoinInfoOutputReference 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._directoryName !== undefined) {
            hasAnyValues = true;
            internalValueResult.directoryName = this._directoryName;
        }
        if (this._organizationalUnitDistinguishedName !== undefined) {
            hasAnyValues = true;
            internalValueResult.organizationalUnitDistinguishedName = this._organizationalUnitDistinguishedName;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._directoryName = undefined;
            this._organizationalUnitDistinguishedName = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._directoryName = value.directoryName;
            this._organizationalUnitDistinguishedName = value.organizationalUnitDistinguishedName;
        }
    }
    // directory_name - computed: false, optional: true, required: false
    _directoryName;
    get directoryName() {
        return this.getStringAttribute('directory_name');
    }
    set directoryName(value) {
        this._directoryName = value;
    }
    resetDirectoryName() {
        this._directoryName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get directoryNameInput() {
        return this._directoryName;
    }
    // organizational_unit_distinguished_name - computed: false, optional: true, required: false
    _organizationalUnitDistinguishedName;
    get organizationalUnitDistinguishedName() {
        return this.getStringAttribute('organizational_unit_distinguished_name');
    }
    set organizationalUnitDistinguishedName(value) {
        this._organizationalUnitDistinguishedName = value;
    }
    resetOrganizationalUnitDistinguishedName() {
        this._organizationalUnitDistinguishedName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get organizationalUnitDistinguishedNameInput() {
        return this._organizationalUnitDistinguishedName;
    }
}
export function appstreamFleetVpcConfigToTerraform(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 {
        security_group_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.securityGroupIds),
        subnet_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct.subnetIds),
    };
}
export class AppstreamFleetVpcConfigOutputReference 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._securityGroupIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.securityGroupIds = this._securityGroupIds;
        }
        if (this._subnetIds !== undefined) {
            hasAnyValues = true;
            internalValueResult.subnetIds = this._subnetIds;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._securityGroupIds = undefined;
            this._subnetIds = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._securityGroupIds = value.securityGroupIds;
            this._subnetIds = value.subnetIds;
        }
    }
    // security_group_ids - computed: true, optional: true, required: false
    _securityGroupIds;
    get securityGroupIds() {
        return 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: true, optional: true, required: false
    _subnetIds;
    get subnetIds() {
        return 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;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/appstream_fleet aws_appstream_fleet}
*/
export class AppstreamFleet extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_appstream_fleet";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/appstream_fleet aws_appstream_fleet} 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 AppstreamFleetConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_appstream_fleet',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._disconnectTimeoutInSeconds = config.disconnectTimeoutInSeconds;
        this._displayName = config.displayName;
        this._enableDefaultInternetAccess = config.enableDefaultInternetAccess;
        this._fleetType = config.fleetType;
        this._iamRoleArn = config.iamRoleArn;
        this._idleDisconnectTimeoutInSeconds = config.idleDisconnectTimeoutInSeconds;
        this._imageArn = config.imageArn;
        this._imageName = config.imageName;
        this._instanceType = config.instanceType;
        this._maxUserDurationInSeconds = config.maxUserDurationInSeconds;
        this._name = config.name;
        this._streamView = config.streamView;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._computeCapacity.internalValue = config.computeCapacity;
        this._domainJoinInfo.internalValue = config.domainJoinInfo;
        this._vpcConfig.internalValue = config.vpcConfig;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // created_time - computed: true, optional: false, required: false
    get createdTime() {
        return this.getStringAttribute('created_time');
    }
    // description - computed: true, 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;
    }
    // disconnect_timeout_in_seconds - computed: true, optional: true, required: false
    _disconnectTimeoutInSeconds;
    get disconnectTimeoutInSeconds() {
        return this.getNumberAttribute('disconnect_timeout_in_seconds');
    }
    set disconnectTimeoutInSeconds(value) {
        this._disconnectTimeoutInSeconds = value;
    }
    resetDisconnectTimeoutInSeconds() {
        this._disconnectTimeoutInSeconds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get disconnectTimeoutInSecondsInput() {
        return this._disconnectTimeoutInSeconds;
    }
    // display_name - computed: true, optional: true, required: false
    _displayName;
    get displayName() {
        return this.getStringAttribute('display_name');
    }
    set displayName(value) {
        this._displayName = value;
    }
    resetDisplayName() {
        this._displayName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get displayNameInput() {
        return this._displayName;
    }
    // enable_default_internet_access - computed: true, optional: true, required: false
    _enableDefaultInternetAccess;
    get enableDefaultInternetAccess() {
        return this.getBooleanAttribute('enable_default_internet_access');
    }
    set enableDefaultInternetAccess(value) {
        this._enableDefaultInternetAccess = value;
    }
    resetEnableDefaultInternetAccess() {
        this._enableDefaultInternetAccess = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableDefaultInternetAccessInput() {
        return this._enableDefaultInternetAccess;
    }
    // fleet_type - computed: true, optional: true, required: false
    _fleetType;
    get fleetType() {
        return this.getStringAttribute('fleet_type');
    }
    set fleetType(value) {
        this._fleetType = value;
    }
    resetFleetType() {
        this._fleetType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get fleetTypeInput() {
        return this._fleetType;
    }
    // iam_role_arn - computed: true, optional: true, required: false
    _iamRoleArn;
    get iamRoleArn() {
        return this.getStringAttribute('iam_role_arn');
    }
    set iamRoleArn(value) {
        this._iamRoleArn = value;
    }
    resetIamRoleArn() {
        this._iamRoleArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get iamRoleArnInput() {
        return this._iamRoleArn;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // idle_disconnect_timeout_in_seconds - computed: false, optional: true, required: false
    _idleDisconnectTimeoutInSeconds;
    get idleDisconnectTimeoutInSeconds() {
        return this.getNumberAttribute('idle_disconnect_timeout_in_seconds');
    }
    set idleDisconnectTimeoutInSeconds(value) {
        this._idleDisconnectTimeoutInSeconds = value;
    }
    resetIdleDisconnectTimeoutInSeconds() {
        this._idleDisconnectTimeoutInSeconds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get idleDisconnectTimeoutInSecondsInput() {
        return this._idleDisconnectTimeoutInSeconds;
    }
    // image_arn - computed: true, optional: true, required: false
    _imageArn;
    get imageArn() {
        return this.getStringAttribute('image_arn');
    }
    set imageArn(value) {
        this._imageArn = value;
    }
    resetImageArn() {
        this._imageArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get imageArnInput() {
        return this._imageArn;
    }
    // image_name - computed: true, optional: true, required: false
    _imageName;
    get imageName() {
        return this.getStringAttribute('image_name');
    }
    set imageName(value) {
        this._imageName = value;
    }
    resetImageName() {
        this._imageName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get imageNameInput() {
        return this._imageName;
    }
    // instance_type - computed: false, optional: false, required: true
    _instanceType;
    get instanceType() {
        return this.getStringAttribute('instance_type');
    }
    set instanceType(value) {
        this._instanceType = value;
    }
    // Temporarily expose input value. Use with caution.
    get instanceTypeInput() {
        return this._instanceType;
    }
    // max_user_duration_in_seconds - computed: true, optional: true, required: false
    _maxUserDurationInSeconds;
    get maxUserDurationInSeconds() {
        return this.getNumberAttribute('max_user_duration_in_seconds');
    }
    set maxUserDurationInSeconds(value) {
        this._maxUserDurationInSeconds = value;
    }
    resetMaxUserDurationInSeconds() {
        this._maxUserDurationInSeconds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maxUserDurationInSecondsInput() {
        return this._maxUserDurationInSeconds;
    }
    // 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;
    }
    // state - computed: true, optional: false, required: false
    get state() {
        return this.getStringAttribute('state');
    }
    // stream_view - computed: true, optional: true, required: false
    _streamView;
    get streamView() {
        return this.getStringAttribute('stream_view');
    }
    set streamView(value) {
        this._streamView = value;
    }
    resetStreamView() {
        this._streamView = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get streamViewInput() {
        return this._streamView;
    }
    // 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;
    }
    // compute_capacity - computed: false, optional: false, required: true
    _computeCapacity = new AppstreamFleetComputeCapacityOutputReference(this, "compute_capacity", true);
    get computeCapacity() {
        return this._computeCapacity;
    }
    putComputeCapacity(value) {
        this._computeCapacity.internalValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get computeCapacityInput() {
        return this._computeCapacity.internalValue;
    }
    // domain_join_info - computed: false, optional: true, required: false
    _domainJoinInfo = new AppstreamFleetDomainJoinInfoOutputReference(this, "domain_join_info", true);
    get domainJoinInfo() {
        return this._domainJoinInfo;
    }
    putDomainJoinInfo(value) {
        this._domainJoinInfo.internalValue = value;
    }
    resetDomainJoinInfo() {
        this._domainJoinInfo.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get domainJoinInfoInput() {
        return this._domainJoinInfo.internalValue;
    }
    // vpc_config - computed: false, optional: true, required: false
    _vpcConfig = new AppstreamFleetVpcConfigOutputReference(this, "vpc_config", true);
    get vpcConfig() {
        return this._vpcConfig;
    }
    putVpcConfig(value) {
        this._vpcConfig.internalValue = value;
    }
    resetVpcConfig() {
        this._vpcConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get vpcConfigInput() {
        return this._vpcConfig.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            description: cdktf.stringToTerraform(this._description),
            disconnect_timeout_in_seconds: cdktf.numberToTerraform(this._disconnectTimeoutInSeconds),
            display_name: cdktf.stringToTerraform(this._displayName),
            enable_default_internet_access: cdktf.booleanToTerraform(this._enableDefaultInternetAccess),
            fleet_type: cdktf.stringToTerraform(this._fleetType),
            iam_role_arn: cdktf.stringToTerraform(this._iamRoleArn),
            idle_disconnect_timeout_in_seconds: cdktf.numberToTerraform(this._idleDisconnectTimeoutInSeconds),
            image_arn: cdktf.stringToTerraform(this._imageArn),
            image_name: cdktf.stringToTerraform(this._imageName),
            instance_type: cdktf.stringToTerraform(this._instanceType),
            max_user_duration_in_seconds: cdktf.numberToTerraform(this._maxUserDurationInSeconds),
            name: cdktf.stringToTerraform(this._name),
            stream_view: cdktf.stringToTerraform(this._streamView),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            compute_capacity: appstreamFleetComputeCapacityToTerraform(this._computeCapacity.internalValue),
            domain_join_info: appstreamFleetDomainJoinInfoToTerraform(this._domainJoinInfo.internalValue),
            vpc_config: appstreamFleetVpcConfigToTerraform(this._vpcConfig.internalValue),
        };
    }
}
//# sourceMappingURL=appstream-fleet.js.map