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

com.pulumi.azurenative.costmanagement.kotlin.inputs.ReportConfigDatasetArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.costmanagement.kotlin.inputs

import com.pulumi.azurenative.costmanagement.inputs.ReportConfigDatasetArgs.builder
import com.pulumi.azurenative.costmanagement.kotlin.enums.ReportGranularityType
import com.pulumi.core.Either
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 kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The definition of data present in the report.
 * @property aggregation Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.
 * @property configuration Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.
 * @property filter Has filter expression to use in the report.
 * @property granularity The granularity of rows in the report.
 * @property grouping Array of group by expression to use in the report. Report can have up to 2 group by clauses.
 * @property sorting Array of order by expression to use in the report.
 */
public data class ReportConfigDatasetArgs(
    public val aggregation: Output>? = null,
    public val configuration: Output? = null,
    public val filter: Output? = null,
    public val granularity: Output>? = null,
    public val grouping: Output>? = null,
    public val sorting: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.costmanagement.inputs.ReportConfigDatasetArgs =
        com.pulumi.azurenative.costmanagement.inputs.ReportConfigDatasetArgs.builder()
            .aggregation(
                aggregation?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .configuration(configuration?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .filter(filter?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .granularity(
                granularity?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .grouping(
                grouping?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .sorting(
                sorting?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var configuration: Output? = null

    private var filter: Output? = null

    private var granularity: Output>? = null

    private var grouping: Output>? = null

    private var sorting: Output>? = null

    /**
     * @param value Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.
     */
    @JvmName("xqdutbkuopqincff")
    public suspend fun aggregation(`value`: Output>) {
        this.aggregation = value
    }

    /**
     * @param value Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.
     */
    @JvmName("fjoikugqqraqiubk")
    public suspend fun configuration(`value`: Output) {
        this.configuration = value
    }

    /**
     * @param value Has filter expression to use in the report.
     */
    @JvmName("nouydlquxekebhjl")
    public suspend fun filter(`value`: Output) {
        this.filter = value
    }

    /**
     * @param value The granularity of rows in the report.
     */
    @JvmName("fdltckfuiuopuaqe")
    public suspend fun granularity(`value`: Output>) {
        this.granularity = value
    }

    /**
     * @param value Array of group by expression to use in the report. Report can have up to 2 group by clauses.
     */
    @JvmName("kltepvartxjxiemb")
    public suspend fun grouping(`value`: Output>) {
        this.grouping = value
    }

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

    /**
     * @param values Array of group by expression to use in the report. Report can have up to 2 group by clauses.
     */
    @JvmName("htssmecrvnyivach")
    public suspend fun grouping(values: List>) {
        this.grouping = Output.all(values)
    }

    /**
     * @param value Array of order by expression to use in the report.
     */
    @JvmName("ueesraibckxdiktm")
    public suspend fun sorting(`value`: Output>) {
        this.sorting = value
    }

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

    /**
     * @param values Array of order by expression to use in the report.
     */
    @JvmName("tdqrjxpmvatovjsi")
    public suspend fun sorting(values: List>) {
        this.sorting = Output.all(values)
    }

    /**
     * @param value Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.
     */
    @JvmName("ablwrxpaurtxrern")
    public suspend fun aggregation(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aggregation = mapped
    }

    /**
     * @param argument Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.
     */
    @JvmName("mdocykbrlsfscrvy")
    public suspend fun aggregation(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                ReportConfigAggregationArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.aggregation = mapped
    }

    /**
     * @param values Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses.
     */
    @JvmName("ohhfmkwqcpashpgo")
    public fun aggregation(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.aggregation = mapped
    }

    /**
     * @param value Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.
     */
    @JvmName("uljhtgjgraofywlv")
    public suspend fun configuration(`value`: ReportConfigDatasetConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.configuration = mapped
    }

    /**
     * @param argument Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.
     */
    @JvmName("fnkdvwujodtmwrfc")
    public suspend fun configuration(argument: suspend ReportConfigDatasetConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ReportConfigDatasetConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.configuration = mapped
    }

    /**
     * @param value Has filter expression to use in the report.
     */
    @JvmName("hkageafdluxaaefv")
    public suspend fun filter(`value`: ReportConfigFilterArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filter = mapped
    }

    /**
     * @param argument Has filter expression to use in the report.
     */
    @JvmName("oqbanfwreguhwwxf")
    public suspend fun filter(argument: suspend ReportConfigFilterArgsBuilder.() -> Unit) {
        val toBeMapped = ReportConfigFilterArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.filter = mapped
    }

    /**
     * @param value The granularity of rows in the report.
     */
    @JvmName("qbqgebovjttxbjai")
    public suspend fun granularity(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.granularity = mapped
    }

    /**
     * @param value The granularity of rows in the report.
     */
    @JvmName("exiusgtmdbagngmu")
    public fun granularity(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.granularity = mapped
    }

    /**
     * @param value The granularity of rows in the report.
     */
    @JvmName("osxtpqmbbcqspkhc")
    public fun granularity(`value`: ReportGranularityType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.granularity = mapped
    }

    /**
     * @param value Array of group by expression to use in the report. Report can have up to 2 group by clauses.
     */
    @JvmName("youryjjrjgbvwatv")
    public suspend fun grouping(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.grouping = mapped
    }

    /**
     * @param argument Array of group by expression to use in the report. Report can have up to 2 group by clauses.
     */
    @JvmName("umqumepbsxxmwybf")
    public suspend fun grouping(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ReportConfigGroupingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.grouping = mapped
    }

    /**
     * @param argument Array of group by expression to use in the report. Report can have up to 2 group by clauses.
     */
    @JvmName("dmamavailcuveaqj")
    public suspend fun grouping(vararg argument: suspend ReportConfigGroupingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ReportConfigGroupingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.grouping = mapped
    }

    /**
     * @param argument Array of group by expression to use in the report. Report can have up to 2 group by clauses.
     */
    @JvmName("sflgpbsmqlgekyit")
    public suspend fun grouping(argument: suspend ReportConfigGroupingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ReportConfigGroupingArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.grouping = mapped
    }

    /**
     * @param values Array of group by expression to use in the report. Report can have up to 2 group by clauses.
     */
    @JvmName("axgagcvnugctcsto")
    public suspend fun grouping(vararg values: ReportConfigGroupingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.grouping = mapped
    }

    /**
     * @param value Array of order by expression to use in the report.
     */
    @JvmName("euuknccchjqmdogg")
    public suspend fun sorting(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sorting = mapped
    }

    /**
     * @param argument Array of order by expression to use in the report.
     */
    @JvmName("awcdowsqelopsmwu")
    public suspend fun sorting(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ReportConfigSortingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.sorting = mapped
    }

    /**
     * @param argument Array of order by expression to use in the report.
     */
    @JvmName("upyhndnifqqtexcm")
    public suspend fun sorting(vararg argument: suspend ReportConfigSortingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ReportConfigSortingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.sorting = mapped
    }

    /**
     * @param argument Array of order by expression to use in the report.
     */
    @JvmName("gprpeaabxldsndax")
    public suspend fun sorting(argument: suspend ReportConfigSortingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ReportConfigSortingArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.sorting = mapped
    }

    /**
     * @param values Array of order by expression to use in the report.
     */
    @JvmName("lomudtyshfdisbhx")
    public suspend fun sorting(vararg values: ReportConfigSortingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sorting = mapped
    }

    internal fun build(): ReportConfigDatasetArgs = ReportConfigDatasetArgs(
        aggregation = aggregation,
        configuration = configuration,
        filter = filter,
        granularity = granularity,
        grouping = grouping,
        sorting = sorting,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy