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

com.pulumi.gcp.cloudscheduler.kotlin.inputs.JobPubsubTargetArgs.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.cloudscheduler.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudscheduler.inputs.JobPubsubTargetArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property attributes Attributes for PubsubMessage.
 * Pubsub message must contain either non-empty data, or at least one attribute.
 * @property data The message payload for PubsubMessage.
 * Pubsub message must contain either non-empty data, or at least one attribute.
 * A base64-encoded string.
 * @property topicName The full resource name for the Cloud Pub/Sub topic to which
 * messages will be published when a job is delivered. ~>**NOTE:**
 * The topic name must be in the same format as required by PubSub's
 * PublishRequest.name, e.g. `projects/my-project/topics/my-topic`.
 */
public data class JobPubsubTargetArgs(
    public val attributes: Output>? = null,
    public val `data`: Output? = null,
    public val topicName: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudscheduler.inputs.JobPubsubTargetArgs =
        com.pulumi.gcp.cloudscheduler.inputs.JobPubsubTargetArgs.builder()
            .attributes(
                attributes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .`data`(`data`?.applyValue({ args0 -> args0 }))
            .topicName(topicName.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [JobPubsubTargetArgs].
 */
@PulumiTagMarker
public class JobPubsubTargetArgsBuilder internal constructor() {
    private var attributes: Output>? = null

    private var `data`: Output? = null

    private var topicName: Output? = null

    /**
     * @param value Attributes for PubsubMessage.
     * Pubsub message must contain either non-empty data, or at least one attribute.
     */
    @JvmName("aeqydkfglrswrebc")
    public suspend fun attributes(`value`: Output>) {
        this.attributes = value
    }

    /**
     * @param value The message payload for PubsubMessage.
     * Pubsub message must contain either non-empty data, or at least one attribute.
     * A base64-encoded string.
     */
    @JvmName("cmsgcllpkoitvdga")
    public suspend fun `data`(`value`: Output) {
        this.`data` = value
    }

    /**
     * @param value The full resource name for the Cloud Pub/Sub topic to which
     * messages will be published when a job is delivered. ~>**NOTE:**
     * The topic name must be in the same format as required by PubSub's
     * PublishRequest.name, e.g. `projects/my-project/topics/my-topic`.
     */
    @JvmName("lqsrmfifgtljkcgu")
    public suspend fun topicName(`value`: Output) {
        this.topicName = value
    }

    /**
     * @param value Attributes for PubsubMessage.
     * Pubsub message must contain either non-empty data, or at least one attribute.
     */
    @JvmName("pgrsvviqpyftwmrx")
    public suspend fun attributes(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attributes = mapped
    }

    /**
     * @param values Attributes for PubsubMessage.
     * Pubsub message must contain either non-empty data, or at least one attribute.
     */
    @JvmName("paexktmmmdoewqej")
    public fun attributes(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.attributes = mapped
    }

    /**
     * @param value The message payload for PubsubMessage.
     * Pubsub message must contain either non-empty data, or at least one attribute.
     * A base64-encoded string.
     */
    @JvmName("jbickmttvbigptab")
    public suspend fun `data`(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`data` = mapped
    }

    /**
     * @param value The full resource name for the Cloud Pub/Sub topic to which
     * messages will be published when a job is delivered. ~>**NOTE:**
     * The topic name must be in the same format as required by PubSub's
     * PublishRequest.name, e.g. `projects/my-project/topics/my-topic`.
     */
    @JvmName("qhkevwdniwrykxea")
    public suspend fun topicName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.topicName = mapped
    }

    internal fun build(): JobPubsubTargetArgs = JobPubsubTargetArgs(
        attributes = attributes,
        `data` = `data`,
        topicName = topicName ?: throw PulumiNullFieldException("topicName"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy