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

commonMain.aws.sdk.kotlin.services.iam.model.CreateUserResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iam.model



/**
 * Contains the response to a successful CreateUser request.
 */
public class CreateUserResponse private constructor(builder: Builder) {
    /**
     * A structure with details about the new IAM user.
     */
    public val user: aws.sdk.kotlin.services.iam.model.User? = builder.user

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

    override fun toString(): kotlin.String = buildString {
        append("CreateUserResponse(")
        append("user=$user")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = user?.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 CreateUserResponse

        if (user != other.user) return false

        return true
    }

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

    public class Builder {
        /**
         * A structure with details about the new IAM user.
         */
        public var user: aws.sdk.kotlin.services.iam.model.User? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iam.model.CreateUserResponse) : this() {
            this.user = x.user
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy