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

commonMain.aws.sdk.kotlin.services.proton.model.EnvironmentTemplateSummary.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 data.
 */
public class EnvironmentTemplateSummary private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the environment template.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The time when the 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 environment template.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The name of the environment template as displayed in the developer interface.
     */
    public val displayName: kotlin.String? = builder.displayName
    /**
     * The time when the 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 name of the environment template.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * When included, indicates that the environment template is for customer provisioned and managed infrastructure.
     */
    public val provisioning: aws.sdk.kotlin.services.proton.model.Provisioning? = builder.provisioning
    /**
     * The recommended version of the environment template.
     */
    public val recommendedVersion: kotlin.String? = builder.recommendedVersion

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

    override fun toString(): kotlin.String = buildString {
        append("EnvironmentTemplateSummary(")
        append("arn=$arn,")
        append("createdAt=$createdAt,")
        append("description=*** Sensitive Data Redacted ***,")
        append("displayName=*** Sensitive Data Redacted ***,")
        append("lastModifiedAt=$lastModifiedAt,")
        append("name=$name,")
        append("provisioning=$provisioning,")
        append("recommendedVersion=$recommendedVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (createdAt.hashCode())
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (displayName?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedAt.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (provisioning?.hashCode() ?: 0)
        result = 31 * result + (recommendedVersion?.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 EnvironmentTemplateSummary

        if (arn != other.arn) return false
        if (createdAt != other.createdAt) return false
        if (description != other.description) return false
        if (displayName != other.displayName) return false
        if (lastModifiedAt != other.lastModifiedAt) return false
        if (name != other.name) return false
        if (provisioning != other.provisioning) return false
        if (recommendedVersion != other.recommendedVersion) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the environment template.
         */
        public var arn: kotlin.String? = null
        /**
         * The time when the environment template was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A description of the environment template.
         */
        public var description: kotlin.String? = null
        /**
         * The name of the environment template as displayed in the developer interface.
         */
        public var displayName: kotlin.String? = null
        /**
         * The time when the environment template was last modified.
         */
        public var lastModifiedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the environment template.
         */
        public var name: kotlin.String? = null
        /**
         * When included, indicates that the environment template is for customer provisioned and managed infrastructure.
         */
        public var provisioning: aws.sdk.kotlin.services.proton.model.Provisioning? = null
        /**
         * The recommended version of the environment template.
         */
        public var recommendedVersion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.proton.model.EnvironmentTemplateSummary) : this() {
            this.arn = x.arn
            this.createdAt = x.createdAt
            this.description = x.description
            this.displayName = x.displayName
            this.lastModifiedAt = x.lastModifiedAt
            this.name = x.name
            this.provisioning = x.provisioning
            this.recommendedVersion = x.recommendedVersion
        }

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (lastModifiedAt == null) lastModifiedAt = Instant.fromEpochSeconds(0)
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy