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

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

There is a newer version: 1.3.99
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 a current revision.
 */
public class CurrentRevision private constructor(builder: Builder) {
    /**
     * The change identifier for the current revision.
     */
    public val changeIdentifier: kotlin.String = requireNotNull(builder.changeIdentifier) { "A non-null value must be provided for changeIdentifier" }
    /**
     * The date and time when the most recent revision of the artifact was created, in timestamp format.
     */
    public val created: aws.smithy.kotlin.runtime.time.Instant? = builder.created
    /**
     * The revision ID of the current version of an artifact.
     */
    public val revision: kotlin.String = requireNotNull(builder.revision) { "A non-null value must be provided for revision" }
    /**
     * The summary of the most recent revision of the artifact.
     */
    public val revisionSummary: kotlin.String? = builder.revisionSummary

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

    override fun toString(): kotlin.String = buildString {
        append("CurrentRevision(")
        append("changeIdentifier=$changeIdentifier,")
        append("created=$created,")
        append("revision=$revision,")
        append("revisionSummary=$revisionSummary")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = changeIdentifier.hashCode()
        result = 31 * result + (created?.hashCode() ?: 0)
        result = 31 * result + (revision.hashCode())
        result = 31 * result + (revisionSummary?.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 CurrentRevision

        if (changeIdentifier != other.changeIdentifier) return false
        if (created != other.created) return false
        if (revision != other.revision) return false
        if (revisionSummary != other.revisionSummary) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The change identifier for the current revision.
         */
        public var changeIdentifier: kotlin.String? = null
        /**
         * The date and time when the most recent revision of the artifact was created, in timestamp format.
         */
        public var created: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The revision ID of the current version of an artifact.
         */
        public var revision: kotlin.String? = null
        /**
         * The summary of the most recent revision of the artifact.
         */
        public var revisionSummary: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.CurrentRevision) : this() {
            this.changeIdentifier = x.changeIdentifier
            this.created = x.created
            this.revision = x.revision
            this.revisionSummary = x.revisionSummary
        }

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

        internal fun correctErrors(): Builder {
            if (changeIdentifier == null) changeIdentifier = ""
            if (revision == null) revision = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy