commonMain.aws.sdk.kotlin.services.bedrockruntime.model.MessageStartEvent.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockruntime.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The start of a message.
*/
public class MessageStartEvent private constructor(builder: Builder) {
/**
* The role for the message.
*/
public val role: aws.sdk.kotlin.services.bedrockruntime.model.ConversationRole = requireNotNull(builder.role) { "A non-null value must be provided for role" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockruntime.model.MessageStartEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MessageStartEvent(")
append("role=$role")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = role.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 MessageStartEvent
if (role != other.role) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockruntime.model.MessageStartEvent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The role for the message.
*/
public var role: aws.sdk.kotlin.services.bedrockruntime.model.ConversationRole? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockruntime.model.MessageStartEvent) : this() {
this.role = x.role
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockruntime.model.MessageStartEvent = MessageStartEvent(this)
internal fun correctErrors(): Builder {
if (role == null) role = ConversationRole.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy