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

commonMain.aws.sdk.kotlin.services.qapps.model.PrincipalOutput.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.qapps.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The principal for which the permission applies.
 */
public class PrincipalOutput private constructor(builder: Builder) {
    /**
     * The email address associated with the user.
     */
    public val email: kotlin.String? = builder.email
    /**
     * The unique identifier of the user.
     */
    public val userId: kotlin.String? = builder.userId
    /**
     * The type of the user.
     */
    public val userType: aws.sdk.kotlin.services.qapps.model.UserType? = builder.userType

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

    override fun toString(): kotlin.String = buildString {
        append("PrincipalOutput(")
        append("email=$email,")
        append("userId=$userId,")
        append("userType=$userType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = email?.hashCode() ?: 0
        result = 31 * result + (userId?.hashCode() ?: 0)
        result = 31 * result + (userType?.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 PrincipalOutput

        if (email != other.email) return false
        if (userId != other.userId) return false
        if (userType != other.userType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The email address associated with the user.
         */
        public var email: kotlin.String? = null
        /**
         * The unique identifier of the user.
         */
        public var userId: kotlin.String? = null
        /**
         * The type of the user.
         */
        public var userType: aws.sdk.kotlin.services.qapps.model.UserType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qapps.model.PrincipalOutput) : this() {
            this.email = x.email
            this.userId = x.userId
            this.userType = x.userType
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy