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

com.pulumi.kubernetes.discovery.v1.kotlin.inputs.EndpointArgs.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.v1.kotlin.inputs

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.ObjectReferenceArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.ObjectReferenceArgsBuilder
import com.pulumi.kubernetes.discovery.v1.inputs.EndpointArgs.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. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267
 * @property conditions conditions contains information about the current status of the endpoint.
 * @property deprecatedTopology deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24).  While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.
 * @property hints hints contains information associated with how an endpoint should be consumed.
 * @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 be lowercase and 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.
 * @property targetRef targetRef is a reference to a Kubernetes object that represents this endpoint.
 * @property zone zone is the name of the Zone this endpoint exists in.
 */
public data class EndpointArgs(
    public val addresses: Output>,
    public val conditions: Output? = null,
    public val deprecatedTopology: Output>? = null,
    public val hints: Output? = null,
    public val hostname: Output? = null,
    public val nodeName: Output? = null,
    public val targetRef: Output? = null,
    public val zone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.discovery.v1.inputs.EndpointArgs =
        com.pulumi.kubernetes.discovery.v1.inputs.EndpointArgs.builder()
            .addresses(addresses.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .conditions(conditions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .deprecatedTopology(
                deprecatedTopology?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .hints(hints?.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() }) }))
            .zone(zone?.applyValue({ args0 -> args0 })).build()
}

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

    private var conditions: Output? = null

    private var deprecatedTopology: Output>? = null

    private var hints: Output? = null

    private var hostname: Output? = null

    private var nodeName: Output? = null

    private var targetRef: Output? = null

    private var zone: 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. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267
     */
    @JvmName("jlromcmbsdkrgnoh")
    public suspend fun addresses(`value`: Output>) {
        this.addresses = value
    }

    @JvmName("yewpdhvirylvvqxh")
    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. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267
     */
    @JvmName("pqigwnfldjdfnevx")
    public suspend fun addresses(values: List>) {
        this.addresses = Output.all(values)
    }

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

    /**
     * @param value deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24).  While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.
     */
    @JvmName("qqxavghkdbqdtplc")
    public suspend fun deprecatedTopology(`value`: Output>) {
        this.deprecatedTopology = value
    }

    /**
     * @param value hints contains information associated with how an endpoint should be consumed.
     */
    @JvmName("bifucywwiwnsfogt")
    public suspend fun hints(`value`: Output) {
        this.hints = 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 be lowercase and pass DNS Label (RFC 1123) validation.
     */
    @JvmName("qjjvlauagtnxdveo")
    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.
     */
    @JvmName("ixauucvvpqtcawgn")
    public suspend fun nodeName(`value`: Output) {
        this.nodeName = value
    }

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

    /**
     * @param value zone is the name of the Zone this endpoint exists in.
     */
    @JvmName("xihslrclsnnvedha")
    public suspend fun zone(`value`: Output) {
        this.zone = 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. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267
     */
    @JvmName("cpgnuqcwmhebbjjl")
    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. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267
     */
    @JvmName("etnqktfmxahtgppu")
    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("rhqqddvdqxrvtfur")
    public suspend fun conditions(`value`: EndpointConditionsArgs?) {
        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("kmkaucuhlxdthivf")
    public suspend fun conditions(argument: suspend EndpointConditionsArgsBuilder.() -> Unit) {
        val toBeMapped = EndpointConditionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.conditions = mapped
    }

    /**
     * @param value deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24).  While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.
     */
    @JvmName("overguntccfykhfe")
    public suspend fun deprecatedTopology(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deprecatedTopology = mapped
    }

    /**
     * @param values deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24).  While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.
     */
    @JvmName("misegdntgasipbir")
    public fun deprecatedTopology(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deprecatedTopology = mapped
    }

    /**
     * @param value hints contains information associated with how an endpoint should be consumed.
     */
    @JvmName("qqpavvcqpmtsnrsy")
    public suspend fun hints(`value`: EndpointHintsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hints = mapped
    }

    /**
     * @param argument hints contains information associated with how an endpoint should be consumed.
     */
    @JvmName("nddmainwdescdrhj")
    public suspend fun hints(argument: suspend EndpointHintsArgsBuilder.() -> Unit) {
        val toBeMapped = EndpointHintsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.hints = 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 be lowercase and pass DNS Label (RFC 1123) validation.
     */
    @JvmName("lavwkgxmqntavnlr")
    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.
     */
    @JvmName("obrphfumwtwxkcui")
    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("lnyhumvciyrbhevf")
    public suspend fun targetRef(`value`: ObjectReferenceArgs?) {
        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("vxmrpeusqptiwsim")
    public suspend fun targetRef(argument: suspend ObjectReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = ObjectReferenceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.targetRef = mapped
    }

    /**
     * @param value zone is the name of the Zone this endpoint exists in.
     */
    @JvmName("fccbbcojnawycwtk")
    public suspend fun zone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zone = mapped
    }

    internal fun build(): EndpointArgs = EndpointArgs(
        addresses = addresses ?: throw PulumiNullFieldException("addresses"),
        conditions = conditions,
        deprecatedTopology = deprecatedTopology,
        hints = hints,
        hostname = hostname,
        nodeName = nodeName,
        targetRef = targetRef,
        zone = zone,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy