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

com.pulumi.gcp.pubsub.kotlin.inputs.TopicIngestionDataSourceSettingsCloudStorageArgs.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.TopicIngestionDataSourceSettingsCloudStorageArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property avroFormat Configuration for reading Cloud Storage data in Avro binary format. The
 * bytes of each object will be set to the `data` field of a Pub/Sub message.
 * @property bucket Cloud Storage bucket. The bucket name must be without any
 * prefix like "gs://". See the bucket naming requirements:
 * https://cloud.google.com/storage/docs/buckets#naming.
 * @property matchGlob Glob pattern used to match objects that will be ingested. If unset, all
 * objects will be ingested. See the supported patterns:
 * https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob
 * @property minimumObjectCreateTime The timestamp set in RFC3339 text format. If set, only objects with a
 * larger or equal timestamp will be ingested. Unset by default, meaning
 * all objects will be ingested.
 * @property pubsubAvroFormat Configuration for reading Cloud Storage data written via Cloud Storage
 * subscriptions(See https://cloud.google.com/pubsub/docs/cloudstorage). The
 * data and attributes fields of the originally exported Pub/Sub message
 * will be restored when publishing.
 * @property textFormat Configuration for reading Cloud Storage data in text format. Each line of
 * text as specified by the delimiter will be set to the `data` field of a
 * Pub/Sub message.
 * Structure is documented below.
 */
public data class TopicIngestionDataSourceSettingsCloudStorageArgs(
    public val avroFormat: Output? = null,
    public val bucket: Output,
    public val matchGlob: Output? = null,
    public val minimumObjectCreateTime: Output? = null,
    public val pubsubAvroFormat: Output? = null,
    public val textFormat: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsCloudStorageArgs =
        com.pulumi.gcp.pubsub.inputs.TopicIngestionDataSourceSettingsCloudStorageArgs.builder()
            .avroFormat(avroFormat?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .bucket(bucket.applyValue({ args0 -> args0 }))
            .matchGlob(matchGlob?.applyValue({ args0 -> args0 }))
            .minimumObjectCreateTime(minimumObjectCreateTime?.applyValue({ args0 -> args0 }))
            .pubsubAvroFormat(pubsubAvroFormat?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .textFormat(textFormat?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [TopicIngestionDataSourceSettingsCloudStorageArgs].
 */
@PulumiTagMarker
public class TopicIngestionDataSourceSettingsCloudStorageArgsBuilder internal constructor() {
    private var avroFormat: Output? = null

    private var bucket: Output? = null

    private var matchGlob: Output? = null

    private var minimumObjectCreateTime: Output? = null

    private var pubsubAvroFormat:
        Output? = null

    private var textFormat: Output? = null

    /**
     * @param value Configuration for reading Cloud Storage data in Avro binary format. The
     * bytes of each object will be set to the `data` field of a Pub/Sub message.
     */
    @JvmName("yopupcnfhklfmnjr")
    public suspend fun avroFormat(`value`: Output) {
        this.avroFormat = value
    }

    /**
     * @param value Cloud Storage bucket. The bucket name must be without any
     * prefix like "gs://". See the bucket naming requirements:
     * https://cloud.google.com/storage/docs/buckets#naming.
     */
    @JvmName("jullcsavetublvqx")
    public suspend fun bucket(`value`: Output) {
        this.bucket = value
    }

    /**
     * @param value Glob pattern used to match objects that will be ingested. If unset, all
     * objects will be ingested. See the supported patterns:
     * https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob
     */
    @JvmName("laovngxoxocjryyf")
    public suspend fun matchGlob(`value`: Output) {
        this.matchGlob = value
    }

    /**
     * @param value The timestamp set in RFC3339 text format. If set, only objects with a
     * larger or equal timestamp will be ingested. Unset by default, meaning
     * all objects will be ingested.
     */
    @JvmName("nsssiowcffthefqr")
    public suspend fun minimumObjectCreateTime(`value`: Output) {
        this.minimumObjectCreateTime = value
    }

    /**
     * @param value Configuration for reading Cloud Storage data written via Cloud Storage
     * subscriptions(See https://cloud.google.com/pubsub/docs/cloudstorage). The
     * data and attributes fields of the originally exported Pub/Sub message
     * will be restored when publishing.
     */
    @JvmName("karqmnranewtbboj")
    public suspend fun pubsubAvroFormat(`value`: Output) {
        this.pubsubAvroFormat = value
    }

    /**
     * @param value Configuration for reading Cloud Storage data in text format. Each line of
     * text as specified by the delimiter will be set to the `data` field of a
     * Pub/Sub message.
     * Structure is documented below.
     */
    @JvmName("orhetsyhkpngsxjx")
    public suspend fun textFormat(`value`: Output) {
        this.textFormat = value
    }

    /**
     * @param value Configuration for reading Cloud Storage data in Avro binary format. The
     * bytes of each object will be set to the `data` field of a Pub/Sub message.
     */
    @JvmName("lvvnttqplxhpnoks")
    public suspend fun avroFormat(`value`: TopicIngestionDataSourceSettingsCloudStorageAvroFormatArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.avroFormat = mapped
    }

    /**
     * @param argument Configuration for reading Cloud Storage data in Avro binary format. The
     * bytes of each object will be set to the `data` field of a Pub/Sub message.
     */
    @JvmName("ieoxbkbdahafptrv")
    public suspend fun avroFormat(argument: suspend TopicIngestionDataSourceSettingsCloudStorageAvroFormatArgsBuilder.() -> Unit) {
        val toBeMapped =
            TopicIngestionDataSourceSettingsCloudStorageAvroFormatArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.avroFormat = mapped
    }

    /**
     * @param value Cloud Storage bucket. The bucket name must be without any
     * prefix like "gs://". See the bucket naming requirements:
     * https://cloud.google.com/storage/docs/buckets#naming.
     */
    @JvmName("pvrsrlvxloujwkjo")
    public suspend fun bucket(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.bucket = mapped
    }

    /**
     * @param value Glob pattern used to match objects that will be ingested. If unset, all
     * objects will be ingested. See the supported patterns:
     * https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob
     */
    @JvmName("wuhamdgltwevumrh")
    public suspend fun matchGlob(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchGlob = mapped
    }

    /**
     * @param value The timestamp set in RFC3339 text format. If set, only objects with a
     * larger or equal timestamp will be ingested. Unset by default, meaning
     * all objects will be ingested.
     */
    @JvmName("imebjayxdmfbuoap")
    public suspend fun minimumObjectCreateTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minimumObjectCreateTime = mapped
    }

    /**
     * @param value Configuration for reading Cloud Storage data written via Cloud Storage
     * subscriptions(See https://cloud.google.com/pubsub/docs/cloudstorage). The
     * data and attributes fields of the originally exported Pub/Sub message
     * will be restored when publishing.
     */
    @JvmName("pbmdckxuwgofugkc")
    public suspend fun pubsubAvroFormat(`value`: TopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pubsubAvroFormat = mapped
    }

    /**
     * @param argument Configuration for reading Cloud Storage data written via Cloud Storage
     * subscriptions(See https://cloud.google.com/pubsub/docs/cloudstorage). The
     * data and attributes fields of the originally exported Pub/Sub message
     * will be restored when publishing.
     */
    @JvmName("ysefuqptvomkocek")
    public suspend fun pubsubAvroFormat(argument: suspend TopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatArgsBuilder.() -> Unit) {
        val toBeMapped =
            TopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.pubsubAvroFormat = mapped
    }

    /**
     * @param value Configuration for reading Cloud Storage data in text format. Each line of
     * text as specified by the delimiter will be set to the `data` field of a
     * Pub/Sub message.
     * Structure is documented below.
     */
    @JvmName("ctubhpbytoprehwi")
    public suspend fun textFormat(`value`: TopicIngestionDataSourceSettingsCloudStorageTextFormatArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.textFormat = mapped
    }

    /**
     * @param argument Configuration for reading Cloud Storage data in text format. Each line of
     * text as specified by the delimiter will be set to the `data` field of a
     * Pub/Sub message.
     * Structure is documented below.
     */
    @JvmName("otstxawaetjmqtfc")
    public suspend fun textFormat(argument: suspend TopicIngestionDataSourceSettingsCloudStorageTextFormatArgsBuilder.() -> Unit) {
        val toBeMapped =
            TopicIngestionDataSourceSettingsCloudStorageTextFormatArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.textFormat = mapped
    }

    internal fun build(): TopicIngestionDataSourceSettingsCloudStorageArgs =
        TopicIngestionDataSourceSettingsCloudStorageArgs(
            avroFormat = avroFormat,
            bucket = bucket ?: throw PulumiNullFieldException("bucket"),
            matchGlob = matchGlob,
            minimumObjectCreateTime = minimumObjectCreateTime,
            pubsubAvroFormat = pubsubAvroFormat,
            textFormat = textFormat,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy