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

com.pulumi.digitalocean.kotlin.inputs.GetRegionsPlainArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.digitalocean.kotlin.inputs

import com.pulumi.digitalocean.inputs.GetRegionsPlainArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A collection of arguments for invoking getRegions.
 * @property filters Filter the results.
 * The `filter` block is documented below.
 * @property sorts Sort the results.
 * The `sort` block is documented below.
 */
public data class GetRegionsPlainArgs(
    public val filters: List? = null,
    public val sorts: List? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.inputs.GetRegionsPlainArgs =
        com.pulumi.digitalocean.inputs.GetRegionsPlainArgs.builder()
            .filters(filters?.let({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .sorts(sorts?.let({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) })).build()
}

/**
 * Builder for [GetRegionsPlainArgs].
 */
@PulumiTagMarker
public class GetRegionsPlainArgsBuilder internal constructor() {
    private var filters: List? = null

    private var sorts: List? = null

    /**
     * @param value Filter the results.
     * The `filter` block is documented below.
     */
    @JvmName("mebocpqiiisasltx")
    public suspend fun filters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.filters = mapped
    }

    /**
     * @param argument Filter the results.
     * The `filter` block is documented below.
     */
    @JvmName("jfbbndgenrsrubde")
    public suspend fun filters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GetRegionsFilterBuilder().applySuspend { it() }.build()
        }
        val mapped = toBeMapped
        this.filters = mapped
    }

    /**
     * @param argument Filter the results.
     * The `filter` block is documented below.
     */
    @JvmName("cwmfqwjvxvkgjbib")
    public suspend fun filters(vararg argument: suspend GetRegionsFilterBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GetRegionsFilterBuilder().applySuspend { it() }.build()
        }
        val mapped = toBeMapped
        this.filters = mapped
    }

    /**
     * @param argument Filter the results.
     * The `filter` block is documented below.
     */
    @JvmName("aykxbucmbqlwybwi")
    public suspend fun filters(argument: suspend GetRegionsFilterBuilder.() -> Unit) {
        val toBeMapped = listOf(GetRegionsFilterBuilder().applySuspend { argument() }.build())
        val mapped = toBeMapped
        this.filters = mapped
    }

    /**
     * @param values Filter the results.
     * The `filter` block is documented below.
     */
    @JvmName("xbhhymygehujhdax")
    public suspend fun filters(vararg values: GetRegionsFilter) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.filters = mapped
    }

    /**
     * @param value Sort the results.
     * The `sort` block is documented below.
     */
    @JvmName("wdgrqjsuwntmwspx")
    public suspend fun sorts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> args0 })
        this.sorts = mapped
    }

    /**
     * @param argument Sort the results.
     * The `sort` block is documented below.
     */
    @JvmName("tueywmyqnerufnrt")
    public suspend fun sorts(argument: List Unit>) {
        val toBeMapped = argument.toList().map { GetRegionsSortBuilder().applySuspend { it() }.build() }
        val mapped = toBeMapped
        this.sorts = mapped
    }

    /**
     * @param argument Sort the results.
     * The `sort` block is documented below.
     */
    @JvmName("bjcytekvwxichmwd")
    public suspend fun sorts(vararg argument: suspend GetRegionsSortBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { GetRegionsSortBuilder().applySuspend { it() }.build() }
        val mapped = toBeMapped
        this.sorts = mapped
    }

    /**
     * @param argument Sort the results.
     * The `sort` block is documented below.
     */
    @JvmName("nrfoctxhtmbsvbsj")
    public suspend fun sorts(argument: suspend GetRegionsSortBuilder.() -> Unit) {
        val toBeMapped = listOf(GetRegionsSortBuilder().applySuspend { argument() }.build())
        val mapped = toBeMapped
        this.sorts = mapped
    }

    /**
     * @param values Sort the results.
     * The `sort` block is documented below.
     */
    @JvmName("uvtsydegevtjxcqw")
    public suspend fun sorts(vararg values: GetRegionsSort) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> args0 })
        this.sorts = mapped
    }

    internal fun build(): GetRegionsPlainArgs = GetRegionsPlainArgs(
        filters = filters,
        sorts = sorts,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy