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

com.pulumi.digitalocean.kotlin.SpacesBucketArgs.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: 4.38.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.digitalocean.kotlin

import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.SpacesBucketArgs.builder
import com.pulumi.digitalocean.kotlin.enums.Region
import com.pulumi.digitalocean.kotlin.inputs.SpacesBucketCorsRuleArgs
import com.pulumi.digitalocean.kotlin.inputs.SpacesBucketCorsRuleArgsBuilder
import com.pulumi.digitalocean.kotlin.inputs.SpacesBucketLifecycleRuleArgs
import com.pulumi.digitalocean.kotlin.inputs.SpacesBucketLifecycleRuleArgsBuilder
import com.pulumi.digitalocean.kotlin.inputs.SpacesBucketVersioningArgs
import com.pulumi.digitalocean.kotlin.inputs.SpacesBucketVersioningArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a bucket resource for Spaces, DigitalOcean's object storage product.
 * The [Spaces API](https://docs.digitalocean.com/reference/api/spaces-api/) was
 * designed to be interoperable with Amazon's AWS S3 API. This allows users to
 * interact with the service while using the tools they already know. Spaces
 * mirrors S3's authentication framework and requests to Spaces require a key pair
 * similar to Amazon's Access ID and Secret Key.
 * The authentication requirement can be met by either setting the
 * `SPACES_ACCESS_KEY_ID` and `SPACES_SECRET_ACCESS_KEY` environment variables or
 * the provider's `spaces_access_id` and `spaces_secret_key` arguments to the
 * access ID and secret you generate via the DigitalOcean control panel. For
 * example:
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as digitalocean from "@pulumi/digitalocean";
 * const static_assets = new digitalocean.SpacesBucket("static-assets", {});
 * ```
 * ```python
 * import pulumi
 * import pulumi_digitalocean as digitalocean
 * static_assets = digitalocean.SpacesBucket("static-assets")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using DigitalOcean = Pulumi.DigitalOcean;
 * return await Deployment.RunAsync(() =>
 * {
 *     var static_assets = new DigitalOcean.SpacesBucket("static-assets");
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := digitalocean.NewSpacesBucket(ctx, "static-assets", nil)
 * 		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.digitalocean.SpacesBucket;
 * 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 static_assets = new SpacesBucket("static-assets");
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   static-assets:
 *     type: digitalocean:SpacesBucket
 * ```
 * 
 * For more information, See [An Introduction to DigitalOcean Spaces](https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-spaces)
 * ## Example Usage
 * ### Create a New Bucket
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as digitalocean from "@pulumi/digitalocean";
 * const foobar = new digitalocean.SpacesBucket("foobar", {
 *     name: "foobar",
 *     region: digitalocean.Region.NYC3,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_digitalocean as digitalocean
 * foobar = digitalocean.SpacesBucket("foobar",
 *     name="foobar",
 *     region=digitalocean.Region.NYC3)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using DigitalOcean = Pulumi.DigitalOcean;
 * return await Deployment.RunAsync(() =>
 * {
 *     var foobar = new DigitalOcean.SpacesBucket("foobar", new()
 *     {
 *         Name = "foobar",
 *         Region = DigitalOcean.Region.NYC3,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := digitalocean.NewSpacesBucket(ctx, "foobar", &digitalocean.SpacesBucketArgs{
 * 			Name:   pulumi.String("foobar"),
 * 			Region: pulumi.String(digitalocean.RegionNYC3),
 * 		})
 * 		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.digitalocean.SpacesBucket;
 * import com.pulumi.digitalocean.SpacesBucketArgs;
 * 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 foobar = new SpacesBucket("foobar", SpacesBucketArgs.builder()
 *             .name("foobar")
 *             .region("nyc3")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   foobar:
 *     type: digitalocean:SpacesBucket
 *     properties:
 *       name: foobar
 *       region: nyc3
 * ```
 * 
 * ### Create a New Bucket With CORS Rules
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as digitalocean from "@pulumi/digitalocean";
 * const foobar = new digitalocean.SpacesBucket("foobar", {
 *     name: "foobar",
 *     region: digitalocean.Region.NYC3,
 *     corsRules: [
 *         {
 *             allowedHeaders: ["*"],
 *             allowedMethods: ["GET"],
 *             allowedOrigins: ["*"],
 *             maxAgeSeconds: 3000,
 *         },
 *         {
 *             allowedHeaders: ["*"],
 *             allowedMethods: [
 *                 "PUT",
 *                 "POST",
 *                 "DELETE",
 *             ],
 *             allowedOrigins: ["https://www.example.com"],
 *             maxAgeSeconds: 3000,
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_digitalocean as digitalocean
 * foobar = digitalocean.SpacesBucket("foobar",
 *     name="foobar",
 *     region=digitalocean.Region.NYC3,
 *     cors_rules=[
 *         {
 *             "allowed_headers": ["*"],
 *             "allowed_methods": ["GET"],
 *             "allowed_origins": ["*"],
 *             "max_age_seconds": 3000,
 *         },
 *         {
 *             "allowed_headers": ["*"],
 *             "allowed_methods": [
 *                 "PUT",
 *                 "POST",
 *                 "DELETE",
 *             ],
 *             "allowed_origins": ["https://www.example.com"],
 *             "max_age_seconds": 3000,
 *         },
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using DigitalOcean = Pulumi.DigitalOcean;
 * return await Deployment.RunAsync(() =>
 * {
 *     var foobar = new DigitalOcean.SpacesBucket("foobar", new()
 *     {
 *         Name = "foobar",
 *         Region = DigitalOcean.Region.NYC3,
 *         CorsRules = new[]
 *         {
 *             new DigitalOcean.Inputs.SpacesBucketCorsRuleArgs
 *             {
 *                 AllowedHeaders = new[]
 *                 {
 *                     "*",
 *                 },
 *                 AllowedMethods = new[]
 *                 {
 *                     "GET",
 *                 },
 *                 AllowedOrigins = new[]
 *                 {
 *                     "*",
 *                 },
 *                 MaxAgeSeconds = 3000,
 *             },
 *             new DigitalOcean.Inputs.SpacesBucketCorsRuleArgs
 *             {
 *                 AllowedHeaders = new[]
 *                 {
 *                     "*",
 *                 },
 *                 AllowedMethods = new[]
 *                 {
 *                     "PUT",
 *                     "POST",
 *                     "DELETE",
 *                 },
 *                 AllowedOrigins = new[]
 *                 {
 *                     "https://www.example.com",
 *                 },
 *                 MaxAgeSeconds = 3000,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := digitalocean.NewSpacesBucket(ctx, "foobar", &digitalocean.SpacesBucketArgs{
 * 			Name:   pulumi.String("foobar"),
 * 			Region: pulumi.String(digitalocean.RegionNYC3),
 * 			CorsRules: digitalocean.SpacesBucketCorsRuleArray{
 * 				&digitalocean.SpacesBucketCorsRuleArgs{
 * 					AllowedHeaders: pulumi.StringArray{
 * 						pulumi.String("*"),
 * 					},
 * 					AllowedMethods: pulumi.StringArray{
 * 						pulumi.String("GET"),
 * 					},
 * 					AllowedOrigins: pulumi.StringArray{
 * 						pulumi.String("*"),
 * 					},
 * 					MaxAgeSeconds: pulumi.Int(3000),
 * 				},
 * 				&digitalocean.SpacesBucketCorsRuleArgs{
 * 					AllowedHeaders: pulumi.StringArray{
 * 						pulumi.String("*"),
 * 					},
 * 					AllowedMethods: pulumi.StringArray{
 * 						pulumi.String("PUT"),
 * 						pulumi.String("POST"),
 * 						pulumi.String("DELETE"),
 * 					},
 * 					AllowedOrigins: pulumi.StringArray{
 * 						pulumi.String("https://www.example.com"),
 * 					},
 * 					MaxAgeSeconds: pulumi.Int(3000),
 * 				},
 * 			},
 * 		})
 * 		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.digitalocean.SpacesBucket;
 * import com.pulumi.digitalocean.SpacesBucketArgs;
 * import com.pulumi.digitalocean.inputs.SpacesBucketCorsRuleArgs;
 * 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 foobar = new SpacesBucket("foobar", SpacesBucketArgs.builder()
 *             .name("foobar")
 *             .region("nyc3")
 *             .corsRules(
 *                 SpacesBucketCorsRuleArgs.builder()
 *                     .allowedHeaders("*")
 *                     .allowedMethods("GET")
 *                     .allowedOrigins("*")
 *                     .maxAgeSeconds(3000)
 *                     .build(),
 *                 SpacesBucketCorsRuleArgs.builder()
 *                     .allowedHeaders("*")
 *                     .allowedMethods(
 *                         "PUT",
 *                         "POST",
 *                         "DELETE")
 *                     .allowedOrigins("https://www.example.com")
 *                     .maxAgeSeconds(3000)
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   foobar:
 *     type: digitalocean:SpacesBucket
 *     properties:
 *       name: foobar
 *       region: nyc3
 *       corsRules:
 *         - allowedHeaders:
 *             - '*'
 *           allowedMethods:
 *             - GET
 *           allowedOrigins:
 *             - '*'
 *           maxAgeSeconds: 3000
 *         - allowedHeaders:
 *             - '*'
 *           allowedMethods:
 *             - PUT
 *             - POST
 *             - DELETE
 *           allowedOrigins:
 *             - https://www.example.com
 *           maxAgeSeconds: 3000
 * ```
 * 
 * ## Import
 * Buckets can be imported using the `region` and `name` attributes (delimited by a comma):
 * ```sh
 * $ pulumi import digitalocean:index/spacesBucket:SpacesBucket foobar `region`,`name`
 * ```
 * @property acl Canned ACL applied on bucket creation (`private` or `public-read`)
 * @property corsRules A rule of Cross-Origin Resource Sharing (documented below).
 * @property forceDestroy Unless `true`, the bucket will only be destroyed if empty (Defaults to `false`)
 * @property lifecycleRules A configuration of object lifecycle management (documented below).
 * @property name The name of the bucket
 * @property region The region where the bucket resides (Defaults to `nyc3`)
 * @property versioning A state of versioning (documented below)
 */
public data class SpacesBucketArgs(
    public val acl: Output? = null,
    @Deprecated(
        message = """
  Terraform will only perform drift detection if a configuration value is provided. Use the resource
      `digitalocean.SpacesBucketCorsConfiguration` instead.
  """,
    )
    public val corsRules: Output>? = null,
    public val forceDestroy: Output? = null,
    public val lifecycleRules: Output>? = null,
    public val name: Output? = null,
    public val region: Output>? = null,
    public val versioning: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.SpacesBucketArgs =
        com.pulumi.digitalocean.SpacesBucketArgs.builder()
            .acl(acl?.applyValue({ args0 -> args0 }))
            .corsRules(
                corsRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .forceDestroy(forceDestroy?.applyValue({ args0 -> args0 }))
            .lifecycleRules(
                lifecycleRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .region(
                region?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .versioning(versioning?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [SpacesBucketArgs].
 */
@PulumiTagMarker
public class SpacesBucketArgsBuilder internal constructor() {
    private var acl: Output? = null

    private var corsRules: Output>? = null

    private var forceDestroy: Output? = null

    private var lifecycleRules: Output>? = null

    private var name: Output? = null

    private var region: Output>? = null

    private var versioning: Output? = null

    /**
     * @param value Canned ACL applied on bucket creation (`private` or `public-read`)
     */
    @JvmName("gdnxfdkusgnkkqgl")
    public suspend fun acl(`value`: Output) {
        this.acl = value
    }

    /**
     * @param value A rule of Cross-Origin Resource Sharing (documented below).
     */
    @Deprecated(
        message = """
  Terraform will only perform drift detection if a configuration value is provided. Use the resource
      `digitalocean.SpacesBucketCorsConfiguration` instead.
  """,
    )
    @JvmName("yjnntstirfmdexsg")
    public suspend fun corsRules(`value`: Output>) {
        this.corsRules = value
    }

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

    /**
     * @param values A rule of Cross-Origin Resource Sharing (documented below).
     */
    @Deprecated(
        message = """
  Terraform will only perform drift detection if a configuration value is provided. Use the resource
      `digitalocean.SpacesBucketCorsConfiguration` instead.
  """,
    )
    @JvmName("axpayocenwvmihhm")
    public suspend fun corsRules(values: List>) {
        this.corsRules = Output.all(values)
    }

    /**
     * @param value Unless `true`, the bucket will only be destroyed if empty (Defaults to `false`)
     */
    @JvmName("tpbawxjosvpvywvu")
    public suspend fun forceDestroy(`value`: Output) {
        this.forceDestroy = value
    }

    /**
     * @param value A configuration of object lifecycle management (documented below).
     */
    @JvmName("piohqrbmcvtffwku")
    public suspend fun lifecycleRules(`value`: Output>) {
        this.lifecycleRules = value
    }

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

    /**
     * @param values A configuration of object lifecycle management (documented below).
     */
    @JvmName("lsaxhjfthlpoixhe")
    public suspend fun lifecycleRules(values: List>) {
        this.lifecycleRules = Output.all(values)
    }

    /**
     * @param value The name of the bucket
     */
    @JvmName("vuwxvqowqidqdxky")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The region where the bucket resides (Defaults to `nyc3`)
     */
    @JvmName("ckirydlgkntippfy")
    public suspend fun region(`value`: Output>) {
        this.region = value
    }

    /**
     * @param value A state of versioning (documented below)
     */
    @JvmName("fflxkmkvnvjoxgyh")
    public suspend fun versioning(`value`: Output) {
        this.versioning = value
    }

    /**
     * @param value Canned ACL applied on bucket creation (`private` or `public-read`)
     */
    @JvmName("lawrgmjotjjrimjx")
    public suspend fun acl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.acl = mapped
    }

    /**
     * @param value A rule of Cross-Origin Resource Sharing (documented below).
     */
    @Deprecated(
        message = """
  Terraform will only perform drift detection if a configuration value is provided. Use the resource
      `digitalocean.SpacesBucketCorsConfiguration` instead.
  """,
    )
    @JvmName("wxxfvwweyiwkpmbs")
    public suspend fun corsRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.corsRules = mapped
    }

    /**
     * @param argument A rule of Cross-Origin Resource Sharing (documented below).
     */
    @Deprecated(
        message = """
  Terraform will only perform drift detection if a configuration value is provided. Use the resource
      `digitalocean.SpacesBucketCorsConfiguration` instead.
  """,
    )
    @JvmName("nxbwqgcudsogvwvf")
    public suspend fun corsRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SpacesBucketCorsRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.corsRules = mapped
    }

    /**
     * @param argument A rule of Cross-Origin Resource Sharing (documented below).
     */
    @Deprecated(
        message = """
  Terraform will only perform drift detection if a configuration value is provided. Use the resource
      `digitalocean.SpacesBucketCorsConfiguration` instead.
  """,
    )
    @JvmName("lskgmfxggygodgjs")
    public suspend fun corsRules(vararg argument: suspend SpacesBucketCorsRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SpacesBucketCorsRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.corsRules = mapped
    }

    /**
     * @param argument A rule of Cross-Origin Resource Sharing (documented below).
     */
    @Deprecated(
        message = """
  Terraform will only perform drift detection if a configuration value is provided. Use the resource
      `digitalocean.SpacesBucketCorsConfiguration` instead.
  """,
    )
    @JvmName("bqvodpigxrhrewra")
    public suspend fun corsRules(argument: suspend SpacesBucketCorsRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SpacesBucketCorsRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.corsRules = mapped
    }

    /**
     * @param values A rule of Cross-Origin Resource Sharing (documented below).
     */
    @Deprecated(
        message = """
  Terraform will only perform drift detection if a configuration value is provided. Use the resource
      `digitalocean.SpacesBucketCorsConfiguration` instead.
  """,
    )
    @JvmName("vsvdnprhidgibjxu")
    public suspend fun corsRules(vararg values: SpacesBucketCorsRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.corsRules = mapped
    }

    /**
     * @param value Unless `true`, the bucket will only be destroyed if empty (Defaults to `false`)
     */
    @JvmName("pvidhiwbokehirbr")
    public suspend fun forceDestroy(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forceDestroy = mapped
    }

    /**
     * @param value A configuration of object lifecycle management (documented below).
     */
    @JvmName("spxxqgxfgwofafjv")
    public suspend fun lifecycleRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lifecycleRules = mapped
    }

    /**
     * @param argument A configuration of object lifecycle management (documented below).
     */
    @JvmName("emeljbphhtfpcqpe")
    public suspend fun lifecycleRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SpacesBucketLifecycleRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lifecycleRules = mapped
    }

    /**
     * @param argument A configuration of object lifecycle management (documented below).
     */
    @JvmName("knrpwmyinruhhpjb")
    public suspend fun lifecycleRules(vararg argument: suspend SpacesBucketLifecycleRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SpacesBucketLifecycleRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lifecycleRules = mapped
    }

    /**
     * @param argument A configuration of object lifecycle management (documented below).
     */
    @JvmName("mkjuujddpixngsyc")
    public suspend fun lifecycleRules(argument: suspend SpacesBucketLifecycleRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SpacesBucketLifecycleRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.lifecycleRules = mapped
    }

    /**
     * @param values A configuration of object lifecycle management (documented below).
     */
    @JvmName("fbdoxrknaignvwhi")
    public suspend fun lifecycleRules(vararg values: SpacesBucketLifecycleRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lifecycleRules = mapped
    }

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

    /**
     * @param value The region where the bucket resides (Defaults to `nyc3`)
     */
    @JvmName("asccmvxwbgneaaim")
    public suspend fun region(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    /**
     * @param value The region where the bucket resides (Defaults to `nyc3`)
     */
    @JvmName("ayctsuqqqnijdgvm")
    public fun region(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.region = mapped
    }

    /**
     * @param value The region where the bucket resides (Defaults to `nyc3`)
     */
    @JvmName("wymlkcniyygudhiq")
    public fun region(`value`: Region) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.region = mapped
    }

    /**
     * @param value A state of versioning (documented below)
     */
    @JvmName("dfskplcuewhtnlqd")
    public suspend fun versioning(`value`: SpacesBucketVersioningArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.versioning = mapped
    }

    /**
     * @param argument A state of versioning (documented below)
     */
    @JvmName("utivrqjhtbtedpjp")
    public suspend fun versioning(argument: suspend SpacesBucketVersioningArgsBuilder.() -> Unit) {
        val toBeMapped = SpacesBucketVersioningArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.versioning = mapped
    }

    internal fun build(): SpacesBucketArgs = SpacesBucketArgs(
        acl = acl,
        corsRules = corsRules,
        forceDestroy = forceDestroy,
        lifecycleRules = lifecycleRules,
        name = name,
        region = region,
        versioning = versioning,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy