
commonMain.aws.sdk.kotlin.services.ivsrealtime.model.DisconnectParticipantRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ivsrealtime.model
import aws.smithy.kotlin.runtime.SdkDsl
public class DisconnectParticipantRequest private constructor(builder: Builder) {
/**
* Identifier of the participant to be disconnected. IVS assigns this; it is returned by CreateParticipantToken (for streams using WebRTC ingest) or CreateIngestConfiguration (for streams using RTMP ingest).
*/
public val participantId: kotlin.String = requireNotNull(builder.participantId) { "A non-null value must be provided for participantId" }
/**
* Description of why this participant is being disconnected.
*/
public val reason: kotlin.String? = builder.reason
/**
* ARN of the stage to which the participant is attached.
*/
public val stageArn: kotlin.String = requireNotNull(builder.stageArn) { "A non-null value must be provided for stageArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ivsrealtime.model.DisconnectParticipantRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DisconnectParticipantRequest(")
append("participantId=$participantId,")
append("reason=$reason,")
append("stageArn=$stageArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = participantId.hashCode()
result = 31 * result + (reason?.hashCode() ?: 0)
result = 31 * result + (stageArn.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 DisconnectParticipantRequest
if (participantId != other.participantId) return false
if (reason != other.reason) return false
if (stageArn != other.stageArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ivsrealtime.model.DisconnectParticipantRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Identifier of the participant to be disconnected. IVS assigns this; it is returned by CreateParticipantToken (for streams using WebRTC ingest) or CreateIngestConfiguration (for streams using RTMP ingest).
*/
public var participantId: kotlin.String? = null
/**
* Description of why this participant is being disconnected.
*/
public var reason: kotlin.String? = null
/**
* ARN of the stage to which the participant is attached.
*/
public var stageArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ivsrealtime.model.DisconnectParticipantRequest) : this() {
this.participantId = x.participantId
this.reason = x.reason
this.stageArn = x.stageArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ivsrealtime.model.DisconnectParticipantRequest = DisconnectParticipantRequest(this)
internal fun correctErrors(): Builder {
if (participantId == null) participantId = ""
if (stageArn == null) stageArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy