
commonMain.aws.sdk.kotlin.services.ivs.model.StreamEvent.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ivs.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Object specifying a stream’s events. For a list of events, see [Using Amazon EventBridge with Amazon IVS](https://docs.aws.amazon.com/ivs/latest/userguide/eventbridge.html).
*/
public class StreamEvent private constructor(builder: Builder) {
/**
* Time when the event occurred. This is an ISO 8601 timestamp; *note that this is returned as a string*.
*/
public val eventTime: aws.smithy.kotlin.runtime.time.Instant? = builder.eventTime
/**
* Name that identifies the stream event within a `type`.
*/
public val name: kotlin.String? = builder.name
/**
* Logical group for certain events.
*/
public val type: kotlin.String? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ivs.model.StreamEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StreamEvent(")
append("eventTime=$eventTime,")
append("name=$name,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = eventTime?.hashCode() ?: 0
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (type?.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 StreamEvent
if (eventTime != other.eventTime) return false
if (name != other.name) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ivs.model.StreamEvent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Time when the event occurred. This is an ISO 8601 timestamp; *note that this is returned as a string*.
*/
public var eventTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Name that identifies the stream event within a `type`.
*/
public var name: kotlin.String? = null
/**
* Logical group for certain events.
*/
public var type: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ivs.model.StreamEvent) : this() {
this.eventTime = x.eventTime
this.name = x.name
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ivs.model.StreamEvent = StreamEvent(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy