commonMain.aws.sdk.kotlin.services.ivschat.model.UpdateRoomRequest.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 UpdateRoomRequest private constructor(builder: Builder) {
/**
* Identifier of the room to be updated. Currently this must be an ARN.
*/
public val identifier: kotlin.String = requireNotNull(builder.identifier) { "A non-null value must be provided for identifier" }
/**
* Array of logging-configuration identifiers attached to the room.
*/
public val loggingConfigurationIdentifiers: List? = builder.loggingConfigurationIdentifiers
/**
* The maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.
*/
public val maximumMessageLength: kotlin.Int? = builder.maximumMessageLength
/**
* Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.
*/
public val maximumMessageRatePerSecond: kotlin.Int? = builder.maximumMessageRatePerSecond
/**
* Configuration information for optional review of messages. Specify an empty `uri` string to disassociate a message review handler from the specified room.
*/
public val messageReviewHandler: aws.sdk.kotlin.services.ivschat.model.MessageReviewHandler? = builder.messageReviewHandler
/**
* Room name. The value does not need to be unique.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ivschat.model.UpdateRoomRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateRoomRequest(")
append("identifier=$identifier,")
append("loggingConfigurationIdentifiers=$loggingConfigurationIdentifiers,")
append("maximumMessageLength=$maximumMessageLength,")
append("maximumMessageRatePerSecond=$maximumMessageRatePerSecond,")
append("messageReviewHandler=$messageReviewHandler,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = identifier.hashCode()
result = 31 * result + (loggingConfigurationIdentifiers?.hashCode() ?: 0)
result = 31 * result + (maximumMessageLength ?: 0)
result = 31 * result + (maximumMessageRatePerSecond ?: 0)
result = 31 * result + (messageReviewHandler?.hashCode() ?: 0)
result = 31 * result + (name?.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 UpdateRoomRequest
if (identifier != other.identifier) return false
if (loggingConfigurationIdentifiers != other.loggingConfigurationIdentifiers) return false
if (maximumMessageLength != other.maximumMessageLength) return false
if (maximumMessageRatePerSecond != other.maximumMessageRatePerSecond) return false
if (messageReviewHandler != other.messageReviewHandler) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ivschat.model.UpdateRoomRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Identifier of the room to be updated. Currently this must be an ARN.
*/
public var identifier: kotlin.String? = null
/**
* Array of logging-configuration identifiers attached to the room.
*/
public var loggingConfigurationIdentifiers: List? = null
/**
* The maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.
*/
public var maximumMessageLength: kotlin.Int? = null
/**
* Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.
*/
public var maximumMessageRatePerSecond: kotlin.Int? = null
/**
* Configuration information for optional review of messages. Specify an empty `uri` string to disassociate a message review handler from the specified room.
*/
public var messageReviewHandler: aws.sdk.kotlin.services.ivschat.model.MessageReviewHandler? = null
/**
* Room name. The value does not need to be unique.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ivschat.model.UpdateRoomRequest) : this() {
this.identifier = x.identifier
this.loggingConfigurationIdentifiers = x.loggingConfigurationIdentifiers
this.maximumMessageLength = x.maximumMessageLength
this.maximumMessageRatePerSecond = x.maximumMessageRatePerSecond
this.messageReviewHandler = x.messageReviewHandler
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ivschat.model.UpdateRoomRequest = UpdateRoomRequest(this)
/**
* construct an [aws.sdk.kotlin.services.ivschat.model.MessageReviewHandler] inside the given [block]
*/
public fun messageReviewHandler(block: aws.sdk.kotlin.services.ivschat.model.MessageReviewHandler.Builder.() -> kotlin.Unit) {
this.messageReviewHandler = aws.sdk.kotlin.services.ivschat.model.MessageReviewHandler.invoke(block)
}
internal fun correctErrors(): Builder {
if (identifier == null) identifier = ""
return this
}
}
}