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

commonMain.aws.sdk.kotlin.services.codebuild.model.AutoRetryConfig.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codebuild.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about the auto-retry configuration for the build.
 */
public class AutoRetryConfig private constructor(builder: Builder) {
    /**
     * The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the `RetryBuild` API to automatically retry your build for up to 2 additional times.
     */
    public val autoRetryLimit: kotlin.Int? = builder.autoRetryLimit
    /**
     * The number of times that the build has been retried. The initial build will have an auto-retry number of 0.
     */
    public val autoRetryNumber: kotlin.Int? = builder.autoRetryNumber
    /**
     * The build ARN of the auto-retried build triggered by the current build. The next auto-retry will be `null` for builds that don't trigger an auto-retry.
     */
    public val nextAutoRetry: kotlin.String? = builder.nextAutoRetry
    /**
     * The build ARN of the build that triggered the current auto-retry build. The previous auto-retry will be `null` for the initial build.
     */
    public val previousAutoRetry: kotlin.String? = builder.previousAutoRetry

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codebuild.model.AutoRetryConfig = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("AutoRetryConfig(")
        append("autoRetryLimit=$autoRetryLimit,")
        append("autoRetryNumber=$autoRetryNumber,")
        append("nextAutoRetry=$nextAutoRetry,")
        append("previousAutoRetry=$previousAutoRetry")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = autoRetryLimit ?: 0
        result = 31 * result + (autoRetryNumber ?: 0)
        result = 31 * result + (nextAutoRetry?.hashCode() ?: 0)
        result = 31 * result + (previousAutoRetry?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as AutoRetryConfig

        if (autoRetryLimit != other.autoRetryLimit) return false
        if (autoRetryNumber != other.autoRetryNumber) return false
        if (nextAutoRetry != other.nextAutoRetry) return false
        if (previousAutoRetry != other.previousAutoRetry) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codebuild.model.AutoRetryConfig = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the `RetryBuild` API to automatically retry your build for up to 2 additional times.
         */
        public var autoRetryLimit: kotlin.Int? = null
        /**
         * The number of times that the build has been retried. The initial build will have an auto-retry number of 0.
         */
        public var autoRetryNumber: kotlin.Int? = null
        /**
         * The build ARN of the auto-retried build triggered by the current build. The next auto-retry will be `null` for builds that don't trigger an auto-retry.
         */
        public var nextAutoRetry: kotlin.String? = null
        /**
         * The build ARN of the build that triggered the current auto-retry build. The previous auto-retry will be `null` for the initial build.
         */
        public var previousAutoRetry: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codebuild.model.AutoRetryConfig) : this() {
            this.autoRetryLimit = x.autoRetryLimit
            this.autoRetryNumber = x.autoRetryNumber
            this.nextAutoRetry = x.nextAutoRetry
            this.previousAutoRetry = x.previousAutoRetry
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codebuild.model.AutoRetryConfig = AutoRetryConfig(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy