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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy