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

com.pulumi.kubernetes.discovery.v1beta1.kotlin.inputs.EndpointPatchArgs.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.discovery.v1beta1.kotlin.inputs

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.ObjectReferencePatchArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.ObjectReferencePatchArgsBuilder
import com.pulumi.kubernetes.discovery.v1beta1.inputs.EndpointPatchArgs.builder
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Endpoint represents a single logical "backend" implementing a service.
 * @property addresses addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
 * @property conditions conditions contains information about the current status of the endpoint.
 * @property hostname hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.
 * @property nodeName nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
 * @property targetRef targetRef is a reference to a Kubernetes object that represents this endpoint.
 * @property topology topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node
 *   where the endpoint is located. This should match the corresponding
 *   node label.
 * * topology.kubernetes.io/zone: the value indicates the zone where the
 *   endpoint is located. This should match the corresponding node label.
 * * topology.kubernetes.io/region: the value indicates the region where the
 *   endpoint is located. This should match the corresponding node label.
 */
public data class EndpointPatchArgs(
    public val addresses: Output>? = null,
    public val conditions: Output? = null,
    public val hostname: Output? = null,
    public val nodeName: Output? = null,
    public val targetRef: Output? = null,
    public val topology: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.discovery.v1beta1.inputs.EndpointPatchArgs =
        com.pulumi.kubernetes.discovery.v1beta1.inputs.EndpointPatchArgs.builder()
            .addresses(addresses?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .conditions(conditions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .hostname(hostname?.applyValue({ args0 -> args0 }))
            .nodeName(nodeName?.applyValue({ args0 -> args0 }))
            .targetRef(targetRef?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .topology(
                topology?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var conditions: Output? = null

    private var hostname: Output? = null

    private var nodeName: Output? = null

    private var targetRef: Output? = null

    private var topology: Output>? = null

    /**
     * @param value addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
     */
    @JvmName("ynebssfgaxymwjub")
    public suspend fun addresses(`value`: Output>) {
        this.addresses = value
    }

    @JvmName("hpkgbheqfsileamc")
    public suspend fun addresses(vararg values: Output) {
        this.addresses = Output.all(values.asList())
    }

    /**
     * @param values addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
     */
    @JvmName("lqtvhhvouuttvqki")
    public suspend fun addresses(values: List>) {
        this.addresses = Output.all(values)
    }

    /**
     * @param value conditions contains information about the current status of the endpoint.
     */
    @JvmName("dwateidasgwjpflr")
    public suspend fun conditions(`value`: Output) {
        this.conditions = value
    }

    /**
     * @param value hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.
     */
    @JvmName("iabkusbxfimyrtnf")
    public suspend fun hostname(`value`: Output) {
        this.hostname = value
    }

    /**
     * @param value nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
     */
    @JvmName("ildoibhdyfxqvaig")
    public suspend fun nodeName(`value`: Output) {
        this.nodeName = value
    }

    /**
     * @param value targetRef is a reference to a Kubernetes object that represents this endpoint.
     */
    @JvmName("fwsakgdgywrjbtts")
    public suspend fun targetRef(`value`: Output) {
        this.targetRef = value
    }

    /**
     * @param value topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node
     *   where the endpoint is located. This should match the corresponding
     *   node label.
     * * topology.kubernetes.io/zone: the value indicates the zone where the
     *   endpoint is located. This should match the corresponding node label.
     * * topology.kubernetes.io/region: the value indicates the region where the
     *   endpoint is located. This should match the corresponding node label.
     */
    @JvmName("omlkckmvxuxficas")
    public suspend fun topology(`value`: Output>) {
        this.topology = value
    }

    /**
     * @param value addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
     */
    @JvmName("mcqkcyhahgonifbb")
    public suspend fun addresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.addresses = mapped
    }

    /**
     * @param values addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
     */
    @JvmName("dlrhvgthuatrnqnq")
    public suspend fun addresses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.addresses = mapped
    }

    /**
     * @param value conditions contains information about the current status of the endpoint.
     */
    @JvmName("bkbknambfccivemf")
    public suspend fun conditions(`value`: EndpointConditionsPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.conditions = mapped
    }

    /**
     * @param argument conditions contains information about the current status of the endpoint.
     */
    @JvmName("xxcnraufixnhihmj")
    public suspend fun conditions(argument: suspend EndpointConditionsPatchArgsBuilder.() -> Unit) {
        val toBeMapped = EndpointConditionsPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.conditions = mapped
    }

    /**
     * @param value hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.
     */
    @JvmName("wlxukgtcigpjuger")
    public suspend fun hostname(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hostname = mapped
    }

    /**
     * @param value nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
     */
    @JvmName("tvggmicrikkedmag")
    public suspend fun nodeName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeName = mapped
    }

    /**
     * @param value targetRef is a reference to a Kubernetes object that represents this endpoint.
     */
    @JvmName("dharoeiexbkwkwld")
    public suspend fun targetRef(`value`: ObjectReferencePatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetRef = mapped
    }

    /**
     * @param argument targetRef is a reference to a Kubernetes object that represents this endpoint.
     */
    @JvmName("nskxnqcyueahdifa")
    public suspend fun targetRef(argument: suspend ObjectReferencePatchArgsBuilder.() -> Unit) {
        val toBeMapped = ObjectReferencePatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.targetRef = mapped
    }

    /**
     * @param value topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node
     *   where the endpoint is located. This should match the corresponding
     *   node label.
     * * topology.kubernetes.io/zone: the value indicates the zone where the
     *   endpoint is located. This should match the corresponding node label.
     * * topology.kubernetes.io/region: the value indicates the region where the
     *   endpoint is located. This should match the corresponding node label.
     */
    @JvmName("xloxosgbsgoeyatk")
    public suspend fun topology(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.topology = mapped
    }

    /**
     * @param values topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node
     *   where the endpoint is located. This should match the corresponding
     *   node label.
     * * topology.kubernetes.io/zone: the value indicates the zone where the
     *   endpoint is located. This should match the corresponding node label.
     * * topology.kubernetes.io/region: the value indicates the region where the
     *   endpoint is located. This should match the corresponding node label.
     */
    @JvmName("btiogmxwvrwnwwml")
    public fun topology(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.topology = mapped
    }

    internal fun build(): EndpointPatchArgs = EndpointPatchArgs(
        addresses = addresses,
        conditions = conditions,
        hostname = hostname,
        nodeName = nodeName,
        targetRef = targetRef,
        topology = topology,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy