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

com.pulumi.gcp.cloudrun.kotlin.inputs.ServiceTemplateSpecContainerResourcesArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudrun.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecContainerResourcesArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property limits Limits describes the maximum amount of compute resources allowed.
 * The values of the map is string form of the 'quantity' k8s type:
 * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
 * @property requests Requests describes the minimum amount of compute resources required.
 * If Requests is omitted for a container, it defaults to Limits if that is
 * explicitly specified, otherwise to an implementation-defined value.
 * The values of the map is string form of the 'quantity' k8s type:
 * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
 */
public data class ServiceTemplateSpecContainerResourcesArgs(
    public val limits: Output>? = null,
    public val requests: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecContainerResourcesArgs =
        com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecContainerResourcesArgs.builder()
            .limits(limits?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .requests(
                requests?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var requests: Output>? = null

    /**
     * @param value Limits describes the maximum amount of compute resources allowed.
     * The values of the map is string form of the 'quantity' k8s type:
     * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
     */
    @JvmName("asfxtfufstgyiakr")
    public suspend fun limits(`value`: Output>) {
        this.limits = value
    }

    /**
     * @param value Requests describes the minimum amount of compute resources required.
     * If Requests is omitted for a container, it defaults to Limits if that is
     * explicitly specified, otherwise to an implementation-defined value.
     * The values of the map is string form of the 'quantity' k8s type:
     * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
     */
    @JvmName("inxxmcrhisgqsnlm")
    public suspend fun requests(`value`: Output>) {
        this.requests = value
    }

    /**
     * @param value Limits describes the maximum amount of compute resources allowed.
     * The values of the map is string form of the 'quantity' k8s type:
     * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
     */
    @JvmName("rudmyonqabqkorix")
    public suspend fun limits(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.limits = mapped
    }

    /**
     * @param values Limits describes the maximum amount of compute resources allowed.
     * The values of the map is string form of the 'quantity' k8s type:
     * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
     */
    @JvmName("bqtcrtqruuakwtne")
    public fun limits(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.limits = mapped
    }

    /**
     * @param value Requests describes the minimum amount of compute resources required.
     * If Requests is omitted for a container, it defaults to Limits if that is
     * explicitly specified, otherwise to an implementation-defined value.
     * The values of the map is string form of the 'quantity' k8s type:
     * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
     */
    @JvmName("lrxaemtoculauqpe")
    public suspend fun requests(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requests = mapped
    }

    /**
     * @param values Requests describes the minimum amount of compute resources required.
     * If Requests is omitted for a container, it defaults to Limits if that is
     * explicitly specified, otherwise to an implementation-defined value.
     * The values of the map is string form of the 'quantity' k8s type:
     * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
     */
    @JvmName("gavclviovsraqnle")
    public fun requests(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.requests = mapped
    }

    internal fun build(): ServiceTemplateSpecContainerResourcesArgs =
        ServiceTemplateSpecContainerResourcesArgs(
            limits = limits,
            requests = requests,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy