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

com.pulumi.gcp.cloudtasks.kotlin.outputs.QueueRetryConfig.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.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudtasks.kotlin.outputs

import kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 *
 * @property maxAttempts Number of attempts per task.
 * Cloud Tasks will attempt the task maxAttempts times (that is, if
 * the first attempt fails, then there will be maxAttempts - 1
 * retries). Must be >= -1.
 * If unspecified when the queue is created, Cloud Tasks will pick
 * the default.
 * -1 indicates unlimited attempts.
 * @property maxBackoff A task will be scheduled for retry between minBackoff and
 * maxBackoff duration after it fails, if the queue's RetryConfig
 * specifies that the task should be retried.
 * @property maxDoublings The time between retries will double maxDoublings times.
 * A task's retry interval starts at minBackoff, then doubles maxDoublings times,
 * then increases linearly, and finally retries retries at intervals of maxBackoff
 * up to maxAttempts times.
 * @property maxRetryDuration If positive, maxRetryDuration specifies the time limit for
 * retrying a failed task, measured from when the task was first
 * attempted. Once maxRetryDuration time has passed and the task has
 * been attempted maxAttempts times, no further attempts will be
 * made and the task will be deleted.
 * If zero, then the task age is unlimited.
 * @property minBackoff A task will be scheduled for retry between minBackoff and
 * maxBackoff duration after it fails, if the queue's RetryConfig
 * specifies that the task should be retried.
 */
public data class QueueRetryConfig(
    public val maxAttempts: Int? = null,
    public val maxBackoff: String? = null,
    public val maxDoublings: Int? = null,
    public val maxRetryDuration: String? = null,
    public val minBackoff: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.cloudtasks.outputs.QueueRetryConfig): QueueRetryConfig = QueueRetryConfig(
            maxAttempts = javaType.maxAttempts().map({ args0 -> args0 }).orElse(null),
            maxBackoff = javaType.maxBackoff().map({ args0 -> args0 }).orElse(null),
            maxDoublings = javaType.maxDoublings().map({ args0 -> args0 }).orElse(null),
            maxRetryDuration = javaType.maxRetryDuration().map({ args0 -> args0 }).orElse(null),
            minBackoff = javaType.minBackoff().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy