
com.pulumi.googlenative.pubsub.v1beta1a.kotlin.SubscriptionArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-google-native-kotlin Show documentation
Show all versions of pulumi-google-native-kotlin Show documentation
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.pubsub.v1beta1a.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.pubsub.v1beta1a.SubscriptionArgs.builder
import com.pulumi.googlenative.pubsub.v1beta1a.kotlin.inputs.PushConfigArgs
import com.pulumi.googlenative.pubsub.v1beta1a.kotlin.inputs.PushConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
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
/**
* Creates a subscription on a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.
* @property ackDeadlineSeconds For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
* @property name Name of the subscription.
* @property pushConfig If push delivery is used with this subscription, this field is used to configure it.
* @property topic The name of the topic from which this subscription is receiving messages.
*/
public data class SubscriptionArgs(
public val ackDeadlineSeconds: Output? = null,
public val name: Output? = null,
public val pushConfig: Output? = null,
public val topic: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.googlenative.pubsub.v1beta1a.SubscriptionArgs =
com.pulumi.googlenative.pubsub.v1beta1a.SubscriptionArgs.builder()
.ackDeadlineSeconds(ackDeadlineSeconds?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.pushConfig(pushConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.topic(topic?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SubscriptionArgs].
*/
@PulumiTagMarker
public class SubscriptionArgsBuilder internal constructor() {
private var ackDeadlineSeconds: Output? = null
private var name: Output? = null
private var pushConfig: Output? = null
private var topic: Output? = null
/**
* @param value For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
*/
@JvmName("djxstxsewyjtsvox")
public suspend fun ackDeadlineSeconds(`value`: Output) {
this.ackDeadlineSeconds = value
}
/**
* @param value Name of the subscription.
*/
@JvmName("pyocbfkrgaisrwfd")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value If push delivery is used with this subscription, this field is used to configure it.
*/
@JvmName("xqmmkkgnnsfjnmvn")
public suspend fun pushConfig(`value`: Output) {
this.pushConfig = value
}
/**
* @param value The name of the topic from which this subscription is receiving messages.
*/
@JvmName("wxoyditcqcabitfs")
public suspend fun topic(`value`: Output) {
this.topic = value
}
/**
* @param value For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
*/
@JvmName("dbabxjwgfgdrndgi")
public suspend fun ackDeadlineSeconds(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ackDeadlineSeconds = mapped
}
/**
* @param value Name of the subscription.
*/
@JvmName("lcjjfhqmmhuuhbao")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value If push delivery is used with this subscription, this field is used to configure it.
*/
@JvmName("rhsfbnggoretlxer")
public suspend fun pushConfig(`value`: PushConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.pushConfig = mapped
}
/**
* @param argument If push delivery is used with this subscription, this field is used to configure it.
*/
@JvmName("iyelwlrypuvtcojh")
public suspend fun pushConfig(argument: suspend PushConfigArgsBuilder.() -> Unit) {
val toBeMapped = PushConfigArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.pushConfig = mapped
}
/**
* @param value The name of the topic from which this subscription is receiving messages.
*/
@JvmName("yfldjqtmsffnwnmx")
public suspend fun topic(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.topic = mapped
}
internal fun build(): SubscriptionArgs = SubscriptionArgs(
ackDeadlineSeconds = ackDeadlineSeconds,
name = name,
pushConfig = pushConfig,
topic = topic,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy