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

com.pulumi.kubernetes.apiextensions.v1beta1.kotlin.inputs.CustomResourceSubresourcesPatchArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.apiextensions.v1beta1.kotlin.inputs

import com.google.gson.JsonParser
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 com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceSubresourcesPatchArgs.builder
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * CustomResourceSubresources defines the status and scale subresources for CustomResources.
 * @property scale scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
 * @property status status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
 */
public data class CustomResourceSubresourcesPatchArgs(
    public val scale: Output? = null,
    public val status: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceSubresourcesPatchArgs =
        com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceSubresourcesPatchArgs.builder()
            .scale(scale?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .status(
                status?.applyValue({ args0 ->
                    JsonParser.parseString(Json.encodeToString(JsonElement.serializer(), args0))
                }),
            ).build()
}

/**
 * Builder for [CustomResourceSubresourcesPatchArgs].
 */
@PulumiTagMarker
public class CustomResourceSubresourcesPatchArgsBuilder internal constructor() {
    private var scale: Output? = null

    private var status: Output? = null

    /**
     * @param value scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
     */
    @JvmName("bsciiposkgvkjuyj")
    public suspend fun scale(`value`: Output) {
        this.scale = value
    }

    /**
     * @param value status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
     */
    @JvmName("fepwjferrhsbgnel")
    public suspend fun status(`value`: Output) {
        this.status = value
    }

    /**
     * @param value scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
     */
    @JvmName("akkxbaqtiyvurvfx")
    public suspend fun scale(`value`: CustomResourceSubresourceScalePatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scale = mapped
    }

    /**
     * @param argument scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
     */
    @JvmName("iccmtxfjmixbxbcr")
    public suspend fun scale(argument: suspend CustomResourceSubresourceScalePatchArgsBuilder.() -> Unit) {
        val toBeMapped = CustomResourceSubresourceScalePatchArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.scale = mapped
    }

    /**
     * @param value status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
     */
    @JvmName("qyqppuessbmgslbu")
    public suspend fun status(`value`: JsonElement?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.status = mapped
    }

    internal fun build(): CustomResourceSubresourcesPatchArgs = CustomResourceSubresourcesPatchArgs(
        scale = scale,
        status = status,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy