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

com.pulumi.kubernetes.apiextensions.v1beta1.kotlin.outputs.CustomResourceSubresourceScalePatch.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.outputs

import kotlin.String
import kotlin.Suppress

/**
 * CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
 * @property labelSelectorPath labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.
 * @property specReplicasPath specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.
 * @property statusReplicasPath statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.
 */
public data class CustomResourceSubresourceScalePatch(
    public val labelSelectorPath: String? = null,
    public val specReplicasPath: String? = null,
    public val statusReplicasPath: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.apiextensions.v1beta1.outputs.CustomResourceSubresourceScalePatch): CustomResourceSubresourceScalePatch = CustomResourceSubresourceScalePatch(
            labelSelectorPath = javaType.labelSelectorPath().map({ args0 -> args0 }).orElse(null),
            specReplicasPath = javaType.specReplicasPath().map({ args0 -> args0 }).orElse(null),
            statusReplicasPath = javaType.statusReplicasPath().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy