com.pulumi.kubernetes.extensions.v1beta1.kotlin.inputs.IngressBackendArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-kotlin Show documentation
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.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.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.core.v1.kotlin.inputs.TypedLocalObjectReferenceArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.TypedLocalObjectReferenceArgsBuilder
import com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressBackendArgs.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 IngressBackendArgs(
public val resource: Output? = null,
public val serviceName: Output,
public val servicePort: Output>,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressBackendArgs =
com.pulumi.kubernetes.extensions.v1beta1.inputs.IngressBackendArgs.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 [IngressBackendArgs].
*/
@PulumiTagMarker
public class IngressBackendArgsBuilder 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("bwdeigumaylwblsw")
public suspend fun resource(`value`: Output) {
this.resource = value
}
/**
* @param value Specifies the name of the referenced service.
*/
@JvmName("lmuxbgjqokoehobb")
public suspend fun serviceName(`value`: Output) {
this.serviceName = value
}
/**
* @param value Specifies the port of the referenced service.
*/
@JvmName("fobxlunuajywnbmb")
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("fqkfdmwjxbabdfxg")
public suspend fun resource(`value`: TypedLocalObjectReferenceArgs?) {
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("xmktddjpokjfqhii")
public suspend fun resource(argument: suspend TypedLocalObjectReferenceArgsBuilder.() -> Unit) {
val toBeMapped = TypedLocalObjectReferenceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.resource = mapped
}
/**
* @param value Specifies the name of the referenced service.
*/
@JvmName("weelymhxglrysvls")
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("kaqplllijtgddbcy")
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("atwnxjwxldhkjimj")
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("mrtcaucuyqtbiplx")
public fun servicePort(`value`: String) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.servicePort = mapped
}
internal fun build(): IngressBackendArgs = IngressBackendArgs(
resource = resource,
serviceName = serviceName ?: throw PulumiNullFieldException("serviceName"),
servicePort = servicePort ?: throw PulumiNullFieldException("servicePort"),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy