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

commonMain.aws.sdk.kotlin.services.resiliencehub.model.AppVersionSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.resiliencehub.model

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

/**
 * Version of an application.
 */
public class AppVersionSummary private constructor(builder: Builder) {
    /**
     * Version of an application.
     */
    public val appVersion: kotlin.String = requireNotNull(builder.appVersion) { "A non-null value must be provided for appVersion" }
    /**
     * Creation time of the application version.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * Identifier of the application version.
     */
    public val identifier: kotlin.Long? = builder.identifier
    /**
     * Name of the application version.
     */
    public val versionName: kotlin.String? = builder.versionName

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

    override fun toString(): kotlin.String = buildString {
        append("AppVersionSummary(")
        append("appVersion=$appVersion,")
        append("creationTime=$creationTime,")
        append("identifier=$identifier,")
        append("versionName=$versionName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = appVersion.hashCode()
        result = 31 * result + (creationTime?.hashCode() ?: 0)
        result = 31 * result + (identifier?.hashCode() ?: 0)
        result = 31 * result + (versionName?.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 AppVersionSummary

        if (appVersion != other.appVersion) return false
        if (creationTime != other.creationTime) return false
        if (identifier != other.identifier) return false
        if (versionName != other.versionName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Version of an application.
         */
        public var appVersion: kotlin.String? = null
        /**
         * Creation time of the application version.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Identifier of the application version.
         */
        public var identifier: kotlin.Long? = null
        /**
         * Name of the application version.
         */
        public var versionName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.resiliencehub.model.AppVersionSummary) : this() {
            this.appVersion = x.appVersion
            this.creationTime = x.creationTime
            this.identifier = x.identifier
            this.versionName = x.versionName
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy