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

com.pulumi.azurenative.cloudngfw.kotlin.inputs.PlanDataArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.cloudngfw.kotlin.inputs

import com.pulumi.azurenative.cloudngfw.inputs.PlanDataArgs.builder
import com.pulumi.azurenative.cloudngfw.kotlin.enums.BillingCycle
import com.pulumi.azurenative.cloudngfw.kotlin.enums.UsageType
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.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Billing plan information.
 * @property billingCycle different billing cycles like MONTHLY/WEEKLY
 * @property planId plan id as published by Liftr.PAN
 * @property usageType different usage type like PAYG/COMMITTED
 */
public data class PlanDataArgs(
    public val billingCycle: Output>,
    public val planId: Output,
    public val usageType: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cloudngfw.inputs.PlanDataArgs =
        com.pulumi.azurenative.cloudngfw.inputs.PlanDataArgs.builder()
            .billingCycle(
                billingCycle.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .planId(planId.applyValue({ args0 -> args0 }))
            .usageType(
                usageType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

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

    private var planId: Output? = null

    private var usageType: Output>? = null

    /**
     * @param value different billing cycles like MONTHLY/WEEKLY
     */
    @JvmName("hgcempcriprhvtci")
    public suspend fun billingCycle(`value`: Output>) {
        this.billingCycle = value
    }

    /**
     * @param value plan id as published by Liftr.PAN
     */
    @JvmName("ujagadjrshlaxcun")
    public suspend fun planId(`value`: Output) {
        this.planId = value
    }

    /**
     * @param value different usage type like PAYG/COMMITTED
     */
    @JvmName("xppfdvnlswrdbcyq")
    public suspend fun usageType(`value`: Output>) {
        this.usageType = value
    }

    /**
     * @param value different billing cycles like MONTHLY/WEEKLY
     */
    @JvmName("eewkxxbpadwgjgdt")
    public suspend fun billingCycle(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.billingCycle = mapped
    }

    /**
     * @param value different billing cycles like MONTHLY/WEEKLY
     */
    @JvmName("vqfjerugyqxksjjl")
    public fun billingCycle(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.billingCycle = mapped
    }

    /**
     * @param value different billing cycles like MONTHLY/WEEKLY
     */
    @JvmName("hckgfyafnmiutfma")
    public fun billingCycle(`value`: BillingCycle) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.billingCycle = mapped
    }

    /**
     * @param value plan id as published by Liftr.PAN
     */
    @JvmName("ijowipmmgtggjujk")
    public suspend fun planId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.planId = mapped
    }

    /**
     * @param value different usage type like PAYG/COMMITTED
     */
    @JvmName("huhgywgoswykysqd")
    public suspend fun usageType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.usageType = mapped
    }

    /**
     * @param value different usage type like PAYG/COMMITTED
     */
    @JvmName("hlmhvdrvafayxgxg")
    public fun usageType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.usageType = mapped
    }

    /**
     * @param value different usage type like PAYG/COMMITTED
     */
    @JvmName("xgtefsnfgelvgahr")
    public fun usageType(`value`: UsageType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.usageType = mapped
    }

    internal fun build(): PlanDataArgs = PlanDataArgs(
        billingCycle = billingCycle ?: throw PulumiNullFieldException("billingCycle"),
        planId = planId ?: throw PulumiNullFieldException("planId"),
        usageType = usageType,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy