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

com.pulumi.azurenative.costmanagement.kotlin.ReportByBillingAccount.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.

There is a newer version: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.costmanagement.kotlin

import com.pulumi.azurenative.costmanagement.kotlin.outputs.ReportDefinitionResponse
import com.pulumi.azurenative.costmanagement.kotlin.outputs.ReportDeliveryInfoResponse
import com.pulumi.azurenative.costmanagement.kotlin.outputs.ReportScheduleResponse
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import com.pulumi.azurenative.costmanagement.kotlin.outputs.ReportDefinitionResponse.Companion.toKotlin as reportDefinitionResponseToKotlin
import com.pulumi.azurenative.costmanagement.kotlin.outputs.ReportDeliveryInfoResponse.Companion.toKotlin as reportDeliveryInfoResponseToKotlin
import com.pulumi.azurenative.costmanagement.kotlin.outputs.ReportScheduleResponse.Companion.toKotlin as reportScheduleResponseToKotlin

/**
 * Builder for [ReportByBillingAccount].
 */
@PulumiTagMarker
public class ReportByBillingAccountResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ReportByBillingAccountArgs = ReportByBillingAccountArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend ReportByBillingAccountArgsBuilder.() -> Unit) {
        val builder = ReportByBillingAccountArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): ReportByBillingAccount {
        val builtJavaResource =
            com.pulumi.azurenative.costmanagement.ReportByBillingAccount(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return ReportByBillingAccount(builtJavaResource)
    }
}

/**
 * A report resource.
 * Azure REST API version: 2018-08-01-preview. Prior API version in Azure Native 1.x: 2018-08-01-preview.
 */
public class ReportByBillingAccount internal constructor(
    override val javaResource: com.pulumi.azurenative.costmanagement.ReportByBillingAccount,
) : KotlinCustomResource(javaResource, ReportByBillingAccountMapper) {
    /**
     * Has definition for the report.
     */
    public val definition: Output
        get() = javaResource.definition().applyValue({ args0 ->
            args0.let({ args0 ->
                reportDefinitionResponseToKotlin(args0)
            })
        })

    /**
     * Has delivery information for the report.
     */
    public val deliveryInfo: Output
        get() = javaResource.deliveryInfo().applyValue({ args0 ->
            args0.let({ args0 ->
                reportDeliveryInfoResponseToKotlin(args0)
            })
        })

    /**
     * The format of the report being delivered.
     */
    public val format: Output?
        get() = javaResource.format().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Resource name.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Has schedule information for the report.
     */
    public val schedule: Output?
        get() = javaResource.schedule().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    reportScheduleResponseToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Resource tags.
     */
    public val tags: Output>
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * Resource type.
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 -> args0 })
}

public object ReportByBillingAccountMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azurenative.costmanagement.ReportByBillingAccount::class == javaResource::class

    override fun map(javaResource: Resource): ReportByBillingAccount =
        ReportByBillingAccount(
            javaResource as
                com.pulumi.azurenative.costmanagement.ReportByBillingAccount,
        )
}

/**
 * @see [ReportByBillingAccount].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [ReportByBillingAccount].
 */
public suspend fun reportByBillingAccount(
    name: String,
    block: suspend ReportByBillingAccountResourceBuilder.() -> Unit,
): ReportByBillingAccount {
    val builder = ReportByBillingAccountResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [ReportByBillingAccount].
 * @param name The _unique_ name of the resulting resource.
 */
public fun reportByBillingAccount(name: String): ReportByBillingAccount {
    val builder = ReportByBillingAccountResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy