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

com.pulumi.gcp.bigquery.kotlin.BiReservationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.bigquery.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.bigquery.BiReservationArgs.builder
import com.pulumi.gcp.bigquery.kotlin.inputs.BiReservationPreferredTableArgs
import com.pulumi.gcp.bigquery.kotlin.inputs.BiReservationPreferredTableArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Represents a BI Reservation.
 * To get more information about BiReservation, see:
 * * [API documentation](https://cloud.google.com/bigquery/docs/reference/reservations/rest/v1/BiReservation)
 * * How-to Guides
 *     * [Introduction to Reservations](https://cloud.google.com/bigquery/docs/reservations-intro)
 * ## Example Usage
 * ### Bigquery Reservation Bi Reservation Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const reservation = new gcp.bigquery.BiReservation("reservation", {
 *     location: "us-west2",
 *     size: 3000000000,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * reservation = gcp.bigquery.BiReservation("reservation",
 *     location="us-west2",
 *     size=3000000000)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var reservation = new Gcp.BigQuery.BiReservation("reservation", new()
 *     {
 *         Location = "us-west2",
 *         Size = 3000000000,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigquery"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := bigquery.NewBiReservation(ctx, "reservation", &bigquery.BiReservationArgs{
 * 			Location: pulumi.String("us-west2"),
 * 			Size:     pulumi.Int(3000000000),
 * 		})
 * 		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.gcp.bigquery.BiReservation;
 * import com.pulumi.gcp.bigquery.BiReservationArgs;
 * 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 reservation = new BiReservation("reservation", BiReservationArgs.builder()
 *             .location("us-west2")
 *             .size("3000000000")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   reservation:
 *     type: gcp:bigquery:BiReservation
 *     properties:
 *       location: us-west2
 *       size: '3000000000'
 * ```
 * 
 * ## Import
 * BiReservation can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/biReservation`
 * * `{{project}}/{{location}}`
 * * `{{location}}`
 * When using the `pulumi import` command, BiReservation can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:bigquery/biReservation:BiReservation default projects/{{project}}/locations/{{location}}/biReservation
 * ```
 * ```sh
 * $ pulumi import gcp:bigquery/biReservation:BiReservation default {{project}}/{{location}}
 * ```
 * ```sh
 * $ pulumi import gcp:bigquery/biReservation:BiReservation default {{location}}
 * ```
 * @property location LOCATION_DESCRIPTION
 * - - -
 * @property preferredTables Preferred tables to use BI capacity for.
 * Structure is documented below.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property size Size of a reservation, in bytes.
 */
public data class BiReservationArgs(
    public val location: Output? = null,
    public val preferredTables: Output>? = null,
    public val project: Output? = null,
    public val size: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.bigquery.BiReservationArgs =
        com.pulumi.gcp.bigquery.BiReservationArgs.builder()
            .location(location?.applyValue({ args0 -> args0 }))
            .preferredTables(
                preferredTables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .project(project?.applyValue({ args0 -> args0 }))
            .size(size?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BiReservationArgs].
 */
@PulumiTagMarker
public class BiReservationArgsBuilder internal constructor() {
    private var location: Output? = null

    private var preferredTables: Output>? = null

    private var project: Output? = null

    private var size: Output? = null

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

    /**
     * @param value Preferred tables to use BI capacity for.
     * Structure is documented below.
     */
    @JvmName("ngpbxwixwtgxkiih")
    public suspend fun preferredTables(`value`: Output>) {
        this.preferredTables = value
    }

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

    /**
     * @param values Preferred tables to use BI capacity for.
     * Structure is documented below.
     */
    @JvmName("wlbdhivprhkobfwu")
    public suspend fun preferredTables(values: List>) {
        this.preferredTables = Output.all(values)
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("virawnaavyveoprb")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Size of a reservation, in bytes.
     */
    @JvmName("exjwoafrcoioucpi")
    public suspend fun size(`value`: Output) {
        this.size = value
    }

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

    /**
     * @param value Preferred tables to use BI capacity for.
     * Structure is documented below.
     */
    @JvmName("qxcaxsmjnhyticlf")
    public suspend fun preferredTables(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.preferredTables = mapped
    }

    /**
     * @param argument Preferred tables to use BI capacity for.
     * Structure is documented below.
     */
    @JvmName("cfjxuvwvpmnbnhxp")
    public suspend fun preferredTables(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BiReservationPreferredTableArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.preferredTables = mapped
    }

    /**
     * @param argument Preferred tables to use BI capacity for.
     * Structure is documented below.
     */
    @JvmName("vlvljxhvivbamxnc")
    public suspend fun preferredTables(vararg argument: suspend BiReservationPreferredTableArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BiReservationPreferredTableArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.preferredTables = mapped
    }

    /**
     * @param argument Preferred tables to use BI capacity for.
     * Structure is documented below.
     */
    @JvmName("jippyijwyawhmsbo")
    public suspend fun preferredTables(argument: suspend BiReservationPreferredTableArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            BiReservationPreferredTableArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.preferredTables = mapped
    }

    /**
     * @param values Preferred tables to use BI capacity for.
     * Structure is documented below.
     */
    @JvmName("mkyiyuupctgtdkgl")
    public suspend fun preferredTables(vararg values: BiReservationPreferredTableArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.preferredTables = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("yfdcmvsldbaxyodf")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Size of a reservation, in bytes.
     */
    @JvmName("xreukvvdnxuaonvf")
    public suspend fun size(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.size = mapped
    }

    internal fun build(): BiReservationArgs = BiReservationArgs(
        location = location,
        preferredTables = preferredTables,
        project = project,
        size = size,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy