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

commonMain.aws.sdk.kotlin.services.codedeploy.model.Diagnostics.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codedeploy.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Diagnostic information about executable scripts that are part of a deployment.
 */
public class Diagnostics private constructor(builder: Builder) {
    /**
     * The associated error code:
     * + Success: The specified script ran.
     * + ScriptMissing: The specified script was not found in the specified location.
     * + ScriptNotExecutable: The specified script is not a recognized executable file type.
     * + ScriptTimedOut: The specified script did not finish running in the specified time period.
     * + ScriptFailed: The specified script failed to run as expected.
     * + UnknownError: The specified script did not run for an unknown reason.
     */
    public val errorCode: aws.sdk.kotlin.services.codedeploy.model.LifecycleErrorCode? = builder.errorCode
    /**
     * The last portion of the diagnostic log.
     *
     * If available, CodeDeploy returns up to the last 4 KB of the diagnostic log.
     */
    public val logTail: kotlin.String? = builder.logTail
    /**
     * The message associated with the error.
     */
    public val message: kotlin.String? = builder.message
    /**
     * The name of the script.
     */
    public val scriptName: kotlin.String? = builder.scriptName

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

    override fun toString(): kotlin.String = buildString {
        append("Diagnostics(")
        append("errorCode=$errorCode,")
        append("logTail=$logTail,")
        append("message=$message,")
        append("scriptName=$scriptName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = errorCode?.hashCode() ?: 0
        result = 31 * result + (logTail?.hashCode() ?: 0)
        result = 31 * result + (message?.hashCode() ?: 0)
        result = 31 * result + (scriptName?.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 Diagnostics

        if (errorCode != other.errorCode) return false
        if (logTail != other.logTail) return false
        if (message != other.message) return false
        if (scriptName != other.scriptName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The associated error code:
         * + Success: The specified script ran.
         * + ScriptMissing: The specified script was not found in the specified location.
         * + ScriptNotExecutable: The specified script is not a recognized executable file type.
         * + ScriptTimedOut: The specified script did not finish running in the specified time period.
         * + ScriptFailed: The specified script failed to run as expected.
         * + UnknownError: The specified script did not run for an unknown reason.
         */
        public var errorCode: aws.sdk.kotlin.services.codedeploy.model.LifecycleErrorCode? = null
        /**
         * The last portion of the diagnostic log.
         *
         * If available, CodeDeploy returns up to the last 4 KB of the diagnostic log.
         */
        public var logTail: kotlin.String? = null
        /**
         * The message associated with the error.
         */
        public var message: kotlin.String? = null
        /**
         * The name of the script.
         */
        public var scriptName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.Diagnostics) : this() {
            this.errorCode = x.errorCode
            this.logTail = x.logTail
            this.message = x.message
            this.scriptName = x.scriptName
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy