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

com.pulumi.azurenative.costmanagement.kotlin.ViewArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.costmanagement.kotlin

import com.pulumi.azurenative.costmanagement.ViewArgs.builder
import com.pulumi.azurenative.costmanagement.kotlin.enums.AccumulatedType
import com.pulumi.azurenative.costmanagement.kotlin.enums.ChartType
import com.pulumi.azurenative.costmanagement.kotlin.enums.MetricType
import com.pulumi.azurenative.costmanagement.kotlin.enums.ReportTimeframeType
import com.pulumi.azurenative.costmanagement.kotlin.enums.ReportType
import com.pulumi.azurenative.costmanagement.kotlin.inputs.KpiPropertiesArgs
import com.pulumi.azurenative.costmanagement.kotlin.inputs.KpiPropertiesArgsBuilder
import com.pulumi.azurenative.costmanagement.kotlin.inputs.PivotPropertiesArgs
import com.pulumi.azurenative.costmanagement.kotlin.inputs.PivotPropertiesArgsBuilder
import com.pulumi.azurenative.costmanagement.kotlin.inputs.ReportConfigDatasetArgs
import com.pulumi.azurenative.costmanagement.kotlin.inputs.ReportConfigDatasetArgsBuilder
import com.pulumi.azurenative.costmanagement.kotlin.inputs.ReportConfigTimePeriodArgs
import com.pulumi.azurenative.costmanagement.kotlin.inputs.ReportConfigTimePeriodArgsBuilder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * States and configurations of Cost Analysis.
 * Azure REST API version: 2023-03-01. Prior API version in Azure Native 1.x: 2019-11-01.
 * Other available API versions: 2019-11-01, 2020-06-01, 2022-10-01, 2022-10-05-preview, 2023-04-01-preview, 2023-07-01-preview, 2023-08-01, 2023-09-01, 2023-11-01.
 * ## Example Usage
 * ### CreateOrUpdatePrivateView
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var view = new AzureNative.CostManagement.View("view", new()
 *     {
 *         Accumulated = AzureNative.CostManagement.AccumulatedType.@True,
 *         Chart = AzureNative.CostManagement.ChartType.Table,
 *         DataSet = new AzureNative.CostManagement.Inputs.ReportConfigDatasetArgs
 *         {
 *             Aggregation =
 *             {
 *                 { "totalCost", new AzureNative.CostManagement.Inputs.ReportConfigAggregationArgs
 *                 {
 *                     Function = AzureNative.CostManagement.FunctionType.Sum,
 *                     Name = "PreTaxCost",
 *                 } },
 *             },
 *             Granularity = AzureNative.CostManagement.ReportGranularityType.Daily,
 *             Grouping = new() { },
 *             Sorting = new[]
 *             {
 *                 new AzureNative.CostManagement.Inputs.ReportConfigSortingArgs
 *                 {
 *                     Direction = AzureNative.CostManagement.ReportConfigSortingType.Ascending,
 *                     Name = "UsageDate",
 *                 },
 *             },
 *         },
 *         DisplayName = "swagger Example",
 *         ETag = "\"1d4ff9fe66f1d10\"",
 *         Kpis = new[]
 *         {
 *             new AzureNative.CostManagement.Inputs.KpiPropertiesArgs
 *             {
 *                 Enabled = true,
 *                 Type = AzureNative.CostManagement.KpiTypeType.Forecast,
 *             },
 *             new AzureNative.CostManagement.Inputs.KpiPropertiesArgs
 *             {
 *                 Enabled = true,
 *                 Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo",
 *                 Type = AzureNative.CostManagement.KpiTypeType.Budget,
 *             },
 *         },
 *         Metric = AzureNative.CostManagement.MetricType.ActualCost,
 *         Pivots = new[]
 *         {
 *             new AzureNative.CostManagement.Inputs.PivotPropertiesArgs
 *             {
 *                 Name = "ServiceName",
 *                 Type = AzureNative.CostManagement.PivotTypeType.Dimension,
 *             },
 *             new AzureNative.CostManagement.Inputs.PivotPropertiesArgs
 *             {
 *                 Name = "MeterCategory",
 *                 Type = AzureNative.CostManagement.PivotTypeType.Dimension,
 *             },
 *             new AzureNative.CostManagement.Inputs.PivotPropertiesArgs
 *             {
 *                 Name = "swaggerTagKey",
 *                 Type = AzureNative.CostManagement.PivotTypeType.TagKey,
 *             },
 *         },
 *         Timeframe = AzureNative.CostManagement.ReportTimeframeType.MonthToDate,
 *         Type = AzureNative.CostManagement.ReportType.Usage,
 *         ViewName = "swaggerExample",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := costmanagement.NewView(ctx, "view", &costmanagement.ViewArgs{
 * 			Accumulated: pulumi.String(costmanagement.AccumulatedTypeTrue),
 * 			Chart:       pulumi.String(costmanagement.ChartTypeTable),
 * 			DataSet: &costmanagement.ReportConfigDatasetArgs{
 * 				Aggregation: costmanagement.ReportConfigAggregationMap{
 * 					"totalCost": &costmanagement.ReportConfigAggregationArgs{
 * 						Function: pulumi.String(costmanagement.FunctionTypeSum),
 * 						Name:     pulumi.String("PreTaxCost"),
 * 					},
 * 				},
 * 				Granularity: pulumi.String(costmanagement.ReportGranularityTypeDaily),
 * 				Grouping:    costmanagement.ReportConfigGroupingArray{},
 * 				Sorting: costmanagement.ReportConfigSortingArray{
 * 					&costmanagement.ReportConfigSortingArgs{
 * 						Direction: pulumi.String(costmanagement.ReportConfigSortingTypeAscending),
 * 						Name:      pulumi.String("UsageDate"),
 * 					},
 * 				},
 * 			},
 * 			DisplayName: pulumi.String("swagger Example"),
 * 			ETag:        pulumi.String("\"1d4ff9fe66f1d10\""),
 * 			Kpis: costmanagement.KpiPropertiesArray{
 * 				&costmanagement.KpiPropertiesArgs{
 * 					Enabled: pulumi.Bool(true),
 * 					Type:    pulumi.String(costmanagement.KpiTypeTypeForecast),
 * 				},
 * 				&costmanagement.KpiPropertiesArgs{
 * 					Enabled: pulumi.Bool(true),
 * 					Id:      pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo"),
 * 					Type:    pulumi.String(costmanagement.KpiTypeTypeBudget),
 * 				},
 * 			},
 * 			Metric: pulumi.String(costmanagement.MetricTypeActualCost),
 * 			Pivots: costmanagement.PivotPropertiesArray{
 * 				&costmanagement.PivotPropertiesArgs{
 * 					Name: pulumi.String("ServiceName"),
 * 					Type: pulumi.String(costmanagement.PivotTypeTypeDimension),
 * 				},
 * 				&costmanagement.PivotPropertiesArgs{
 * 					Name: pulumi.String("MeterCategory"),
 * 					Type: pulumi.String(costmanagement.PivotTypeTypeDimension),
 * 				},
 * 				&costmanagement.PivotPropertiesArgs{
 * 					Name: pulumi.String("swaggerTagKey"),
 * 					Type: pulumi.String(costmanagement.PivotTypeTypeTagKey),
 * 				},
 * 			},
 * 			Timeframe: pulumi.String(costmanagement.ReportTimeframeTypeMonthToDate),
 * 			Type:      pulumi.String(costmanagement.ReportTypeUsage),
 * 			ViewName:  pulumi.String("swaggerExample"),
 * 		})
 * 		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.costmanagement.View;
 * import com.pulumi.azurenative.costmanagement.ViewArgs;
 * import com.pulumi.azurenative.costmanagement.inputs.ReportConfigDatasetArgs;
 * import com.pulumi.azurenative.costmanagement.inputs.KpiPropertiesArgs;
 * import com.pulumi.azurenative.costmanagement.inputs.PivotPropertiesArgs;
 * 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 view = new View("view", ViewArgs.builder()
 *             .accumulated("true")
 *             .chart("Table")
 *             .dataSet(ReportConfigDatasetArgs.builder()
 *                 .aggregation(Map.of("totalCost", Map.ofEntries(
 *                     Map.entry("function", "Sum"),
 *                     Map.entry("name", "PreTaxCost")
 *                 )))
 *                 .granularity("Daily")
 *                 .grouping()
 *                 .sorting(ReportConfigSortingArgs.builder()
 *                     .direction("Ascending")
 *                     .name("UsageDate")
 *                     .build())
 *                 .build())
 *             .displayName("swagger Example")
 *             .eTag("\"1d4ff9fe66f1d10\"")
 *             .kpis(
 *                 KpiPropertiesArgs.builder()
 *                     .enabled(true)
 *                     .type("Forecast")
 *                     .build(),
 *                 KpiPropertiesArgs.builder()
 *                     .enabled(true)
 *                     .id("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Consumption/budgets/swaggerDemo")
 *                     .type("Budget")
 *                     .build())
 *             .metric("ActualCost")
 *             .pivots(
 *                 PivotPropertiesArgs.builder()
 *                     .name("ServiceName")
 *                     .type("Dimension")
 *                     .build(),
 *                 PivotPropertiesArgs.builder()
 *                     .name("MeterCategory")
 *                     .type("Dimension")
 *                     .build(),
 *                 PivotPropertiesArgs.builder()
 *                     .name("swaggerTagKey")
 *                     .type("TagKey")
 *                     .build())
 *             .timeframe("MonthToDate")
 *             .type("Usage")
 *             .viewName("swaggerExample")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:costmanagement:View swaggerExample /providers/Microsoft.CostManagement/views/{viewName}
 * ```
 * @property accumulated Show costs accumulated over time.
 * @property chart Chart type of the main view in Cost Analysis. Required.
 * @property dataSet Has definition for data in this report config.
 * @property dateRange Date range of the current view.
 * @property displayName User input name of the view. Required.
 * @property eTag eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
 * @property includeMonetaryCommitment If true, report includes monetary commitment.
 * @property kpis List of KPIs to show in Cost Analysis UI.
 * @property metric Metric to use when displaying costs.
 * @property modifiedOn Date when the user last modified this view.
 * @property pivots Configuration of 3 sub-views in the Cost Analysis UI.
 * @property scope Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
 * @property timePeriod Has time period for pulling data for the report.
 * @property timeframe The time frame for pulling data for the report. If custom, then a specific time period must be provided.
 * @property type The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.
 * @property viewName View name
 */
public data class ViewArgs(
    public val accumulated: Output>? = null,
    public val chart: Output>? = null,
    public val dataSet: Output? = null,
    public val dateRange: Output? = null,
    public val displayName: Output? = null,
    public val eTag: Output? = null,
    public val includeMonetaryCommitment: Output? = null,
    public val kpis: Output>? = null,
    public val metric: Output>? = null,
    public val modifiedOn: Output? = null,
    public val pivots: Output>? = null,
    public val scope: Output? = null,
    public val timePeriod: Output? = null,
    public val timeframe: Output>? = null,
    public val type: Output>? = null,
    public val viewName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.costmanagement.ViewArgs =
        com.pulumi.azurenative.costmanagement.ViewArgs.builder()
            .accumulated(
                accumulated?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .chart(
                chart?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .dataSet(dataSet?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dateRange(dateRange?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .eTag(eTag?.applyValue({ args0 -> args0 }))
            .includeMonetaryCommitment(includeMonetaryCommitment?.applyValue({ args0 -> args0 }))
            .kpis(kpis?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .metric(
                metric?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .modifiedOn(modifiedOn?.applyValue({ args0 -> args0 }))
            .pivots(pivots?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .scope(scope?.applyValue({ args0 -> args0 }))
            .timePeriod(timePeriod?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .timeframe(
                timeframe?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .type(
                type?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .viewName(viewName?.applyValue({ args0 -> args0 })).build()
}

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

    private var chart: Output>? = null

    private var dataSet: Output? = null

    private var dateRange: Output? = null

    private var displayName: Output? = null

    private var eTag: Output? = null

    private var includeMonetaryCommitment: Output? = null

    private var kpis: Output>? = null

    private var metric: Output>? = null

    private var modifiedOn: Output? = null

    private var pivots: Output>? = null

    private var scope: Output? = null

    private var timePeriod: Output? = null

    private var timeframe: Output>? = null

    private var type: Output>? = null

    private var viewName: Output? = null

    /**
     * @param value Show costs accumulated over time.
     */
    @JvmName("nbqdfqahkmxuxgap")
    public suspend fun accumulated(`value`: Output>) {
        this.accumulated = value
    }

    /**
     * @param value Chart type of the main view in Cost Analysis. Required.
     */
    @JvmName("asqoodclifmihbgo")
    public suspend fun chart(`value`: Output>) {
        this.chart = value
    }

    /**
     * @param value Has definition for data in this report config.
     */
    @JvmName("unehxwdjyiutdgin")
    public suspend fun dataSet(`value`: Output) {
        this.dataSet = value
    }

    /**
     * @param value Date range of the current view.
     */
    @JvmName("nclrpwswduyttilp")
    public suspend fun dateRange(`value`: Output) {
        this.dateRange = value
    }

    /**
     * @param value User input name of the view. Required.
     */
    @JvmName("upynitpnsqjnbmkx")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
     */
    @JvmName("uphoggcmsxjqngla")
    public suspend fun eTag(`value`: Output) {
        this.eTag = value
    }

    /**
     * @param value If true, report includes monetary commitment.
     */
    @JvmName("qaqpbnatfqfnnpjp")
    public suspend fun includeMonetaryCommitment(`value`: Output) {
        this.includeMonetaryCommitment = value
    }

    /**
     * @param value List of KPIs to show in Cost Analysis UI.
     */
    @JvmName("eajqdkwclbeldfpx")
    public suspend fun kpis(`value`: Output>) {
        this.kpis = value
    }

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

    /**
     * @param values List of KPIs to show in Cost Analysis UI.
     */
    @JvmName("ggholvbdgrncgrpj")
    public suspend fun kpis(values: List>) {
        this.kpis = Output.all(values)
    }

    /**
     * @param value Metric to use when displaying costs.
     */
    @JvmName("mgrymkpgmyhehxyw")
    public suspend fun metric(`value`: Output>) {
        this.metric = value
    }

    /**
     * @param value Date when the user last modified this view.
     */
    @JvmName("jkqmbwmtqyrajubx")
    public suspend fun modifiedOn(`value`: Output) {
        this.modifiedOn = value
    }

    /**
     * @param value Configuration of 3 sub-views in the Cost Analysis UI.
     */
    @JvmName("edknfoeybefpkxys")
    public suspend fun pivots(`value`: Output>) {
        this.pivots = value
    }

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

    /**
     * @param values Configuration of 3 sub-views in the Cost Analysis UI.
     */
    @JvmName("fbaitiyqqiafokrf")
    public suspend fun pivots(values: List>) {
        this.pivots = Output.all(values)
    }

    /**
     * @param value Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
     */
    @JvmName("qnhcanqjwsxhlnhg")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value Has time period for pulling data for the report.
     */
    @JvmName("eyjycqjobyiopuxm")
    public suspend fun timePeriod(`value`: Output) {
        this.timePeriod = value
    }

    /**
     * @param value The time frame for pulling data for the report. If custom, then a specific time period must be provided.
     */
    @JvmName("rrfpjfnlmybpcwbm")
    public suspend fun timeframe(`value`: Output>) {
        this.timeframe = value
    }

    /**
     * @param value The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.
     */
    @JvmName("ilcgcbmrkanbqkle")
    public suspend fun type(`value`: Output>) {
        this.type = value
    }

    /**
     * @param value View name
     */
    @JvmName("qvhpnxlonuumpvbl")
    public suspend fun viewName(`value`: Output) {
        this.viewName = value
    }

    /**
     * @param value Show costs accumulated over time.
     */
    @JvmName("lfoorwlhermcyrpr")
    public suspend fun accumulated(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accumulated = mapped
    }

    /**
     * @param value Show costs accumulated over time.
     */
    @JvmName("klkqabytvhofjqis")
    public fun accumulated(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.accumulated = mapped
    }

    /**
     * @param value Show costs accumulated over time.
     */
    @JvmName("qwiirkgpkrwruska")
    public fun accumulated(`value`: AccumulatedType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.accumulated = mapped
    }

    /**
     * @param value Chart type of the main view in Cost Analysis. Required.
     */
    @JvmName("ncptwnmcnxvkxuqe")
    public suspend fun chart(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.chart = mapped
    }

    /**
     * @param value Chart type of the main view in Cost Analysis. Required.
     */
    @JvmName("mmrwlupngbnesdne")
    public fun chart(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.chart = mapped
    }

    /**
     * @param value Chart type of the main view in Cost Analysis. Required.
     */
    @JvmName("tdvyifvanhxdyclr")
    public fun chart(`value`: ChartType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.chart = mapped
    }

    /**
     * @param value Has definition for data in this report config.
     */
    @JvmName("aipxhpeoqtgbbtgp")
    public suspend fun dataSet(`value`: ReportConfigDatasetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataSet = mapped
    }

    /**
     * @param argument Has definition for data in this report config.
     */
    @JvmName("fhndiuipjagbonec")
    public suspend fun dataSet(argument: suspend ReportConfigDatasetArgsBuilder.() -> Unit) {
        val toBeMapped = ReportConfigDatasetArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dataSet = mapped
    }

    /**
     * @param value Date range of the current view.
     */
    @JvmName("yhjfedlhkinwcyww")
    public suspend fun dateRange(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dateRange = mapped
    }

    /**
     * @param value User input name of the view. Required.
     */
    @JvmName("qcqqsvthppjsdvwv")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
     */
    @JvmName("fukuyuaqduiyqyii")
    public suspend fun eTag(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eTag = mapped
    }

    /**
     * @param value If true, report includes monetary commitment.
     */
    @JvmName("uihahynietfqtpuc")
    public suspend fun includeMonetaryCommitment(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.includeMonetaryCommitment = mapped
    }

    /**
     * @param value List of KPIs to show in Cost Analysis UI.
     */
    @JvmName("lhvhmhypcuwwrtwt")
    public suspend fun kpis(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kpis = mapped
    }

    /**
     * @param argument List of KPIs to show in Cost Analysis UI.
     */
    @JvmName("mhxsgaqmuopruvhh")
    public suspend fun kpis(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            KpiPropertiesArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.kpis = mapped
    }

    /**
     * @param argument List of KPIs to show in Cost Analysis UI.
     */
    @JvmName("ufqpjraloriewvbp")
    public suspend fun kpis(vararg argument: suspend KpiPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            KpiPropertiesArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.kpis = mapped
    }

    /**
     * @param argument List of KPIs to show in Cost Analysis UI.
     */
    @JvmName("goxlbpeexklputmn")
    public suspend fun kpis(argument: suspend KpiPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(KpiPropertiesArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.kpis = mapped
    }

    /**
     * @param values List of KPIs to show in Cost Analysis UI.
     */
    @JvmName("lfklqvjrsygpliup")
    public suspend fun kpis(vararg values: KpiPropertiesArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kpis = mapped
    }

    /**
     * @param value Metric to use when displaying costs.
     */
    @JvmName("enaswwnkgtripeie")
    public suspend fun metric(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metric = mapped
    }

    /**
     * @param value Metric to use when displaying costs.
     */
    @JvmName("ftwjnijfieomtsyo")
    public fun metric(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metric = mapped
    }

    /**
     * @param value Metric to use when displaying costs.
     */
    @JvmName("ccysyiaiefafdtrw")
    public fun metric(`value`: MetricType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metric = mapped
    }

    /**
     * @param value Date when the user last modified this view.
     */
    @JvmName("ubmxnfxtsnsyjxmo")
    public suspend fun modifiedOn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.modifiedOn = mapped
    }

    /**
     * @param value Configuration of 3 sub-views in the Cost Analysis UI.
     */
    @JvmName("cgagaivdqrdkumdx")
    public suspend fun pivots(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pivots = mapped
    }

    /**
     * @param argument Configuration of 3 sub-views in the Cost Analysis UI.
     */
    @JvmName("sgbqvwhflnoulkuo")
    public suspend fun pivots(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PivotPropertiesArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.pivots = mapped
    }

    /**
     * @param argument Configuration of 3 sub-views in the Cost Analysis UI.
     */
    @JvmName("sefrfrbtglwkaoky")
    public suspend fun pivots(vararg argument: suspend PivotPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PivotPropertiesArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.pivots = mapped
    }

    /**
     * @param argument Configuration of 3 sub-views in the Cost Analysis UI.
     */
    @JvmName("nomorwirjpxklgje")
    public suspend fun pivots(argument: suspend PivotPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(PivotPropertiesArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.pivots = mapped
    }

    /**
     * @param values Configuration of 3 sub-views in the Cost Analysis UI.
     */
    @JvmName("wwiwfwyrtsgdumev")
    public suspend fun pivots(vararg values: PivotPropertiesArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pivots = mapped
    }

    /**
     * @param value Cost Management scope to save the view on. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for ExternalBillingAccount scope, and '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for ExternalSubscription scope.
     */
    @JvmName("fssuybirvdwbsebt")
    public suspend fun scope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    /**
     * @param value Has time period for pulling data for the report.
     */
    @JvmName("cundhmlxcsyibxoa")
    public suspend fun timePeriod(`value`: ReportConfigTimePeriodArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timePeriod = mapped
    }

    /**
     * @param argument Has time period for pulling data for the report.
     */
    @JvmName("fqyucafhhdyitxmy")
    public suspend fun timePeriod(argument: suspend ReportConfigTimePeriodArgsBuilder.() -> Unit) {
        val toBeMapped = ReportConfigTimePeriodArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timePeriod = mapped
    }

    /**
     * @param value The time frame for pulling data for the report. If custom, then a specific time period must be provided.
     */
    @JvmName("jcgmismprjddbiqn")
    public suspend fun timeframe(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeframe = mapped
    }

    /**
     * @param value The time frame for pulling data for the report. If custom, then a specific time period must be provided.
     */
    @JvmName("bhdumgwscefaxfrr")
    public fun timeframe(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.timeframe = mapped
    }

    /**
     * @param value The time frame for pulling data for the report. If custom, then a specific time period must be provided.
     */
    @JvmName("guvciruvibtmjvek")
    public fun timeframe(`value`: ReportTimeframeType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.timeframe = mapped
    }

    /**
     * @param value The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.
     */
    @JvmName("vchjighfktogdkle")
    public suspend fun type(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.
     */
    @JvmName("okdaqyremwombxpy")
    public fun type(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates.
     */
    @JvmName("sdfhtcpqodtttdcc")
    public fun type(`value`: ReportType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

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

    internal fun build(): ViewArgs = ViewArgs(
        accumulated = accumulated,
        chart = chart,
        dataSet = dataSet,
        dateRange = dateRange,
        displayName = displayName,
        eTag = eTag,
        includeMonetaryCommitment = includeMonetaryCommitment,
        kpis = kpis,
        metric = metric,
        modifiedOn = modifiedOn,
        pivots = pivots,
        scope = scope,
        timePeriod = timePeriod,
        timeframe = timeframe,
        type = type,
        viewName = viewName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy