
commonMain.aws.sdk.kotlin.services.ivschat.model.DeleteMessageRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ivschat.model
public class DeleteMessageRequest private constructor(builder: Builder) {
/**
* ID of the message to be deleted. This is the `Id` field in the received message (see [ Message (Subscribe)](https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-message-subscribe.html) in the Chat Messaging API).
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* Reason for deleting the message.
*/
public val reason: kotlin.String? = builder.reason
/**
* Identifier of the room where the message should be deleted. Currently this must be an ARN.
*/
public val roomIdentifier: kotlin.String = requireNotNull(builder.roomIdentifier) { "A non-null value must be provided for roomIdentifier" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ivschat.model.DeleteMessageRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DeleteMessageRequest(")
append("id=$id,")
append("reason=$reason,")
append("roomIdentifier=$roomIdentifier")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = id.hashCode()
result = 31 * result + (reason?.hashCode() ?: 0)
result = 31 * result + (roomIdentifier.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 DeleteMessageRequest
if (id != other.id) return false
if (reason != other.reason) return false
if (roomIdentifier != other.roomIdentifier) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ivschat.model.DeleteMessageRequest = Builder(this).apply(block).build()
public class Builder {
/**
* ID of the message to be deleted. This is the `Id` field in the received message (see [ Message (Subscribe)](https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-message-subscribe.html) in the Chat Messaging API).
*/
public var id: kotlin.String? = null
/**
* Reason for deleting the message.
*/
public var reason: kotlin.String? = null
/**
* Identifier of the room where the message should be deleted. Currently this must be an ARN.
*/
public var roomIdentifier: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ivschat.model.DeleteMessageRequest) : this() {
this.id = x.id
this.reason = x.reason
this.roomIdentifier = x.roomIdentifier
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ivschat.model.DeleteMessageRequest = DeleteMessageRequest(this)
internal fun correctErrors(): Builder {
if (id == null) id = ""
if (roomIdentifier == null) roomIdentifier = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy