commonMain.aws.sdk.kotlin.services.ivschat.model.DisconnectUserRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ivschat-jvm Show documentation
Show all versions of ivschat-jvm Show documentation
The AWS SDK for Kotlin client for ivschat
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ivschat.model
import aws.smithy.kotlin.runtime.SdkDsl
public class DisconnectUserRequest private constructor(builder: Builder) {
/**
* Reason for disconnecting the user.
*/
public val reason: kotlin.String? = builder.reason
/**
* Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN.
*/
public val roomIdentifier: kotlin.String = requireNotNull(builder.roomIdentifier) { "A non-null value must be provided for roomIdentifier" }
/**
* ID of the user (connection) to disconnect from the room.
*/
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.ivschat.model.DisconnectUserRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DisconnectUserRequest(")
append("reason=$reason,")
append("roomIdentifier=$roomIdentifier,")
append("userId=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = reason?.hashCode() ?: 0
result = 31 * result + (roomIdentifier.hashCode())
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 DisconnectUserRequest
if (reason != other.reason) return false
if (roomIdentifier != other.roomIdentifier) return false
if (userId != other.userId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ivschat.model.DisconnectUserRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Reason for disconnecting the user.
*/
public var reason: kotlin.String? = null
/**
* Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN.
*/
public var roomIdentifier: kotlin.String? = null
/**
* ID of the user (connection) to disconnect from the room.
*/
public var userId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ivschat.model.DisconnectUserRequest) : this() {
this.reason = x.reason
this.roomIdentifier = x.roomIdentifier
this.userId = x.userId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ivschat.model.DisconnectUserRequest = DisconnectUserRequest(this)
internal fun correctErrors(): Builder {
if (roomIdentifier == null) roomIdentifier = ""
if (userId == null) userId = ""
return this
}
}
}