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

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

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.discovery.v1.EndpointSliceArgs.builder
import com.pulumi.kubernetes.discovery.v1.kotlin.inputs.EndpointArgs
import com.pulumi.kubernetes.discovery.v1.kotlin.inputs.EndpointArgsBuilder
import com.pulumi.kubernetes.discovery.v1.kotlin.inputs.EndpointPortArgs
import com.pulumi.kubernetes.discovery.v1.kotlin.inputs.EndpointPortArgsBuilder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.ObjectMetaArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.ObjectMetaArgsBuilder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
 * @property addressType addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
 * @property apiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 * @property endpoints endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
 * @property kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 * @property metadata Standard object's metadata.
 * @property ports ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports.
 */
public data class EndpointSliceArgs(
    public val addressType: Output? = null,
    public val apiVersion: Output? = null,
    public val endpoints: Output>? = null,
    public val kind: Output? = null,
    public val metadata: Output? = null,
    public val ports: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.discovery.v1.EndpointSliceArgs =
        com.pulumi.kubernetes.discovery.v1.EndpointSliceArgs.builder()
            .addressType(addressType?.applyValue({ args0 -> args0 }))
            .apiVersion(apiVersion?.applyValue({ args0 -> args0 }))
            .endpoints(
                endpoints?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .kind(kind?.applyValue({ args0 -> args0 }))
            .metadata(metadata?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ports(
                ports?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [EndpointSliceArgs].
 */
@PulumiTagMarker
public class EndpointSliceArgsBuilder internal constructor() {
    private var addressType: Output? = null

    private var apiVersion: Output? = null

    private var endpoints: Output>? = null

    private var kind: Output? = null

    private var metadata: Output? = null

    private var ports: Output>? = null

    /**
     * @param value addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
     */
    @JvmName("ltyqvuryedukpqaq")
    public suspend fun addressType(`value`: Output) {
        this.addressType = value
    }

    /**
     * @param value APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
     */
    @JvmName("lqorcibdajwihhfk")
    public suspend fun apiVersion(`value`: Output) {
        this.apiVersion = value
    }

    /**
     * @param value endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
     */
    @JvmName("mljmkcswvdeqskfh")
    public suspend fun endpoints(`value`: Output>) {
        this.endpoints = value
    }

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

    /**
     * @param values endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
     */
    @JvmName("lqphthtoxvgchtrq")
    public suspend fun endpoints(values: List>) {
        this.endpoints = Output.all(values)
    }

    /**
     * @param value Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
     */
    @JvmName("cesxscgqibubpmdt")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value Standard object's metadata.
     */
    @JvmName("lbvmqjdojvqgecmf")
    public suspend fun metadata(`value`: Output) {
        this.metadata = value
    }

    /**
     * @param value ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports.
     */
    @JvmName("jdqtelnkrwijlwfs")
    public suspend fun ports(`value`: Output>) {
        this.ports = value
    }

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

    /**
     * @param values ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports.
     */
    @JvmName("yxcycexwrcivxvto")
    public suspend fun ports(values: List>) {
        this.ports = Output.all(values)
    }

    /**
     * @param value addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
     */
    @JvmName("ucdvcvjpalmeedbs")
    public suspend fun addressType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.addressType = mapped
    }

    /**
     * @param value APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
     */
    @JvmName("wuetmwtmpqxgnwwa")
    public suspend fun apiVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiVersion = mapped
    }

    /**
     * @param value endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
     */
    @JvmName("xnampntwymnwisen")
    public suspend fun endpoints(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endpoints = mapped
    }

    /**
     * @param argument endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
     */
    @JvmName("gpcaiipbtlsrtikn")
    public suspend fun endpoints(argument: List Unit>) {
        val toBeMapped = argument.toList().map { EndpointArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.endpoints = mapped
    }

    /**
     * @param argument endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
     */
    @JvmName("plmxdooahnqravhu")
    public suspend fun endpoints(vararg argument: suspend EndpointArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { EndpointArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.endpoints = mapped
    }

    /**
     * @param argument endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
     */
    @JvmName("kdmkvousmwvnfqdt")
    public suspend fun endpoints(argument: suspend EndpointArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EndpointArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.endpoints = mapped
    }

    /**
     * @param values endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.
     */
    @JvmName("jfivofyoajiiehot")
    public suspend fun endpoints(vararg values: EndpointArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.endpoints = mapped
    }

    /**
     * @param value Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
     */
    @JvmName("fsalubsvmfqfiktv")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value Standard object's metadata.
     */
    @JvmName("xshjygcboihjywnn")
    public suspend fun metadata(`value`: ObjectMetaArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param argument Standard object's metadata.
     */
    @JvmName("lmdawiqgmahcacmi")
    public suspend fun metadata(argument: suspend ObjectMetaArgsBuilder.() -> Unit) {
        val toBeMapped = ObjectMetaArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.metadata = mapped
    }

    /**
     * @param value ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports.
     */
    @JvmName("rotqsjxhdahfkbjk")
    public suspend fun ports(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    /**
     * @param argument ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports.
     */
    @JvmName("cnlkoncybjukfbqi")
    public suspend fun ports(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EndpointPortArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param argument ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports.
     */
    @JvmName("breblmitcqgjfloy")
    public suspend fun ports(vararg argument: suspend EndpointPortArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EndpointPortArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param argument ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports.
     */
    @JvmName("shkvhoexjypgggku")
    public suspend fun ports(argument: suspend EndpointPortArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EndpointPortArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param values ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports.
     */
    @JvmName("bgdggiukpklbfxmr")
    public suspend fun ports(vararg values: EndpointPortArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    internal fun build(): EndpointSliceArgs = EndpointSliceArgs(
        addressType = addressType,
        apiVersion = apiVersion,
        endpoints = endpoints,
        kind = kind,
        metadata = metadata,
        ports = ports,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy