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

com.pulumi.googlenative.vmmigration.v1alpha1.kotlin.UtilizationReportArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.vmmigration.v1alpha1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.vmmigration.v1alpha1.UtilizationReportArgs.builder
import com.pulumi.googlenative.vmmigration.v1alpha1.kotlin.enums.UtilizationReportTimeFrame
import com.pulumi.googlenative.vmmigration.v1alpha1.kotlin.inputs.VmUtilizationInfoArgs
import com.pulumi.googlenative.vmmigration.v1alpha1.kotlin.inputs.VmUtilizationInfoArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Creates a new UtilizationReport.
 * Auto-naming is currently not supported for this resource.
 * @property displayName The report display name, as assigned by the user.
 * @property location
 * @property project
 * @property requestId A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
 * @property sourceId
 * @property timeFrame Time frame of the report.
 * @property utilizationReportId Required. The ID to use for the report, which will become the final component of the reports's resource name. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.
 * @property vms List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.
 */
public data class UtilizationReportArgs(
    public val displayName: Output? = null,
    public val location: Output? = null,
    public val project: Output? = null,
    public val requestId: Output? = null,
    public val sourceId: Output? = null,
    public val timeFrame: Output? = null,
    public val utilizationReportId: Output? = null,
    public val vms: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.vmmigration.v1alpha1.UtilizationReportArgs =
        com.pulumi.googlenative.vmmigration.v1alpha1.UtilizationReportArgs.builder()
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .requestId(requestId?.applyValue({ args0 -> args0 }))
            .sourceId(sourceId?.applyValue({ args0 -> args0 }))
            .timeFrame(timeFrame?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .utilizationReportId(utilizationReportId?.applyValue({ args0 -> args0 }))
            .vms(
                vms?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [UtilizationReportArgs].
 */
@PulumiTagMarker
public class UtilizationReportArgsBuilder internal constructor() {
    private var displayName: Output? = null

    private var location: Output? = null

    private var project: Output? = null

    private var requestId: Output? = null

    private var sourceId: Output? = null

    private var timeFrame: Output? = null

    private var utilizationReportId: Output? = null

    private var vms: Output>? = null

    /**
     * @param value The report display name, as assigned by the user.
     */
    @JvmName("reqxousywdspuone")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value
     */
    @JvmName("pcwwqlmswtnwukxn")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value
     */
    @JvmName("ngwsuhwsakoevlmv")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
     */
    @JvmName("fskmckdwijgbmgna")
    public suspend fun requestId(`value`: Output) {
        this.requestId = value
    }

    /**
     * @param value
     */
    @JvmName("ccjaonyxxowjnywx")
    public suspend fun sourceId(`value`: Output) {
        this.sourceId = value
    }

    /**
     * @param value Time frame of the report.
     */
    @JvmName("wpnhsasoihcojllj")
    public suspend fun timeFrame(`value`: Output) {
        this.timeFrame = value
    }

    /**
     * @param value Required. The ID to use for the report, which will become the final component of the reports's resource name. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.
     */
    @JvmName("wrxufmqksqaddwuv")
    public suspend fun utilizationReportId(`value`: Output) {
        this.utilizationReportId = value
    }

    /**
     * @param value List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.
     */
    @JvmName("lvgfgkmbfgbuhoti")
    public suspend fun vms(`value`: Output>) {
        this.vms = value
    }

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

    /**
     * @param values List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.
     */
    @JvmName("cqhqoiqartvsjoxb")
    public suspend fun vms(values: List>) {
        this.vms = Output.all(values)
    }

    /**
     * @param value The report display name, as assigned by the user.
     */
    @JvmName("gkxhtnhnovnblhnj")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value
     */
    @JvmName("kpnbhxyvdwjheptp")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value
     */
    @JvmName("eqkcwvgvmkmqqqyv")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
     */
    @JvmName("llyfljfnmarhfjhj")
    public suspend fun requestId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestId = mapped
    }

    /**
     * @param value
     */
    @JvmName("ovinkrjluljhhudb")
    public suspend fun sourceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceId = mapped
    }

    /**
     * @param value Time frame of the report.
     */
    @JvmName("svvxuxinxgafxafn")
    public suspend fun timeFrame(`value`: UtilizationReportTimeFrame?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeFrame = mapped
    }

    /**
     * @param value Required. The ID to use for the report, which will become the final component of the reports's resource name. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.
     */
    @JvmName("pkxrlnmgvfusyfow")
    public suspend fun utilizationReportId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.utilizationReportId = mapped
    }

    /**
     * @param value List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.
     */
    @JvmName("lbrlpesjfnbdsrux")
    public suspend fun vms(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vms = mapped
    }

    /**
     * @param argument List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.
     */
    @JvmName("lkgpvxmbucjtiqob")
    public suspend fun vms(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VmUtilizationInfoArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.vms = mapped
    }

    /**
     * @param argument List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.
     */
    @JvmName("ohcmnbgrufrcfnvy")
    public suspend fun vms(vararg argument: suspend VmUtilizationInfoArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VmUtilizationInfoArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.vms = mapped
    }

    /**
     * @param argument List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.
     */
    @JvmName("vlveieeqvcajyuec")
    public suspend fun vms(argument: suspend VmUtilizationInfoArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VmUtilizationInfoArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.vms = mapped
    }

    /**
     * @param values List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.
     */
    @JvmName("viyjtuextloybeks")
    public suspend fun vms(vararg values: VmUtilizationInfoArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.vms = mapped
    }

    internal fun build(): UtilizationReportArgs = UtilizationReportArgs(
        displayName = displayName,
        location = location,
        project = project,
        requestId = requestId,
        sourceId = sourceId,
        timeFrame = timeFrame,
        utilizationReportId = utilizationReportId,
        vms = vms,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy