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

com.pulumi.gcp.storage.kotlin.BucketObjectArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.storage.kotlin

import com.pulumi.asset.AssetOrArchive
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.storage.BucketObjectArgs.builder
import com.pulumi.gcp.storage.kotlin.inputs.BucketObjectCustomerEncryptionArgs
import com.pulumi.gcp.storage.kotlin.inputs.BucketObjectCustomerEncryptionArgsBuilder
import com.pulumi.gcp.storage.kotlin.inputs.BucketObjectRetentionArgs
import com.pulumi.gcp.storage.kotlin.inputs.BucketObjectRetentionArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates a new object inside an existing bucket in Google cloud storage service (GCS).
 * [ACLs](https://cloud.google.com/storage/docs/access-control/lists) can be applied using the `gcp.storage.ObjectACL` resource.
 *  For more information see
 * [the official documentation](https://cloud.google.com/storage/docs/key-terms#objects)
 * and
 * [API](https://cloud.google.com/storage/docs/json_api/v1/objects).
 * ## Example Usage
 * Example creating a public object in an existing `image-store` bucket.
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const picture = new gcp.storage.BucketObject("picture", {
 *     name: "butterfly01",
 *     source: new pulumi.asset.FileAsset("/images/nature/garden-tiger-moth.jpg"),
 *     bucket: "image-store",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * picture = gcp.storage.BucketObject("picture",
 *     name="butterfly01",
 *     source=pulumi.FileAsset("/images/nature/garden-tiger-moth.jpg"),
 *     bucket="image-store")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var picture = new Gcp.Storage.BucketObject("picture", new()
 *     {
 *         Name = "butterfly01",
 *         Source = new FileAsset("/images/nature/garden-tiger-moth.jpg"),
 *         Bucket = "image-store",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := storage.NewBucketObject(ctx, "picture", &storage.BucketObjectArgs{
 * 			Name:   pulumi.String("butterfly01"),
 * 			Source: pulumi.NewFileAsset("/images/nature/garden-tiger-moth.jpg"),
 * 			Bucket: pulumi.String("image-store"),
 * 		})
 * 		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.storage.BucketObject;
 * import com.pulumi.gcp.storage.BucketObjectArgs;
 * import com.pulumi.asset.FileAsset;
 * 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 picture = new BucketObject("picture", BucketObjectArgs.builder()
 *             .name("butterfly01")
 *             .source(new FileAsset("/images/nature/garden-tiger-moth.jpg"))
 *             .bucket("image-store")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   picture:
 *     type: gcp:storage:BucketObject
 *     properties:
 *       name: butterfly01
 *       source:
 *         fn::FileAsset: /images/nature/garden-tiger-moth.jpg
 *       bucket: image-store
 * ```
 * 
 * Example creating an empty folder in an existing `image-store` bucket.
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const emptyFolder = new gcp.storage.BucketObject("empty_folder", {
 *     name: "empty_folder/",
 *     content: " ",
 *     bucket: "image-store",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * empty_folder = gcp.storage.BucketObject("empty_folder",
 *     name="empty_folder/",
 *     content=" ",
 *     bucket="image-store")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var emptyFolder = new Gcp.Storage.BucketObject("empty_folder", new()
 *     {
 *         Name = "empty_folder/",
 *         Content = " ",
 *         Bucket = "image-store",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := storage.NewBucketObject(ctx, "empty_folder", &storage.BucketObjectArgs{
 * 			Name:    pulumi.String("empty_folder/"),
 * 			Content: pulumi.String(" "),
 * 			Bucket:  pulumi.String("image-store"),
 * 		})
 * 		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.storage.BucketObject;
 * import com.pulumi.gcp.storage.BucketObjectArgs;
 * 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 emptyFolder = new BucketObject("emptyFolder", BucketObjectArgs.builder()
 *             .name("empty_folder/")
 *             .content(" ")
 *             .bucket("image-store")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   emptyFolder:
 *     type: gcp:storage:BucketObject
 *     name: empty_folder
 *     properties:
 *       name: empty_folder/
 *       content: ' '
 *       bucket: image-store
 * ```
 * 
 * ## Import
 * This resource does not support import.
 * @property bucket The name of the containing bucket.
 * @property cacheControl [Cache-Control](https://tools.ietf.org/html/rfc7234#section-5.2)
 * directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
 * @property content Data as `string` to be uploaded. Must be defined if `source` is not. **Note**: The `content` field is marked as sensitive.
 * @property contentDisposition [Content-Disposition](https://tools.ietf.org/html/rfc6266) of the object data.
 * @property contentEncoding [Content-Encoding](https://tools.ietf.org/html/rfc7231#section-3.1.2.2) of the object data.
 * @property contentLanguage [Content-Language](https://tools.ietf.org/html/rfc7231#section-3.1.3.2) of the object data.
 * @property contentType [Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5) of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
 * @property customerEncryption Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google [documentation about CSEK.](https://cloud.google.com/storage/docs/encryption/customer-supplied-keys)
 * Structure is documented below.
 * @property detectMd5hash
 * @property eventBasedHold Whether an object is under [event-based hold](https://cloud.google.com/storage/docs/object-holds#hold-types). Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
 * @property kmsKeyName The resource name of the Cloud KMS key that will be used to [encrypt](https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys) the object.
 * @property metadata User-provided metadata, in key/value pairs.
 * One of the following is required:
 * @property name The name of the object. If you're interpolating the name of this object, see `output_name` instead.
 * @property retention The [object retention](http://cloud.google.com/storage/docs/object-lock) settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
 * @property source A path to the data you want to upload. Must be defined
 * if `content` is not.
 * - - -
 * @property storageClass The [StorageClass](https://cloud.google.com/storage/docs/storage-classes) of the new bucket object.
 * Supported values include: `MULTI_REGIONAL`, `REGIONAL`, `NEARLINE`, `COLDLINE`, `ARCHIVE`. If not provided, this defaults to the bucket's default
 * storage class or to a [standard](https://cloud.google.com/storage/docs/storage-classes#standard) class.
 * @property temporaryHold Whether an object is under [temporary hold](https://cloud.google.com/storage/docs/object-holds#hold-types). While this flag is set to true, the object is protected against deletion and overwrites.
 */
public data class BucketObjectArgs(
    public val bucket: Output? = null,
    public val cacheControl: Output? = null,
    public val content: Output? = null,
    public val contentDisposition: Output? = null,
    public val contentEncoding: Output? = null,
    public val contentLanguage: Output? = null,
    public val contentType: Output? = null,
    public val customerEncryption: Output? = null,
    public val detectMd5hash: Output? = null,
    public val eventBasedHold: Output? = null,
    public val kmsKeyName: Output? = null,
    public val metadata: Output>? = null,
    public val name: Output? = null,
    public val retention: Output? = null,
    public val source: Output? = null,
    public val storageClass: Output? = null,
    public val temporaryHold: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.storage.BucketObjectArgs =
        com.pulumi.gcp.storage.BucketObjectArgs.builder()
            .bucket(bucket?.applyValue({ args0 -> args0 }))
            .cacheControl(cacheControl?.applyValue({ args0 -> args0 }))
            .content(content?.applyValue({ args0 -> args0 }))
            .contentDisposition(contentDisposition?.applyValue({ args0 -> args0 }))
            .contentEncoding(contentEncoding?.applyValue({ args0 -> args0 }))
            .contentLanguage(contentLanguage?.applyValue({ args0 -> args0 }))
            .contentType(contentType?.applyValue({ args0 -> args0 }))
            .customerEncryption(
                customerEncryption?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .detectMd5hash(detectMd5hash?.applyValue({ args0 -> args0 }))
            .eventBasedHold(eventBasedHold?.applyValue({ args0 -> args0 }))
            .kmsKeyName(kmsKeyName?.applyValue({ args0 -> args0 }))
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .retention(retention?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .source(source?.applyValue({ args0 -> args0 }))
            .storageClass(storageClass?.applyValue({ args0 -> args0 }))
            .temporaryHold(temporaryHold?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BucketObjectArgs].
 */
@PulumiTagMarker
public class BucketObjectArgsBuilder internal constructor() {
    private var bucket: Output? = null

    private var cacheControl: Output? = null

    private var content: Output? = null

    private var contentDisposition: Output? = null

    private var contentEncoding: Output? = null

    private var contentLanguage: Output? = null

    private var contentType: Output? = null

    private var customerEncryption: Output? = null

    private var detectMd5hash: Output? = null

    private var eventBasedHold: Output? = null

    private var kmsKeyName: Output? = null

    private var metadata: Output>? = null

    private var name: Output? = null

    private var retention: Output? = null

    private var source: Output? = null

    private var storageClass: Output? = null

    private var temporaryHold: Output? = null

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

    /**
     * @param value [Cache-Control](https://tools.ietf.org/html/rfc7234#section-5.2)
     * directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
     */
    @JvmName("ufcgwxxlupoclwoe")
    public suspend fun cacheControl(`value`: Output) {
        this.cacheControl = value
    }

    /**
     * @param value Data as `string` to be uploaded. Must be defined if `source` is not. **Note**: The `content` field is marked as sensitive.
     */
    @JvmName("uvnsjjmljbnxeudd")
    public suspend fun content(`value`: Output) {
        this.content = value
    }

    /**
     * @param value [Content-Disposition](https://tools.ietf.org/html/rfc6266) of the object data.
     */
    @JvmName("yrukophwiqbxdpbw")
    public suspend fun contentDisposition(`value`: Output) {
        this.contentDisposition = value
    }

    /**
     * @param value [Content-Encoding](https://tools.ietf.org/html/rfc7231#section-3.1.2.2) of the object data.
     */
    @JvmName("qmkdhramaicngybu")
    public suspend fun contentEncoding(`value`: Output) {
        this.contentEncoding = value
    }

    /**
     * @param value [Content-Language](https://tools.ietf.org/html/rfc7231#section-3.1.3.2) of the object data.
     */
    @JvmName("gjrurtbrgegukjwo")
    public suspend fun contentLanguage(`value`: Output) {
        this.contentLanguage = value
    }

    /**
     * @param value [Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5) of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
     */
    @JvmName("fvejvhxtekbywsce")
    public suspend fun contentType(`value`: Output) {
        this.contentType = value
    }

    /**
     * @param value Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google [documentation about CSEK.](https://cloud.google.com/storage/docs/encryption/customer-supplied-keys)
     * Structure is documented below.
     */
    @JvmName("yoirecpstwuxdxic")
    public suspend fun customerEncryption(`value`: Output) {
        this.customerEncryption = value
    }

    /**
     * @param value
     */
    @JvmName("daydsktcjmjsvuxy")
    public suspend fun detectMd5hash(`value`: Output) {
        this.detectMd5hash = value
    }

    /**
     * @param value Whether an object is under [event-based hold](https://cloud.google.com/storage/docs/object-holds#hold-types). Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
     */
    @JvmName("sqjtcjqhbxdespjs")
    public suspend fun eventBasedHold(`value`: Output) {
        this.eventBasedHold = value
    }

    /**
     * @param value The resource name of the Cloud KMS key that will be used to [encrypt](https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys) the object.
     */
    @JvmName("wgpphlhfdudhsqoh")
    public suspend fun kmsKeyName(`value`: Output) {
        this.kmsKeyName = value
    }

    /**
     * @param value User-provided metadata, in key/value pairs.
     * One of the following is required:
     */
    @JvmName("vjrvdbxahidkckpn")
    public suspend fun metadata(`value`: Output>) {
        this.metadata = value
    }

    /**
     * @param value The name of the object. If you're interpolating the name of this object, see `output_name` instead.
     */
    @JvmName("kxeiykgdyabyxiqy")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The [object retention](http://cloud.google.com/storage/docs/object-lock) settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
     */
    @JvmName("hrqfhpuvufmkfnjj")
    public suspend fun retention(`value`: Output) {
        this.retention = value
    }

    /**
     * @param value A path to the data you want to upload. Must be defined
     * if `content` is not.
     * - - -
     */
    @JvmName("ghvovchdwbqqyjky")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value The [StorageClass](https://cloud.google.com/storage/docs/storage-classes) of the new bucket object.
     * Supported values include: `MULTI_REGIONAL`, `REGIONAL`, `NEARLINE`, `COLDLINE`, `ARCHIVE`. If not provided, this defaults to the bucket's default
     * storage class or to a [standard](https://cloud.google.com/storage/docs/storage-classes#standard) class.
     */
    @JvmName("dqotcjvbqjwdrlra")
    public suspend fun storageClass(`value`: Output) {
        this.storageClass = value
    }

    /**
     * @param value Whether an object is under [temporary hold](https://cloud.google.com/storage/docs/object-holds#hold-types). While this flag is set to true, the object is protected against deletion and overwrites.
     */
    @JvmName("nyjeanekeisttnaj")
    public suspend fun temporaryHold(`value`: Output) {
        this.temporaryHold = value
    }

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

    /**
     * @param value [Cache-Control](https://tools.ietf.org/html/rfc7234#section-5.2)
     * directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600
     */
    @JvmName("oiqgusquymdvapts")
    public suspend fun cacheControl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cacheControl = mapped
    }

    /**
     * @param value Data as `string` to be uploaded. Must be defined if `source` is not. **Note**: The `content` field is marked as sensitive.
     */
    @JvmName("kuqdjlsvvpabdkun")
    public suspend fun content(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.content = mapped
    }

    /**
     * @param value [Content-Disposition](https://tools.ietf.org/html/rfc6266) of the object data.
     */
    @JvmName("bjwahfvoildwmyfd")
    public suspend fun contentDisposition(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentDisposition = mapped
    }

    /**
     * @param value [Content-Encoding](https://tools.ietf.org/html/rfc7231#section-3.1.2.2) of the object data.
     */
    @JvmName("uxwrgoaqoabrtfuo")
    public suspend fun contentEncoding(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentEncoding = mapped
    }

    /**
     * @param value [Content-Language](https://tools.ietf.org/html/rfc7231#section-3.1.3.2) of the object data.
     */
    @JvmName("nugdywxccfaooygo")
    public suspend fun contentLanguage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentLanguage = mapped
    }

    /**
     * @param value [Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5) of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8".
     */
    @JvmName("wromorfykqupjibe")
    public suspend fun contentType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentType = mapped
    }

    /**
     * @param value Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google [documentation about CSEK.](https://cloud.google.com/storage/docs/encryption/customer-supplied-keys)
     * Structure is documented below.
     */
    @JvmName("xynamushmrnmrnmd")
    public suspend fun customerEncryption(`value`: BucketObjectCustomerEncryptionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerEncryption = mapped
    }

    /**
     * @param argument Enables object encryption with Customer-Supplied Encryption Key (CSEK). Google [documentation about CSEK.](https://cloud.google.com/storage/docs/encryption/customer-supplied-keys)
     * Structure is documented below.
     */
    @JvmName("anwvbspoltgcxswb")
    public suspend fun customerEncryption(argument: suspend BucketObjectCustomerEncryptionArgsBuilder.() -> Unit) {
        val toBeMapped = BucketObjectCustomerEncryptionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.customerEncryption = mapped
    }

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

    /**
     * @param value Whether an object is under [event-based hold](https://cloud.google.com/storage/docs/object-holds#hold-types). Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any).
     */
    @JvmName("lkeghfgnmihekvnl")
    public suspend fun eventBasedHold(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventBasedHold = mapped
    }

    /**
     * @param value The resource name of the Cloud KMS key that will be used to [encrypt](https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys) the object.
     */
    @JvmName("gsjljepgsinefxbw")
    public suspend fun kmsKeyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyName = mapped
    }

    /**
     * @param value User-provided metadata, in key/value pairs.
     * One of the following is required:
     */
    @JvmName("huorotqqjxrytodb")
    public suspend fun metadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param values User-provided metadata, in key/value pairs.
     * One of the following is required:
     */
    @JvmName("vhffydwehifwibsw")
    public fun metadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param value The name of the object. If you're interpolating the name of this object, see `output_name` instead.
     */
    @JvmName("yiumrkapdhuwnkgo")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The [object retention](http://cloud.google.com/storage/docs/object-lock) settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
     */
    @JvmName("xjxrhgmwglbwiael")
    public suspend fun retention(`value`: BucketObjectRetentionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retention = mapped
    }

    /**
     * @param argument The [object retention](http://cloud.google.com/storage/docs/object-lock) settings for the object. The retention settings allow an object to be retained until a provided date. Structure is documented below.
     */
    @JvmName("mayoxadyrxqkqfci")
    public suspend fun retention(argument: suspend BucketObjectRetentionArgsBuilder.() -> Unit) {
        val toBeMapped = BucketObjectRetentionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.retention = mapped
    }

    /**
     * @param value A path to the data you want to upload. Must be defined
     * if `content` is not.
     * - - -
     */
    @JvmName("keckgmhinlinjxkk")
    public suspend fun source(`value`: AssetOrArchive?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.source = mapped
    }

    /**
     * @param value The [StorageClass](https://cloud.google.com/storage/docs/storage-classes) of the new bucket object.
     * Supported values include: `MULTI_REGIONAL`, `REGIONAL`, `NEARLINE`, `COLDLINE`, `ARCHIVE`. If not provided, this defaults to the bucket's default
     * storage class or to a [standard](https://cloud.google.com/storage/docs/storage-classes#standard) class.
     */
    @JvmName("xgvbssrgkrldikdu")
    public suspend fun storageClass(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageClass = mapped
    }

    /**
     * @param value Whether an object is under [temporary hold](https://cloud.google.com/storage/docs/object-holds#hold-types). While this flag is set to true, the object is protected against deletion and overwrites.
     */
    @JvmName("dqfucnpqsamwjagf")
    public suspend fun temporaryHold(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.temporaryHold = mapped
    }

    internal fun build(): BucketObjectArgs = BucketObjectArgs(
        bucket = bucket,
        cacheControl = cacheControl,
        content = content,
        contentDisposition = contentDisposition,
        contentEncoding = contentEncoding,
        contentLanguage = contentLanguage,
        contentType = contentType,
        customerEncryption = customerEncryption,
        detectMd5hash = detectMd5hash,
        eventBasedHold = eventBasedHold,
        kmsKeyName = kmsKeyName,
        metadata = metadata,
        name = name,
        retention = retention,
        source = source,
        storageClass = storageClass,
        temporaryHold = temporaryHold,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy