// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function worklinkFleetIdentityProviderToTerraform(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 {
        saml_metadata: cdktf.stringToTerraform(struct.samlMetadata),
        type: cdktf.stringToTerraform(struct.type),
    };
}
export class WorklinkFleetIdentityProviderOutputReference 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._samlMetadata !== undefined) {
            hasAnyValues = true;
            internalValueResult.samlMetadata = this._samlMetadata;
        }
        if (this._type !== undefined) {
            hasAnyValues = true;
            internalValueResult.type = this._type;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._samlMetadata = undefined;
            this._type = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._samlMetadata = value.samlMetadata;
            this._type = value.type;
        }
    }
    // saml_metadata - computed: false, optional: false, required: true
    _samlMetadata;
    get samlMetadata() {
        return this.getStringAttribute('saml_metadata');
    }
    set samlMetadata(value) {
        this._samlMetadata = value;
    }
    // Temporarily expose input value. Use with caution.
    get samlMetadataInput() {
        return this._samlMetadata;
    }
    // type - computed: false, optional: false, required: true
    _type;
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
}
export function worklinkFleetNetworkToTerraform(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),
        vpc_id: cdktf.stringToTerraform(struct.vpcId),
    };
}
export class WorklinkFleetNetworkOutputReference 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;
        }
        if (this._vpcId !== undefined) {
            hasAnyValues = true;
            internalValueResult.vpcId = this._vpcId;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._securityGroupIds = undefined;
            this._subnetIds = undefined;
            this._vpcId = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._securityGroupIds = value.securityGroupIds;
            this._subnetIds = value.subnetIds;
            this._vpcId = value.vpcId;
        }
    }
    // security_group_ids - computed: false, optional: false, required: true
    _securityGroupIds;
    get securityGroupIds() {
        return cdktf.Fn.tolist(this.getListAttribute('security_group_ids'));
    }
    set securityGroupIds(value) {
        this._securityGroupIds = value;
    }
    // Temporarily expose input value. Use with caution.
    get securityGroupIdsInput() {
        return this._securityGroupIds;
    }
    // subnet_ids - computed: false, optional: false, required: true
    _subnetIds;
    get subnetIds() {
        return cdktf.Fn.tolist(this.getListAttribute('subnet_ids'));
    }
    set subnetIds(value) {
        this._subnetIds = value;
    }
    // Temporarily expose input value. Use with caution.
    get subnetIdsInput() {
        return this._subnetIds;
    }
    // vpc_id - computed: false, optional: false, required: true
    _vpcId;
    get vpcId() {
        return this.getStringAttribute('vpc_id');
    }
    set vpcId(value) {
        this._vpcId = value;
    }
    // Temporarily expose input value. Use with caution.
    get vpcIdInput() {
        return this._vpcId;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/worklink_fleet aws_worklink_fleet}
*/
export class WorklinkFleet extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_worklink_fleet";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/worklink_fleet aws_worklink_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 WorklinkFleetConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_worklink_fleet',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._auditStreamArn = config.auditStreamArn;
        this._deviceCaCertificate = config.deviceCaCertificate;
        this._displayName = config.displayName;
        this._name = config.name;
        this._optimizeForEndUserLocation = config.optimizeForEndUserLocation;
        this._identityProvider.internalValue = config.identityProvider;
        this._network.internalValue = config.network;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // audit_stream_arn - computed: false, optional: true, required: false
    _auditStreamArn;
    get auditStreamArn() {
        return this.getStringAttribute('audit_stream_arn');
    }
    set auditStreamArn(value) {
        this._auditStreamArn = value;
    }
    resetAuditStreamArn() {
        this._auditStreamArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get auditStreamArnInput() {
        return this._auditStreamArn;
    }
    // company_code - computed: true, optional: false, required: false
    get companyCode() {
        return this.getStringAttribute('company_code');
    }
    // created_time - computed: true, optional: false, required: false
    get createdTime() {
        return this.getStringAttribute('created_time');
    }
    // device_ca_certificate - computed: false, optional: true, required: false
    _deviceCaCertificate;
    get deviceCaCertificate() {
        return this.getStringAttribute('device_ca_certificate');
    }
    set deviceCaCertificate(value) {
        this._deviceCaCertificate = value;
    }
    resetDeviceCaCertificate() {
        this._deviceCaCertificate = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deviceCaCertificateInput() {
        return this._deviceCaCertificate;
    }
    // display_name - computed: false, 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;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // last_updated_time - computed: true, optional: false, required: false
    get lastUpdatedTime() {
        return this.getStringAttribute('last_updated_time');
    }
    // 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;
    }
    // optimize_for_end_user_location - computed: false, optional: true, required: false
    _optimizeForEndUserLocation;
    get optimizeForEndUserLocation() {
        return this.getBooleanAttribute('optimize_for_end_user_location');
    }
    set optimizeForEndUserLocation(value) {
        this._optimizeForEndUserLocation = value;
    }
    resetOptimizeForEndUserLocation() {
        this._optimizeForEndUserLocation = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get optimizeForEndUserLocationInput() {
        return this._optimizeForEndUserLocation;
    }
    // identity_provider - computed: false, optional: true, required: false
    _identityProvider = new WorklinkFleetIdentityProviderOutputReference(this, "identity_provider", true);
    get identityProvider() {
        return this._identityProvider;
    }
    putIdentityProvider(value) {
        this._identityProvider.internalValue = value;
    }
    resetIdentityProvider() {
        this._identityProvider.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get identityProviderInput() {
        return this._identityProvider.internalValue;
    }
    // network - computed: false, optional: true, required: false
    _network = new WorklinkFleetNetworkOutputReference(this, "network", true);
    get network() {
        return this._network;
    }
    putNetwork(value) {
        this._network.internalValue = value;
    }
    resetNetwork() {
        this._network.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get networkInput() {
        return this._network.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            audit_stream_arn: cdktf.stringToTerraform(this._auditStreamArn),
            device_ca_certificate: cdktf.stringToTerraform(this._deviceCaCertificate),
            display_name: cdktf.stringToTerraform(this._displayName),
            name: cdktf.stringToTerraform(this._name),
            optimize_for_end_user_location: cdktf.booleanToTerraform(this._optimizeForEndUserLocation),
            identity_provider: worklinkFleetIdentityProviderToTerraform(this._identityProvider.internalValue),
            network: worklinkFleetNetworkToTerraform(this._network.internalValue),
        };
    }
}
//# sourceMappingURL=worklink-fleet.js.map