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

commonMain.aws.sdk.kotlin.services.kafka.model.VpcConnectionInfoServerless.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

/**
 * Description of the VPC connection.
 */
public class VpcConnectionInfoServerless private constructor(builder: Builder) {
    /**
     * The time when Amazon MSK creates the VPC Connnection.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * The owner of the VPC Connection.
     */
    public val owner: kotlin.String? = builder.owner
    /**
     * Description of the requester that calls the API operation.
     */
    public val userIdentity: aws.sdk.kotlin.services.kafka.model.UserIdentity? = builder.userIdentity
    /**
     * The Amazon Resource Name (ARN) of the VPC connection.
     */
    public val vpcConnectionArn: kotlin.String? = builder.vpcConnectionArn

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

    override fun toString(): kotlin.String = buildString {
        append("VpcConnectionInfoServerless(")
        append("creationTime=$creationTime,")
        append("owner=$owner,")
        append("userIdentity=$userIdentity,")
        append("vpcConnectionArn=$vpcConnectionArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creationTime?.hashCode() ?: 0
        result = 31 * result + (owner?.hashCode() ?: 0)
        result = 31 * result + (userIdentity?.hashCode() ?: 0)
        result = 31 * result + (vpcConnectionArn?.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 VpcConnectionInfoServerless

        if (creationTime != other.creationTime) return false
        if (owner != other.owner) return false
        if (userIdentity != other.userIdentity) return false
        if (vpcConnectionArn != other.vpcConnectionArn) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The time when Amazon MSK creates the VPC Connnection.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The owner of the VPC Connection.
         */
        public var owner: kotlin.String? = null
        /**
         * Description of the requester that calls the API operation.
         */
        public var userIdentity: aws.sdk.kotlin.services.kafka.model.UserIdentity? = null
        /**
         * The Amazon Resource Name (ARN) of the VPC connection.
         */
        public var vpcConnectionArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kafka.model.VpcConnectionInfoServerless) : this() {
            this.creationTime = x.creationTime
            this.owner = x.owner
            this.userIdentity = x.userIdentity
            this.vpcConnectionArn = x.vpcConnectionArn
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy