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

commonMain.aws.sdk.kotlin.services.codepipeline.model.RuleExecution.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codepipeline.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Represents information about each time a rule is run as part of the pipeline execution for a pipeline configured with conditions.
 */
public class RuleExecution private constructor(builder: Builder) {
    /**
     * Represents information about an error in CodePipeline.
     */
    public val errorDetails: aws.sdk.kotlin.services.codepipeline.model.ErrorDetails? = builder.errorDetails
    /**
     * The external ID of the run of the rule.
     */
    public val externalExecutionId: kotlin.String? = builder.externalExecutionId
    /**
     * The URL of a resource external to Amazon Web Services that is used when running the rule (for example, an external repository URL).
     */
    public val externalExecutionUrl: kotlin.String? = builder.externalExecutionUrl
    /**
     * The last status change of the rule.
     */
    public val lastStatusChange: aws.smithy.kotlin.runtime.time.Instant? = builder.lastStatusChange
    /**
     * The ARN of the user who last changed the rule.
     */
    public val lastUpdatedBy: kotlin.String? = builder.lastUpdatedBy
    /**
     * The execution ID for the run of the rule.
     */
    public val ruleExecutionId: kotlin.String? = builder.ruleExecutionId
    /**
     * The status of the run of the rule, such as FAILED.
     */
    public val status: aws.sdk.kotlin.services.codepipeline.model.RuleExecutionStatus? = builder.status
    /**
     * A summary of the run of the rule.
     */
    public val summary: kotlin.String? = builder.summary
    /**
     * The system-generated token used to identify a unique request.
     */
    public val token: kotlin.String? = builder.token

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

    override fun toString(): kotlin.String = buildString {
        append("RuleExecution(")
        append("errorDetails=$errorDetails,")
        append("externalExecutionId=$externalExecutionId,")
        append("externalExecutionUrl=$externalExecutionUrl,")
        append("lastStatusChange=$lastStatusChange,")
        append("lastUpdatedBy=$lastUpdatedBy,")
        append("ruleExecutionId=$ruleExecutionId,")
        append("status=$status,")
        append("summary=$summary,")
        append("token=$token")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = errorDetails?.hashCode() ?: 0
        result = 31 * result + (externalExecutionId?.hashCode() ?: 0)
        result = 31 * result + (externalExecutionUrl?.hashCode() ?: 0)
        result = 31 * result + (lastStatusChange?.hashCode() ?: 0)
        result = 31 * result + (lastUpdatedBy?.hashCode() ?: 0)
        result = 31 * result + (ruleExecutionId?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (summary?.hashCode() ?: 0)
        result = 31 * result + (token?.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 RuleExecution

        if (errorDetails != other.errorDetails) return false
        if (externalExecutionId != other.externalExecutionId) return false
        if (externalExecutionUrl != other.externalExecutionUrl) return false
        if (lastStatusChange != other.lastStatusChange) return false
        if (lastUpdatedBy != other.lastUpdatedBy) return false
        if (ruleExecutionId != other.ruleExecutionId) return false
        if (status != other.status) return false
        if (summary != other.summary) return false
        if (token != other.token) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Represents information about an error in CodePipeline.
         */
        public var errorDetails: aws.sdk.kotlin.services.codepipeline.model.ErrorDetails? = null
        /**
         * The external ID of the run of the rule.
         */
        public var externalExecutionId: kotlin.String? = null
        /**
         * The URL of a resource external to Amazon Web Services that is used when running the rule (for example, an external repository URL).
         */
        public var externalExecutionUrl: kotlin.String? = null
        /**
         * The last status change of the rule.
         */
        public var lastStatusChange: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ARN of the user who last changed the rule.
         */
        public var lastUpdatedBy: kotlin.String? = null
        /**
         * The execution ID for the run of the rule.
         */
        public var ruleExecutionId: kotlin.String? = null
        /**
         * The status of the run of the rule, such as FAILED.
         */
        public var status: aws.sdk.kotlin.services.codepipeline.model.RuleExecutionStatus? = null
        /**
         * A summary of the run of the rule.
         */
        public var summary: kotlin.String? = null
        /**
         * The system-generated token used to identify a unique request.
         */
        public var token: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.RuleExecution) : this() {
            this.errorDetails = x.errorDetails
            this.externalExecutionId = x.externalExecutionId
            this.externalExecutionUrl = x.externalExecutionUrl
            this.lastStatusChange = x.lastStatusChange
            this.lastUpdatedBy = x.lastUpdatedBy
            this.ruleExecutionId = x.ruleExecutionId
            this.status = x.status
            this.summary = x.summary
            this.token = x.token
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.codepipeline.model.ErrorDetails] inside the given [block]
         */
        public fun errorDetails(block: aws.sdk.kotlin.services.codepipeline.model.ErrorDetails.Builder.() -> kotlin.Unit) {
            this.errorDetails = aws.sdk.kotlin.services.codepipeline.model.ErrorDetails.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy