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

com.pulumi.awsnative.deadline.kotlin.StorageProfile.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.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.deadline.kotlin

import com.pulumi.awsnative.deadline.kotlin.enums.StorageProfileOperatingSystemFamily
import com.pulumi.awsnative.deadline.kotlin.outputs.StorageProfileFileSystemLocation
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.deadline.kotlin.enums.StorageProfileOperatingSystemFamily.Companion.toKotlin as storageProfileOperatingSystemFamilyToKotlin
import com.pulumi.awsnative.deadline.kotlin.outputs.StorageProfileFileSystemLocation.Companion.toKotlin as storageProfileFileSystemLocationToKotlin

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

    public var args: StorageProfileArgs = StorageProfileArgs()

    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 StorageProfileArgsBuilder.() -> Unit) {
        val builder = StorageProfileArgsBuilder()
        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(): StorageProfile {
        val builtJavaResource = com.pulumi.awsnative.deadline.StorageProfile(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return StorageProfile(builtJavaResource)
    }
}

/**
 * Definition of AWS::Deadline::StorageProfile Resource Type
 */
public class StorageProfile internal constructor(
    override val javaResource: com.pulumi.awsnative.deadline.StorageProfile,
) : KotlinCustomResource(javaResource, StorageProfileMapper) {
    /**
     * The display name of the storage profile summary to update.
     */
    public val displayName: Output
        get() = javaResource.displayName().applyValue({ args0 -> args0 })

    /**
     * The unique identifier of the farm that contains the storage profile.
     */
    public val farmId: Output?
        get() = javaResource.farmId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Operating system specific file system path to the storage location.
     */
    public val fileSystemLocations: Output>?
        get() = javaResource.fileSystemLocations().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        storageProfileFileSystemLocationToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * The operating system (OS) family.
     */
    public val osFamily: Output
        get() = javaResource.osFamily().applyValue({ args0 ->
            args0.let({ args0 ->
                storageProfileOperatingSystemFamilyToKotlin(args0)
            })
        })

    /**
     * The storage profile ID.
     */
    public val storageProfileId: Output
        get() = javaResource.storageProfileId().applyValue({ args0 -> args0 })
}

public object StorageProfileMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.deadline.StorageProfile::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy