All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.workspacesweb.kotlin.UserSettings.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.workspacesweb.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.workspacesweb.kotlin.enums.UserSettingsEnabledType
import com.pulumi.awsnative.workspacesweb.kotlin.outputs.UserSettingsCookieSynchronizationConfiguration
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.workspacesweb.kotlin.enums.UserSettingsEnabledType.Companion.toKotlin as userSettingsEnabledTypeToKotlin
import com.pulumi.awsnative.workspacesweb.kotlin.outputs.UserSettingsCookieSynchronizationConfiguration.Companion.toKotlin as userSettingsCookieSynchronizationConfigurationToKotlin

/**
 * Builder for [UserSettings].
 */
@PulumiTagMarker
public class UserSettingsResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: UserSettingsArgs = UserSettingsArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend UserSettingsArgsBuilder.() -> Unit) {
        val builder = UserSettingsArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): UserSettings {
        val builtJavaResource = com.pulumi.awsnative.workspacesweb.UserSettings(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return UserSettings(builtJavaResource)
    }
}

/**
 * Definition of AWS::WorkSpacesWeb::UserSettings Resource Type
 */
public class UserSettings internal constructor(
    override val javaResource: com.pulumi.awsnative.workspacesweb.UserSettings,
) : KotlinCustomResource(javaResource, UserSettingsMapper) {
    /**
     * The additional encryption context of the user settings.
     */
    public val additionalEncryptionContext: Output>?
        get() = javaResource.additionalEncryptionContext().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0.key.to(args0.value) }).toMap()
            }).orElse(null)
        })

    /**
     * A list of web portal ARNs that this user settings resource is associated with.
     */
    public val associatedPortalArns: Output>
        get() = javaResource.associatedPortalArns().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The configuration that specifies which cookies should be synchronized from the end user's local browser to the remote browser.
     */
    public val cookieSynchronizationConfiguration:
        Output?
        get() = javaResource.cookieSynchronizationConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    userSettingsCookieSynchronizationConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Specifies whether the user can copy text from the streaming session to the local device.
     */
    public val copyAllowed: Output
        get() = javaResource.copyAllowed().applyValue({ args0 ->
            args0.let({ args0 ->
                userSettingsEnabledTypeToKotlin(args0)
            })
        })

    /**
     * The customer managed key used to encrypt sensitive information in the user settings.
     */
    public val customerManagedKey: Output?
        get() = javaResource.customerManagedKey().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies whether the user can use deep links that open automatically when connecting to a session.
     */
    public val deepLinkAllowed: Output?
        get() = javaResource.deepLinkAllowed().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> userSettingsEnabledTypeToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The amount of time that a streaming session remains active after users disconnect.
     */
    public val disconnectTimeoutInMinutes: Output?
        get() = javaResource.disconnectTimeoutInMinutes().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies whether the user can download files from the streaming session to the local device.
     */
    public val downloadAllowed: Output
        get() = javaResource.downloadAllowed().applyValue({ args0 ->
            args0.let({ args0 ->
                userSettingsEnabledTypeToKotlin(args0)
            })
        })

    /**
     * The amount of time that users can be idle (inactive) before they are disconnected from their streaming session and the disconnect timeout interval begins.
     */
    public val idleDisconnectTimeoutInMinutes: Output?
        get() = javaResource.idleDisconnectTimeoutInMinutes().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies whether the user can paste text from the local device to the streaming session.
     */
    public val pasteAllowed: Output
        get() = javaResource.pasteAllowed().applyValue({ args0 ->
            args0.let({ args0 ->
                userSettingsEnabledTypeToKotlin(args0)
            })
        })

    /**
     * Specifies whether the user can print to the local device.
     */
    public val printAllowed: Output
        get() = javaResource.printAllowed().applyValue({ args0 ->
            args0.let({ args0 ->
                userSettingsEnabledTypeToKotlin(args0)
            })
        })

    /**
     * The tags to add to the user settings resource. A tag is a key-value pair.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Specifies whether the user can upload files from the local device to the streaming session.
     */
    public val uploadAllowed: Output
        get() = javaResource.uploadAllowed().applyValue({ args0 ->
            args0.let({ args0 ->
                userSettingsEnabledTypeToKotlin(args0)
            })
        })

    /**
     * The ARN of the user settings.
     */
    public val userSettingsArn: Output
        get() = javaResource.userSettingsArn().applyValue({ args0 -> args0 })
}

public object UserSettingsMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.workspacesweb.UserSettings::class == javaResource::class

    override fun map(javaResource: Resource): UserSettings = UserSettings(
        javaResource as
            com.pulumi.awsnative.workspacesweb.UserSettings,
    )
}

/**
 * @see [UserSettings].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [UserSettings].
 */
public suspend fun userSettings(
    name: String,
    block: suspend UserSettingsResourceBuilder.() -> Unit,
): UserSettings {
    val builder = UserSettingsResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [UserSettings].
 * @param name The _unique_ name of the resulting resource.
 */
public fun userSettings(name: String): UserSettings {
    val builder = UserSettingsResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy