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

commonMain.aws.sdk.kotlin.services.emrserverless.model.ApplicationSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.emrserverless.model

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

/**
 * The summary of attributes associated with an application.
 */
public class ApplicationSummary private constructor(builder: Builder) {
    /**
     * The CPU architecture of an application.
     */
    public val architecture: aws.sdk.kotlin.services.emrserverless.model.Architecture? = builder.architecture
    /**
     * The ARN of the application.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The date and time when the application was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
    /**
     * The ID of the application.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The name of the application.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The Amazon EMR release associated with the application.
     */
    public val releaseLabel: kotlin.String = requireNotNull(builder.releaseLabel) { "A non-null value must be provided for releaseLabel" }
    /**
     * The state of the application.
     */
    public val state: aws.sdk.kotlin.services.emrserverless.model.ApplicationState = requireNotNull(builder.state) { "A non-null value must be provided for state" }
    /**
     * The state details of the application.
     */
    public val stateDetails: kotlin.String? = builder.stateDetails
    /**
     * The type of application, such as Spark or Hive.
     */
    public val type: kotlin.String = requireNotNull(builder.type) { "A non-null value must be provided for type" }
    /**
     * The date and time when the application was last updated.
     */
    public val updatedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updatedAt) { "A non-null value must be provided for updatedAt" }

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

    override fun toString(): kotlin.String = buildString {
        append("ApplicationSummary(")
        append("architecture=$architecture,")
        append("arn=$arn,")
        append("createdAt=$createdAt,")
        append("id=$id,")
        append("name=$name,")
        append("releaseLabel=$releaseLabel,")
        append("state=$state,")
        append("stateDetails=$stateDetails,")
        append("type=$type,")
        append("updatedAt=$updatedAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = architecture?.hashCode() ?: 0
        result = 31 * result + (arn.hashCode())
        result = 31 * result + (createdAt.hashCode())
        result = 31 * result + (id.hashCode())
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (releaseLabel.hashCode())
        result = 31 * result + (state.hashCode())
        result = 31 * result + (stateDetails?.hashCode() ?: 0)
        result = 31 * result + (type.hashCode())
        result = 31 * result + (updatedAt.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 ApplicationSummary

        if (architecture != other.architecture) return false
        if (arn != other.arn) return false
        if (createdAt != other.createdAt) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (releaseLabel != other.releaseLabel) return false
        if (state != other.state) return false
        if (stateDetails != other.stateDetails) return false
        if (type != other.type) return false
        if (updatedAt != other.updatedAt) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The CPU architecture of an application.
         */
        public var architecture: aws.sdk.kotlin.services.emrserverless.model.Architecture? = null
        /**
         * The ARN of the application.
         */
        public var arn: kotlin.String? = null
        /**
         * The date and time when the application was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ID of the application.
         */
        public var id: kotlin.String? = null
        /**
         * The name of the application.
         */
        public var name: kotlin.String? = null
        /**
         * The Amazon EMR release associated with the application.
         */
        public var releaseLabel: kotlin.String? = null
        /**
         * The state of the application.
         */
        public var state: aws.sdk.kotlin.services.emrserverless.model.ApplicationState? = null
        /**
         * The state details of the application.
         */
        public var stateDetails: kotlin.String? = null
        /**
         * The type of application, such as Spark or Hive.
         */
        public var type: kotlin.String? = null
        /**
         * The date and time when the application was last updated.
         */
        public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emrserverless.model.ApplicationSummary) : this() {
            this.architecture = x.architecture
            this.arn = x.arn
            this.createdAt = x.createdAt
            this.id = x.id
            this.name = x.name
            this.releaseLabel = x.releaseLabel
            this.state = x.state
            this.stateDetails = x.stateDetails
            this.type = x.type
            this.updatedAt = x.updatedAt
        }

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (id == null) id = ""
            if (releaseLabel == null) releaseLabel = ""
            if (state == null) state = ApplicationState.SdkUnknown("no value provided")
            if (type == null) type = ""
            if (updatedAt == null) updatedAt = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy