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

commonMain.aws.sdk.kotlin.services.kafka.model.CreateConfigurationResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kafka.model

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

public class CreateConfigurationResponse private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the configuration.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * The time when the configuration was created.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * Latest revision of the configuration.
     */
    public val latestRevision: aws.sdk.kotlin.services.kafka.model.ConfigurationRevision? = builder.latestRevision
    /**
     * The name of the configuration.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The state of the configuration. The possible states are ACTIVE, DELETING, and DELETE_FAILED.
     */
    public val state: aws.sdk.kotlin.services.kafka.model.ConfigurationState? = builder.state

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

    override fun toString(): kotlin.String = buildString {
        append("CreateConfigurationResponse(")
        append("arn=$arn,")
        append("creationTime=$creationTime,")
        append("latestRevision=$latestRevision,")
        append("name=$name,")
        append("state=$state")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (creationTime?.hashCode() ?: 0)
        result = 31 * result + (latestRevision?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (state?.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 CreateConfigurationResponse

        if (arn != other.arn) return false
        if (creationTime != other.creationTime) return false
        if (latestRevision != other.latestRevision) return false
        if (name != other.name) return false
        if (state != other.state) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the configuration.
         */
        public var arn: kotlin.String? = null
        /**
         * The time when the configuration was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Latest revision of the configuration.
         */
        public var latestRevision: aws.sdk.kotlin.services.kafka.model.ConfigurationRevision? = null
        /**
         * The name of the configuration.
         */
        public var name: kotlin.String? = null
        /**
         * The state of the configuration. The possible states are ACTIVE, DELETING, and DELETE_FAILED.
         */
        public var state: aws.sdk.kotlin.services.kafka.model.ConfigurationState? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kafka.model.CreateConfigurationResponse) : this() {
            this.arn = x.arn
            this.creationTime = x.creationTime
            this.latestRevision = x.latestRevision
            this.name = x.name
            this.state = x.state
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.kafka.model.ConfigurationRevision] inside the given [block]
         */
        public fun latestRevision(block: aws.sdk.kotlin.services.kafka.model.ConfigurationRevision.Builder.() -> kotlin.Unit) {
            this.latestRevision = aws.sdk.kotlin.services.kafka.model.ConfigurationRevision.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy