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

com.pulumi.gcp.pubsub.kotlin.inputs.SubscriptionCloudStorageConfigArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.pubsub.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.pubsub.inputs.SubscriptionCloudStorageConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property avroConfig If set, message data will be written to Cloud Storage in Avro format.
 * Structure is documented below.
 * @property bucket User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://".
 * @property filenameDatetimeFormat User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
 * @property filenamePrefix User-provided prefix for Cloud Storage filename.
 * @property filenameSuffix User-provided suffix for Cloud Storage filename. Must not end in "/".
 * @property maxBytes The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB.
 * The maxBytes limit may be exceeded in cases where messages are larger than the limit.
 * @property maxDuration The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes.
 * May not exceed the subscription's acknowledgement deadline.
 * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
 * @property maxMessages The maximum messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.
 * @property serviceAccountEmail The service account to use to write to Cloud Storage. If not specified, the Pub/Sub
 * [service agent](https://cloud.google.com/iam/docs/service-agents),
 * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
 * @property state (Output)
 * An output-only field that indicates whether or not the subscription can receive messages.
 */
public data class SubscriptionCloudStorageConfigArgs(
    public val avroConfig: Output? = null,
    public val bucket: Output,
    public val filenameDatetimeFormat: Output? = null,
    public val filenamePrefix: Output? = null,
    public val filenameSuffix: Output? = null,
    public val maxBytes: Output? = null,
    public val maxDuration: Output? = null,
    public val maxMessages: Output? = null,
    public val serviceAccountEmail: Output? = null,
    public val state: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.pubsub.inputs.SubscriptionCloudStorageConfigArgs =
        com.pulumi.gcp.pubsub.inputs.SubscriptionCloudStorageConfigArgs.builder()
            .avroConfig(avroConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .bucket(bucket.applyValue({ args0 -> args0 }))
            .filenameDatetimeFormat(filenameDatetimeFormat?.applyValue({ args0 -> args0 }))
            .filenamePrefix(filenamePrefix?.applyValue({ args0 -> args0 }))
            .filenameSuffix(filenameSuffix?.applyValue({ args0 -> args0 }))
            .maxBytes(maxBytes?.applyValue({ args0 -> args0 }))
            .maxDuration(maxDuration?.applyValue({ args0 -> args0 }))
            .maxMessages(maxMessages?.applyValue({ args0 -> args0 }))
            .serviceAccountEmail(serviceAccountEmail?.applyValue({ args0 -> args0 }))
            .state(state?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SubscriptionCloudStorageConfigArgs].
 */
@PulumiTagMarker
public class SubscriptionCloudStorageConfigArgsBuilder internal constructor() {
    private var avroConfig: Output? = null

    private var bucket: Output? = null

    private var filenameDatetimeFormat: Output? = null

    private var filenamePrefix: Output? = null

    private var filenameSuffix: Output? = null

    private var maxBytes: Output? = null

    private var maxDuration: Output? = null

    private var maxMessages: Output? = null

    private var serviceAccountEmail: Output? = null

    private var state: Output? = null

    /**
     * @param value If set, message data will be written to Cloud Storage in Avro format.
     * Structure is documented below.
     */
    @JvmName("ucigjiprybrjgksw")
    public suspend fun avroConfig(`value`: Output) {
        this.avroConfig = value
    }

    /**
     * @param value User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://".
     */
    @JvmName("risscujxghnjoyaj")
    public suspend fun bucket(`value`: Output) {
        this.bucket = value
    }

    /**
     * @param value User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
     */
    @JvmName("cebbpmeoogcjpcbc")
    public suspend fun filenameDatetimeFormat(`value`: Output) {
        this.filenameDatetimeFormat = value
    }

    /**
     * @param value User-provided prefix for Cloud Storage filename.
     */
    @JvmName("bartntbcdfdcxgbv")
    public suspend fun filenamePrefix(`value`: Output) {
        this.filenamePrefix = value
    }

    /**
     * @param value User-provided suffix for Cloud Storage filename. Must not end in "/".
     */
    @JvmName("nqteqfnsnldibqkn")
    public suspend fun filenameSuffix(`value`: Output) {
        this.filenameSuffix = value
    }

    /**
     * @param value The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB.
     * The maxBytes limit may be exceeded in cases where messages are larger than the limit.
     */
    @JvmName("uscpxtwmgtbmajvd")
    public suspend fun maxBytes(`value`: Output) {
        this.maxBytes = value
    }

    /**
     * @param value The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes.
     * May not exceed the subscription's acknowledgement deadline.
     * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
     */
    @JvmName("mmeumyywpjabqtap")
    public suspend fun maxDuration(`value`: Output) {
        this.maxDuration = value
    }

    /**
     * @param value The maximum messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.
     */
    @JvmName("ftbucdjdnvnpchoy")
    public suspend fun maxMessages(`value`: Output) {
        this.maxMessages = value
    }

    /**
     * @param value The service account to use to write to Cloud Storage. If not specified, the Pub/Sub
     * [service agent](https://cloud.google.com/iam/docs/service-agents),
     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
     */
    @JvmName("jsdnnoghplyxqkxt")
    public suspend fun serviceAccountEmail(`value`: Output) {
        this.serviceAccountEmail = value
    }

    /**
     * @param value (Output)
     * An output-only field that indicates whether or not the subscription can receive messages.
     */
    @JvmName("posxhhbwrvwjoaos")
    public suspend fun state(`value`: Output) {
        this.state = value
    }

    /**
     * @param value If set, message data will be written to Cloud Storage in Avro format.
     * Structure is documented below.
     */
    @JvmName("isdofekwsnoybhyh")
    public suspend fun avroConfig(`value`: SubscriptionCloudStorageConfigAvroConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.avroConfig = mapped
    }

    /**
     * @param argument If set, message data will be written to Cloud Storage in Avro format.
     * Structure is documented below.
     */
    @JvmName("mkqeosyemqdhnpxd")
    public suspend fun avroConfig(argument: suspend SubscriptionCloudStorageConfigAvroConfigArgsBuilder.() -> Unit) {
        val toBeMapped = SubscriptionCloudStorageConfigAvroConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.avroConfig = mapped
    }

    /**
     * @param value User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://".
     */
    @JvmName("qdmgcqmfeyiasmna")
    public suspend fun bucket(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.bucket = mapped
    }

    /**
     * @param value User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
     */
    @JvmName("xohnblshxslmjtqs")
    public suspend fun filenameDatetimeFormat(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filenameDatetimeFormat = mapped
    }

    /**
     * @param value User-provided prefix for Cloud Storage filename.
     */
    @JvmName("vvukirxmdkgtbgvk")
    public suspend fun filenamePrefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filenamePrefix = mapped
    }

    /**
     * @param value User-provided suffix for Cloud Storage filename. Must not end in "/".
     */
    @JvmName("fhxdpfuxgukxgjoo")
    public suspend fun filenameSuffix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filenameSuffix = mapped
    }

    /**
     * @param value The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB.
     * The maxBytes limit may be exceeded in cases where messages are larger than the limit.
     */
    @JvmName("odmtvrddicoyxcco")
    public suspend fun maxBytes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxBytes = mapped
    }

    /**
     * @param value The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes.
     * May not exceed the subscription's acknowledgement deadline.
     * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
     */
    @JvmName("doakoyyrwbgluhaw")
    public suspend fun maxDuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxDuration = mapped
    }

    /**
     * @param value The maximum messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.
     */
    @JvmName("fcnnfnwtyabxnlea")
    public suspend fun maxMessages(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxMessages = mapped
    }

    /**
     * @param value The service account to use to write to Cloud Storage. If not specified, the Pub/Sub
     * [service agent](https://cloud.google.com/iam/docs/service-agents),
     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
     */
    @JvmName("jsiiphhrnjhigxcq")
    public suspend fun serviceAccountEmail(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccountEmail = mapped
    }

    /**
     * @param value (Output)
     * An output-only field that indicates whether or not the subscription can receive messages.
     */
    @JvmName("xdnkytjhodajwggq")
    public suspend fun state(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.state = mapped
    }

    internal fun build(): SubscriptionCloudStorageConfigArgs = SubscriptionCloudStorageConfigArgs(
        avroConfig = avroConfig,
        bucket = bucket ?: throw PulumiNullFieldException("bucket"),
        filenameDatetimeFormat = filenameDatetimeFormat,
        filenamePrefix = filenamePrefix,
        filenameSuffix = filenameSuffix,
        maxBytes = maxBytes,
        maxDuration = maxDuration,
        maxMessages = maxMessages,
        serviceAccountEmail = serviceAccountEmail,
        state = state,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy