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

com.pulumi.kubernetes.discovery.v1.kotlin.outputs.Endpoint.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.outputs

import com.pulumi.kubernetes.core.v1.kotlin.outputs.ObjectReference
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map

/**
 * 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 Endpoint(
    public val addresses: List,
    public val conditions: EndpointConditions? = null,
    public val deprecatedTopology: Map? = null,
    public val hints: EndpointHints? = null,
    public val hostname: String? = null,
    public val nodeName: String? = null,
    public val targetRef: ObjectReference? = null,
    public val zone: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.discovery.v1.outputs.Endpoint): Endpoint =
            Endpoint(
                addresses = javaType.addresses().map({ args0 -> args0 }),
                conditions = javaType.conditions().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.kubernetes.discovery.v1.kotlin.outputs.EndpointConditions.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                deprecatedTopology = javaType.deprecatedTopology().map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap(),
                hints = javaType.hints().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.kubernetes.discovery.v1.kotlin.outputs.EndpointHints.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                hostname = javaType.hostname().map({ args0 -> args0 }).orElse(null),
                nodeName = javaType.nodeName().map({ args0 -> args0 }).orElse(null),
                targetRef = javaType.targetRef().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.kubernetes.core.v1.kotlin.outputs.ObjectReference.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                zone = javaType.zone().map({ args0 -> args0 }).orElse(null),
            )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy