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

commonMain.aws.sdk.kotlin.services.proton.model.EnvironmentTemplateVersion.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.proton.model

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

/**
 * The environment template version data.
 */
public class EnvironmentTemplateVersion private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the version of an environment template.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The time when the version of an environment template was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
    /**
     * A description of the minor version of an environment template.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The time when the version of an environment template was last modified.
     */
    public val lastModifiedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastModifiedAt) { "A non-null value must be provided for lastModifiedAt" }
    /**
     * The latest major version that's associated with the version of an environment template.
     */
    public val majorVersion: kotlin.String = requireNotNull(builder.majorVersion) { "A non-null value must be provided for majorVersion" }
    /**
     * The minor version of an environment template.
     */
    public val minorVersion: kotlin.String = requireNotNull(builder.minorVersion) { "A non-null value must be provided for minorVersion" }
    /**
     * The recommended minor version of the environment template.
     */
    public val recommendedMinorVersion: kotlin.String? = builder.recommendedMinorVersion
    /**
     * The schema of the version of an environment template.
     */
    public val schema: kotlin.String? = builder.schema
    /**
     * The status of the version of an environment template.
     */
    public val status: aws.sdk.kotlin.services.proton.model.TemplateVersionStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * The status message of the version of an environment template.
     */
    public val statusMessage: kotlin.String? = builder.statusMessage
    /**
     * The name of the version of an environment template.
     */
    public val templateName: kotlin.String = requireNotNull(builder.templateName) { "A non-null value must be provided for templateName" }

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

    override fun toString(): kotlin.String = buildString {
        append("EnvironmentTemplateVersion(")
        append("arn=$arn,")
        append("createdAt=$createdAt,")
        append("description=*** Sensitive Data Redacted ***,")
        append("lastModifiedAt=$lastModifiedAt,")
        append("majorVersion=$majorVersion,")
        append("minorVersion=$minorVersion,")
        append("recommendedMinorVersion=$recommendedMinorVersion,")
        append("schema=*** Sensitive Data Redacted ***,")
        append("status=$status,")
        append("statusMessage=*** Sensitive Data Redacted ***,")
        append("templateName=$templateName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (createdAt.hashCode())
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedAt.hashCode())
        result = 31 * result + (majorVersion.hashCode())
        result = 31 * result + (minorVersion.hashCode())
        result = 31 * result + (recommendedMinorVersion?.hashCode() ?: 0)
        result = 31 * result + (schema?.hashCode() ?: 0)
        result = 31 * result + (status.hashCode())
        result = 31 * result + (statusMessage?.hashCode() ?: 0)
        result = 31 * result + (templateName.hashCode())
        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 EnvironmentTemplateVersion

        if (arn != other.arn) return false
        if (createdAt != other.createdAt) return false
        if (description != other.description) return false
        if (lastModifiedAt != other.lastModifiedAt) return false
        if (majorVersion != other.majorVersion) return false
        if (minorVersion != other.minorVersion) return false
        if (recommendedMinorVersion != other.recommendedMinorVersion) return false
        if (schema != other.schema) return false
        if (status != other.status) return false
        if (statusMessage != other.statusMessage) return false
        if (templateName != other.templateName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the version of an environment template.
         */
        public var arn: kotlin.String? = null
        /**
         * The time when the version of an environment template was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A description of the minor version of an environment template.
         */
        public var description: kotlin.String? = null
        /**
         * The time when the version of an environment template was last modified.
         */
        public var lastModifiedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The latest major version that's associated with the version of an environment template.
         */
        public var majorVersion: kotlin.String? = null
        /**
         * The minor version of an environment template.
         */
        public var minorVersion: kotlin.String? = null
        /**
         * The recommended minor version of the environment template.
         */
        public var recommendedMinorVersion: kotlin.String? = null
        /**
         * The schema of the version of an environment template.
         */
        public var schema: kotlin.String? = null
        /**
         * The status of the version of an environment template.
         */
        public var status: aws.sdk.kotlin.services.proton.model.TemplateVersionStatus? = null
        /**
         * The status message of the version of an environment template.
         */
        public var statusMessage: kotlin.String? = null
        /**
         * The name of the version of an environment template.
         */
        public var templateName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.proton.model.EnvironmentTemplateVersion) : this() {
            this.arn = x.arn
            this.createdAt = x.createdAt
            this.description = x.description
            this.lastModifiedAt = x.lastModifiedAt
            this.majorVersion = x.majorVersion
            this.minorVersion = x.minorVersion
            this.recommendedMinorVersion = x.recommendedMinorVersion
            this.schema = x.schema
            this.status = x.status
            this.statusMessage = x.statusMessage
            this.templateName = x.templateName
        }

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (lastModifiedAt == null) lastModifiedAt = Instant.fromEpochSeconds(0)
            if (majorVersion == null) majorVersion = ""
            if (minorVersion == null) minorVersion = ""
            if (status == null) status = TemplateVersionStatus.SdkUnknown("no value provided")
            if (templateName == null) templateName = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy