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

commonMain.aws.sdk.kotlin.services.dsql.model.CreateClusterResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.dsql.model

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

/**
 * Output Mixin
 */
public class CreateClusterResponse private constructor(builder: Builder) {
    /**
     * The ARN of the created cluster.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The time of when created the cluster.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationTime) { "A non-null value must be provided for creationTime" }
    /**
     * Whether deletion protection is enabled on this cluster.
     */
    public val deletionProtectionEnabled: kotlin.Boolean = requireNotNull(builder.deletionProtectionEnabled) { "A non-null value must be provided for deletionProtectionEnabled" }
    /**
     * The ID of the created cluster.
     */
    public val identifier: kotlin.String = requireNotNull(builder.identifier) { "A non-null value must be provided for identifier" }
    /**
     * The status of the created cluster.
     */
    public val status: aws.sdk.kotlin.services.dsql.model.ClusterStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }

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

    override fun toString(): kotlin.String = buildString {
        append("CreateClusterResponse(")
        append("arn=$arn,")
        append("creationTime=$creationTime,")
        append("deletionProtectionEnabled=$deletionProtectionEnabled,")
        append("identifier=$identifier,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (creationTime.hashCode())
        result = 31 * result + (deletionProtectionEnabled.hashCode())
        result = 31 * result + (identifier.hashCode())
        result = 31 * result + (status.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 CreateClusterResponse

        if (arn != other.arn) return false
        if (creationTime != other.creationTime) return false
        if (deletionProtectionEnabled != other.deletionProtectionEnabled) return false
        if (identifier != other.identifier) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the created cluster.
         */
        public var arn: kotlin.String? = null
        /**
         * The time of when created the cluster.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Whether deletion protection is enabled on this cluster.
         */
        public var deletionProtectionEnabled: kotlin.Boolean? = null
        /**
         * The ID of the created cluster.
         */
        public var identifier: kotlin.String? = null
        /**
         * The status of the created cluster.
         */
        public var status: aws.sdk.kotlin.services.dsql.model.ClusterStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dsql.model.CreateClusterResponse) : this() {
            this.arn = x.arn
            this.creationTime = x.creationTime
            this.deletionProtectionEnabled = x.deletionProtectionEnabled
            this.identifier = x.identifier
            this.status = x.status
        }

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (creationTime == null) creationTime = Instant.fromEpochSeconds(0)
            if (deletionProtectionEnabled == null) deletionProtectionEnabled = false
            if (identifier == null) identifier = ""
            if (status == null) status = ClusterStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy