// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function appstreamStackAccessEndpointsToTerraform(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 {
        endpoint_type: cdktf.stringToTerraform(struct.endpointType),
        vpce_id: cdktf.stringToTerraform(struct.vpceId),
    };
}
export function appstreamStackApplicationSettingsToTerraform(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 {
        enabled: cdktf.booleanToTerraform(struct.enabled),
        settings_group: cdktf.stringToTerraform(struct.settingsGroup),
    };
}
export class AppstreamStackApplicationSettingsOutputReference 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._enabled !== undefined) {
            hasAnyValues = true;
            internalValueResult.enabled = this._enabled;
        }
        if (this._settingsGroup !== undefined) {
            hasAnyValues = true;
            internalValueResult.settingsGroup = this._settingsGroup;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._enabled = undefined;
            this._settingsGroup = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._enabled = value.enabled;
            this._settingsGroup = value.settingsGroup;
        }
    }
    // enabled - computed: false, optional: true, required: false
    _enabled;
    get enabled() {
        return this.getBooleanAttribute('enabled');
    }
    set enabled(value) {
        this._enabled = value;
    }
    resetEnabled() {
        this._enabled = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enabledInput() {
        return this._enabled;
    }
    // settings_group - computed: false, optional: true, required: false
    _settingsGroup;
    get settingsGroup() {
        return this.getStringAttribute('settings_group');
    }
    set settingsGroup(value) {
        this._settingsGroup = value;
    }
    resetSettingsGroup() {
        this._settingsGroup = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get settingsGroupInput() {
        return this._settingsGroup;
    }
}
export function appstreamStackStorageConnectorsToTerraform(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 {
        connector_type: cdktf.stringToTerraform(struct.connectorType),
        domains: cdktf.listMapper(cdktf.stringToTerraform)(struct.domains),
        resource_identifier: cdktf.stringToTerraform(struct.resourceIdentifier),
    };
}
export function appstreamStackUserSettingsToTerraform(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 {
        action: cdktf.stringToTerraform(struct.action),
        permission: cdktf.stringToTerraform(struct.permission),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/appstream_stack aws_appstream_stack}
*/
export class AppstreamStack extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_appstream_stack";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/appstream_stack aws_appstream_stack} 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 AppstreamStackConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_appstream_stack',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._displayName = config.displayName;
        this._embedHostDomains = config.embedHostDomains;
        this._feedbackUrl = config.feedbackUrl;
        this._name = config.name;
        this._redirectUrl = config.redirectUrl;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._accessEndpoints = config.accessEndpoints;
        this._applicationSettings.internalValue = config.applicationSettings;
        this._storageConnectors = config.storageConnectors;
        this._userSettings = config.userSettings;
    }
    // ==========
    // 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;
    }
    // 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;
    }
    // embed_host_domains - computed: true, optional: true, required: false
    _embedHostDomains;
    get embedHostDomains() {
        return cdktf.Fn.tolist(this.getListAttribute('embed_host_domains'));
    }
    set embedHostDomains(value) {
        this._embedHostDomains = value;
    }
    resetEmbedHostDomains() {
        this._embedHostDomains = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get embedHostDomainsInput() {
        return this._embedHostDomains;
    }
    // feedback_url - computed: true, optional: true, required: false
    _feedbackUrl;
    get feedbackUrl() {
        return this.getStringAttribute('feedback_url');
    }
    set feedbackUrl(value) {
        this._feedbackUrl = value;
    }
    resetFeedbackUrl() {
        this._feedbackUrl = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get feedbackUrlInput() {
        return this._feedbackUrl;
    }
    // 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;
    }
    // redirect_url - computed: true, optional: true, required: false
    _redirectUrl;
    get redirectUrl() {
        return this.getStringAttribute('redirect_url');
    }
    set redirectUrl(value) {
        this._redirectUrl = value;
    }
    resetRedirectUrl() {
        this._redirectUrl = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get redirectUrlInput() {
        return this._redirectUrl;
    }
    // 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;
    }
    // access_endpoints - computed: false, optional: true, required: false
    _accessEndpoints;
    get accessEndpoints() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('access_endpoints')));
    }
    set accessEndpoints(value) {
        this._accessEndpoints = value;
    }
    resetAccessEndpoints() {
        this._accessEndpoints = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accessEndpointsInput() {
        return this._accessEndpoints;
    }
    // application_settings - computed: false, optional: true, required: false
    _applicationSettings = new AppstreamStackApplicationSettingsOutputReference(this, "application_settings", true);
    get applicationSettings() {
        return this._applicationSettings;
    }
    putApplicationSettings(value) {
        this._applicationSettings.internalValue = value;
    }
    resetApplicationSettings() {
        this._applicationSettings.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get applicationSettingsInput() {
        return this._applicationSettings.internalValue;
    }
    // storage_connectors - computed: false, optional: true, required: false
    _storageConnectors;
    get storageConnectors() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('storage_connectors')));
    }
    set storageConnectors(value) {
        this._storageConnectors = value;
    }
    resetStorageConnectors() {
        this._storageConnectors = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get storageConnectorsInput() {
        return this._storageConnectors;
    }
    // user_settings - computed: false, optional: true, required: false
    _userSettings;
    get userSettings() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('user_settings')));
    }
    set userSettings(value) {
        this._userSettings = value;
    }
    resetUserSettings() {
        this._userSettings = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get userSettingsInput() {
        return this._userSettings;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            description: cdktf.stringToTerraform(this._description),
            display_name: cdktf.stringToTerraform(this._displayName),
            embed_host_domains: cdktf.listMapper(cdktf.stringToTerraform)(this._embedHostDomains),
            feedback_url: cdktf.stringToTerraform(this._feedbackUrl),
            name: cdktf.stringToTerraform(this._name),
            redirect_url: cdktf.stringToTerraform(this._redirectUrl),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            access_endpoints: cdktf.listMapper(appstreamStackAccessEndpointsToTerraform)(this._accessEndpoints),
            application_settings: appstreamStackApplicationSettingsToTerraform(this._applicationSettings.internalValue),
            storage_connectors: cdktf.listMapper(appstreamStackStorageConnectorsToTerraform)(this._storageConnectors),
            user_settings: cdktf.listMapper(appstreamStackUserSettingsToTerraform)(this._userSettings),
        };
    }
}
//# sourceMappingURL=appstream-stack.js.map