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

com.pulumi.azurenative.iotoperations.kotlin.inputs.VolumeClaimSpecArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.iotoperations.kotlin.inputs

import com.pulumi.azurenative.iotoperations.inputs.VolumeClaimSpecArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * VolumeClaimSpec properties
 * @property accessModes AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
 * @property dataSource This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
 * @property dataSourceRef Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
 * @property resources Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
 * @property selector A label query over volumes to consider for binding.
 * @property storageClassName Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
 * @property volumeMode volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.
 * @property volumeName VolumeName is the binding reference to the PersistentVolume backing this claim.
 */
public data class VolumeClaimSpecArgs(
    public val accessModes: Output>? = null,
    public val dataSource: Output? = null,
    public val dataSourceRef: Output? = null,
    public val resources: Output? = null,
    public val selector: Output? = null,
    public val storageClassName: Output? = null,
    public val volumeMode: Output? = null,
    public val volumeName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.iotoperations.inputs.VolumeClaimSpecArgs =
        com.pulumi.azurenative.iotoperations.inputs.VolumeClaimSpecArgs.builder()
            .accessModes(accessModes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .dataSource(dataSource?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dataSourceRef(dataSourceRef?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resources(resources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .selector(selector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .storageClassName(storageClassName?.applyValue({ args0 -> args0 }))
            .volumeMode(volumeMode?.applyValue({ args0 -> args0 }))
            .volumeName(volumeName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VolumeClaimSpecArgs].
 */
@PulumiTagMarker
public class VolumeClaimSpecArgsBuilder internal constructor() {
    private var accessModes: Output>? = null

    private var dataSource: Output? = null

    private var dataSourceRef: Output? = null

    private var resources: Output? = null

    private var selector: Output? = null

    private var storageClassName: Output? = null

    private var volumeMode: Output? = null

    private var volumeName: Output? = null

    /**
     * @param value AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
     */
    @JvmName("sxshjkqqdaigaxcv")
    public suspend fun accessModes(`value`: Output>) {
        this.accessModes = value
    }

    @JvmName("aiqwtsndohkjpqrp")
    public suspend fun accessModes(vararg values: Output) {
        this.accessModes = Output.all(values.asList())
    }

    /**
     * @param values AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
     */
    @JvmName("vucypuxxkojxctbw")
    public suspend fun accessModes(values: List>) {
        this.accessModes = Output.all(values)
    }

    /**
     * @param value This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
     */
    @JvmName("ghqxtoarfltaihdk")
    public suspend fun dataSource(`value`: Output) {
        this.dataSource = value
    }

    /**
     * @param value Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
     */
    @JvmName("ahurvxoxivymiliw")
    public suspend fun dataSourceRef(`value`: Output) {
        this.dataSourceRef = value
    }

    /**
     * @param value Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
     */
    @JvmName("bhdhyacyvfjxpiqq")
    public suspend fun resources(`value`: Output) {
        this.resources = value
    }

    /**
     * @param value A label query over volumes to consider for binding.
     */
    @JvmName("viobwvqtygfjttlc")
    public suspend fun selector(`value`: Output) {
        this.selector = value
    }

    /**
     * @param value Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
     */
    @JvmName("jvkgbnnwmsgbpqcq")
    public suspend fun storageClassName(`value`: Output) {
        this.storageClassName = value
    }

    /**
     * @param value volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.
     */
    @JvmName("tnuuxyttuooqqved")
    public suspend fun volumeMode(`value`: Output) {
        this.volumeMode = value
    }

    /**
     * @param value VolumeName is the binding reference to the PersistentVolume backing this claim.
     */
    @JvmName("wlunsnbfbqeaatga")
    public suspend fun volumeName(`value`: Output) {
        this.volumeName = value
    }

    /**
     * @param value AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
     */
    @JvmName("ancqjywdcwatcyiq")
    public suspend fun accessModes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessModes = mapped
    }

    /**
     * @param values AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
     */
    @JvmName("xhjfymqehwhhxljl")
    public suspend fun accessModes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.accessModes = mapped
    }

    /**
     * @param value This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
     */
    @JvmName("pwflwtauothjyowf")
    public suspend fun dataSource(`value`: LocalKubernetesReferenceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataSource = mapped
    }

    /**
     * @param argument This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
     */
    @JvmName("axcgndqchroqbfpc")
    public suspend fun dataSource(argument: suspend LocalKubernetesReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = LocalKubernetesReferenceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dataSource = mapped
    }

    /**
     * @param value Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
     */
    @JvmName("empbmhdugfpykukl")
    public suspend fun dataSourceRef(`value`: KubernetesReferenceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataSourceRef = mapped
    }

    /**
     * @param argument Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
     */
    @JvmName("snbmtypnqrdrtaas")
    public suspend fun dataSourceRef(argument: suspend KubernetesReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = KubernetesReferenceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dataSourceRef = mapped
    }

    /**
     * @param value Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
     */
    @JvmName("qjttudtfcgljuihf")
    public suspend fun resources(`value`: VolumeClaimResourceRequirementsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    /**
     * @param argument Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
     */
    @JvmName("weofyfcpqevfegdd")
    public suspend fun resources(argument: suspend VolumeClaimResourceRequirementsArgsBuilder.() -> Unit) {
        val toBeMapped = VolumeClaimResourceRequirementsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.resources = mapped
    }

    /**
     * @param value A label query over volumes to consider for binding.
     */
    @JvmName("xubjxmsguihfanaj")
    public suspend fun selector(`value`: VolumeClaimSpecSelectorArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selector = mapped
    }

    /**
     * @param argument A label query over volumes to consider for binding.
     */
    @JvmName("aawwwxytykukrdnp")
    public suspend fun selector(argument: suspend VolumeClaimSpecSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = VolumeClaimSpecSelectorArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.selector = mapped
    }

    /**
     * @param value Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
     */
    @JvmName("dlqafywyhpackufx")
    public suspend fun storageClassName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageClassName = mapped
    }

    /**
     * @param value volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.
     */
    @JvmName("jqvxkgtxskyprfri")
    public suspend fun volumeMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeMode = mapped
    }

    /**
     * @param value VolumeName is the binding reference to the PersistentVolume backing this claim.
     */
    @JvmName("dxorijqvimdmekyu")
    public suspend fun volumeName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeName = mapped
    }

    internal fun build(): VolumeClaimSpecArgs = VolumeClaimSpecArgs(
        accessModes = accessModes,
        dataSource = dataSource,
        dataSourceRef = dataSourceRef,
        resources = resources,
        selector = selector,
        storageClassName = storageClassName,
        volumeMode = volumeMode,
        volumeName = volumeName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy