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

com.pulumi.kubernetes.extensions.v1beta1.kotlin.inputs.IngressBackendPatchArgs.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: 4.18.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.core.Either
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.core.v1.kotlin.inputs.TypedLocalObjectReferencePatchArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.TypedLocalObjectReferencePatchArgsBuilder
import com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressBackendPatchArgs.builder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * IngressBackend describes all endpoints for a given service and port.
 * @property resource Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.
 * @property serviceName Specifies the name of the referenced service.
 * @property servicePort Specifies the port of the referenced service.
 */
public data class IngressBackendPatchArgs(
    public val resource: Output? = null,
    public val serviceName: Output? = null,
    public val servicePort: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressBackendPatchArgs =
        com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressBackendPatchArgs.builder()
            .resource(resource?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .serviceName(serviceName?.applyValue({ args0 -> args0 }))
            .servicePort(
                servicePort?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0
                    })
                }),
            ).build()
}

/**
 * Builder for [IngressBackendPatchArgs].
 */
@PulumiTagMarker
public class IngressBackendPatchArgsBuilder internal constructor() {
    private var resource: Output? = null

    private var serviceName: Output? = null

    private var servicePort: Output>? = null

    /**
     * @param value Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.
     */
    @JvmName("fgksrxvoyylicxdt")
    public suspend fun resource(`value`: Output) {
        this.resource = value
    }

    /**
     * @param value Specifies the name of the referenced service.
     */
    @JvmName("udrnnbkcdwdxjlug")
    public suspend fun serviceName(`value`: Output) {
        this.serviceName = value
    }

    /**
     * @param value Specifies the port of the referenced service.
     */
    @JvmName("wmjmwarkctxkocid")
    public suspend fun servicePort(`value`: Output>) {
        this.servicePort = value
    }

    /**
     * @param value Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.
     */
    @JvmName("xveopcctbfeswtrt")
    public suspend fun resource(`value`: TypedLocalObjectReferencePatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resource = mapped
    }

    /**
     * @param argument Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.
     */
    @JvmName("ijwmhaqmkdmxxikw")
    public suspend fun resource(argument: suspend TypedLocalObjectReferencePatchArgsBuilder.() -> Unit) {
        val toBeMapped = TypedLocalObjectReferencePatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.resource = mapped
    }

    /**
     * @param value Specifies the name of the referenced service.
     */
    @JvmName("yxwwmyfktfovqyjw")
    public suspend fun serviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceName = mapped
    }

    /**
     * @param value Specifies the port of the referenced service.
     */
    @JvmName("yqqusswdgjxqvhds")
    public suspend fun servicePort(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.servicePort = mapped
    }

    /**
     * @param value Specifies the port of the referenced service.
     */
    @JvmName("lavhqnhollkpknjv")
    public fun servicePort(`value`: Int) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.servicePort = mapped
    }

    /**
     * @param value Specifies the port of the referenced service.
     */
    @JvmName("mustxsecyciixxed")
    public fun servicePort(`value`: String) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.servicePort = mapped
    }

    internal fun build(): IngressBackendPatchArgs = IngressBackendPatchArgs(
        resource = resource,
        serviceName = serviceName,
        servicePort = servicePort,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy