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

com.pulumi.googlenative.cloudtasks.v2beta2.kotlin.inputs.PullMessageArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.cloudtasks.v2beta2.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.cloudtasks.v2beta2.inputs.PullMessageArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * The pull message contains data that can be used by the caller of LeaseTasks to process the task. This proto can only be used for tasks in a queue which has pull_target set.
 * @property payload A data payload consumed by the worker to execute the task.
 * @property tag The task's tag. Tags allow similar tasks to be processed in a batch. If you label tasks with a tag, your worker can lease tasks with the same tag using filter. For example, if you want to aggregate the events associated with a specific user once a day, you could tag tasks with the user ID. The task's tag can only be set when the task is created. The tag must be less than 500 characters. SDK compatibility: Although the SDK allows tags to be either string or [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 encoded, the tag will be empty when the task is returned by Cloud Tasks.
 */
public data class PullMessageArgs(
    public val payload: Output? = null,
    public val tag: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.cloudtasks.v2beta2.inputs.PullMessageArgs =
        com.pulumi.googlenative.cloudtasks.v2beta2.inputs.PullMessageArgs.builder()
            .payload(payload?.applyValue({ args0 -> args0 }))
            .tag(tag?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PullMessageArgs].
 */
@PulumiTagMarker
public class PullMessageArgsBuilder internal constructor() {
    private var payload: Output? = null

    private var tag: Output? = null

    /**
     * @param value A data payload consumed by the worker to execute the task.
     */
    @JvmName("wjqdrjukwknxjpup")
    public suspend fun payload(`value`: Output) {
        this.payload = value
    }

    /**
     * @param value The task's tag. Tags allow similar tasks to be processed in a batch. If you label tasks with a tag, your worker can lease tasks with the same tag using filter. For example, if you want to aggregate the events associated with a specific user once a day, you could tag tasks with the user ID. The task's tag can only be set when the task is created. The tag must be less than 500 characters. SDK compatibility: Although the SDK allows tags to be either string or [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 encoded, the tag will be empty when the task is returned by Cloud Tasks.
     */
    @JvmName("pccrkmwogdacacts")
    public suspend fun tag(`value`: Output) {
        this.tag = value
    }

    /**
     * @param value A data payload consumed by the worker to execute the task.
     */
    @JvmName("leakblnfmbcarrpj")
    public suspend fun payload(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.payload = mapped
    }

    /**
     * @param value The task's tag. Tags allow similar tasks to be processed in a batch. If you label tasks with a tag, your worker can lease tasks with the same tag using filter. For example, if you want to aggregate the events associated with a specific user once a day, you could tag tasks with the user ID. The task's tag can only be set when the task is created. The tag must be less than 500 characters. SDK compatibility: Although the SDK allows tags to be either string or [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 encoded, the tag will be empty when the task is returned by Cloud Tasks.
     */
    @JvmName("lllululoyfunpqdu")
    public suspend fun tag(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tag = mapped
    }

    internal fun build(): PullMessageArgs = PullMessageArgs(
        payload = payload,
        tag = tag,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy