
commonMain.aws.sdk.kotlin.services.qbusiness.model.MemberUser.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qbusiness.model
/**
* The users that belong to a group.
*/
public class MemberUser private constructor(builder: Builder) {
/**
* The type of the user.
*/
public val type: aws.sdk.kotlin.services.qbusiness.model.MembershipType? = builder.type
/**
* The identifier of the user you want to map to a group.
*/
public val userId: kotlin.String = requireNotNull(builder.userId) { "A non-null value must be provided for userId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qbusiness.model.MemberUser = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MemberUser(")
append("type=$type,")
append("userId=$userId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = type?.hashCode() ?: 0
result = 31 * result + (userId.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 MemberUser
if (type != other.type) return false
if (userId != other.userId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qbusiness.model.MemberUser = Builder(this).apply(block).build()
public class Builder {
/**
* The type of the user.
*/
public var type: aws.sdk.kotlin.services.qbusiness.model.MembershipType? = null
/**
* The identifier of the user you want to map to a group.
*/
public var userId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.MemberUser) : this() {
this.type = x.type
this.userId = x.userId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qbusiness.model.MemberUser = MemberUser(this)
internal fun correctErrors(): Builder {
if (userId == null) userId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy