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

com.pulumi.azurenative.databoxedge.kotlin.BandwidthScheduleArgs.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.databoxedge.kotlin

import com.pulumi.azurenative.databoxedge.BandwidthScheduleArgs.builder
import com.pulumi.azurenative.databoxedge.kotlin.enums.DayOfWeek
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 kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The bandwidth schedule details.
 * Azure REST API version: 2022-03-01. Prior API version in Azure Native 1.x: 2020-12-01.
 * Other available API versions: 2023-01-01-preview, 2023-07-01, 2023-12-01.
 * ## Example Usage
 * ### BandwidthSchedulePut
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var bandwidthSchedule = new AzureNative.DataBoxEdge.BandwidthSchedule("bandwidthSchedule", new()
 *     {
 *         Days = new[]
 *         {
 *             AzureNative.DataBoxEdge.DayOfWeek.Sunday,
 *             AzureNative.DataBoxEdge.DayOfWeek.Monday,
 *         },
 *         DeviceName = "testedgedevice",
 *         Name = "bandwidth-1",
 *         RateInMbps = 100,
 *         ResourceGroupName = "GroupForEdgeAutomation",
 *         Start = "0:0:0",
 *         Stop = "13:59:0",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	databoxedge "github.com/pulumi/pulumi-azure-native-sdk/databoxedge/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := databoxedge.NewBandwidthSchedule(ctx, "bandwidthSchedule", &databoxedge.BandwidthScheduleArgs{
 * 			Days: pulumi.StringArray{
 * 				pulumi.String(databoxedge.DayOfWeekSunday),
 * 				pulumi.String(databoxedge.DayOfWeekMonday),
 * 			},
 * 			DeviceName:        pulumi.String("testedgedevice"),
 * 			Name:              pulumi.String("bandwidth-1"),
 * 			RateInMbps:        pulumi.Int(100),
 * 			ResourceGroupName: pulumi.String("GroupForEdgeAutomation"),
 * 			Start:             pulumi.String("0:0:0"),
 * 			Stop:              pulumi.String("13:59:0"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.databoxedge.BandwidthSchedule;
 * import com.pulumi.azurenative.databoxedge.BandwidthScheduleArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var bandwidthSchedule = new BandwidthSchedule("bandwidthSchedule", BandwidthScheduleArgs.builder()
 *             .days(
 *                 "Sunday",
 *                 "Monday")
 *             .deviceName("testedgedevice")
 *             .name("bandwidth-1")
 *             .rateInMbps(100)
 *             .resourceGroupName("GroupForEdgeAutomation")
 *             .start("0:0:0")
 *             .stop("13:59:0")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:databoxedge:BandwidthSchedule bandwidth-1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}
 * ```
 * @property days The days of the week when this schedule is applicable.
 * @property deviceName The device name.
 * @property name The bandwidth schedule name which needs to be added/updated.
 * @property rateInMbps The bandwidth rate in Mbps.
 * @property resourceGroupName The resource group name.
 * @property start The start time of the schedule in UTC.
 * @property stop The stop time of the schedule in UTC.
 */
public data class BandwidthScheduleArgs(
    public val days: Output>>? = null,
    public val deviceName: Output? = null,
    public val name: Output? = null,
    public val rateInMbps: Output? = null,
    public val resourceGroupName: Output? = null,
    public val start: Output? = null,
    public val stop: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.databoxedge.BandwidthScheduleArgs =
        com.pulumi.azurenative.databoxedge.BandwidthScheduleArgs.builder()
            .days(
                days?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform({ args0 -> args0 }, { args0 ->
                            args0.let({ args0 -> args0.toJava() })
                        })
                    })
                }),
            )
            .deviceName(deviceName?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .rateInMbps(rateInMbps?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .start(start?.applyValue({ args0 -> args0 }))
            .stop(stop?.applyValue({ args0 -> args0 })).build()
}

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

    private var deviceName: Output? = null

    private var name: Output? = null

    private var rateInMbps: Output? = null

    private var resourceGroupName: Output? = null

    private var start: Output? = null

    private var stop: Output? = null

    /**
     * @param value The days of the week when this schedule is applicable.
     */
    @JvmName("nospsnvjjvpgxenr")
    public suspend fun days(`value`: Output>>) {
        this.days = value
    }

    @JvmName("lldtkvggynhkqfap")
    public suspend fun days(vararg values: Output>) {
        this.days = Output.all(values.asList())
    }

    /**
     * @param values The days of the week when this schedule is applicable.
     */
    @JvmName("bhmccisvuwoqrghu")
    public suspend fun days(values: List>>) {
        this.days = Output.all(values)
    }

    /**
     * @param value The device name.
     */
    @JvmName("quuqidoghfkuhfyo")
    public suspend fun deviceName(`value`: Output) {
        this.deviceName = value
    }

    /**
     * @param value The bandwidth schedule name which needs to be added/updated.
     */
    @JvmName("xsnfpjcxmosdktkp")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The bandwidth rate in Mbps.
     */
    @JvmName("bkjeebdgpqowjdai")
    public suspend fun rateInMbps(`value`: Output) {
        this.rateInMbps = value
    }

    /**
     * @param value The resource group name.
     */
    @JvmName("asgjvijofmlhgulu")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The start time of the schedule in UTC.
     */
    @JvmName("jswnixffcmvkeawd")
    public suspend fun start(`value`: Output) {
        this.start = value
    }

    /**
     * @param value The stop time of the schedule in UTC.
     */
    @JvmName("ubkmuqcrcirbnyea")
    public suspend fun stop(`value`: Output) {
        this.stop = value
    }

    /**
     * @param value The days of the week when this schedule is applicable.
     */
    @JvmName("nsftaxndmexqpsui")
    public suspend fun days(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.days = mapped
    }

    /**
     * @param values The days of the week when this schedule is applicable.
     */
    @JvmName("lmjmhhdoplahxxdj")
    public suspend fun days(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.days = mapped
    }

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

    /**
     * @param value The bandwidth schedule name which needs to be added/updated.
     */
    @JvmName("stjwjpihltqbekca")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The bandwidth rate in Mbps.
     */
    @JvmName("bsowphttxtmfyyms")
    public suspend fun rateInMbps(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rateInMbps = mapped
    }

    /**
     * @param value The resource group name.
     */
    @JvmName("wqtvstvnyyjrrgjo")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The start time of the schedule in UTC.
     */
    @JvmName("ecqhsbysykdluboj")
    public suspend fun start(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.start = mapped
    }

    /**
     * @param value The stop time of the schedule in UTC.
     */
    @JvmName("natbkkgmsjhvmkyc")
    public suspend fun stop(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stop = mapped
    }

    internal fun build(): BandwidthScheduleArgs = BandwidthScheduleArgs(
        days = days,
        deviceName = deviceName,
        name = name,
        rateInMbps = rateInMbps,
        resourceGroupName = resourceGroupName,
        start = start,
        stop = stop,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy