commonMain.aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceEvent.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot1clickdevicesservice.model
import aws.smithy.kotlin.runtime.SdkDsl
public class DeviceEvent private constructor(builder: Builder) {
/**
* An object representing the device associated with the event.
*/
public val device: aws.sdk.kotlin.services.iot1clickdevicesservice.model.Device? = builder.device
/**
* A serialized JSON object representing the device-type specific event.
*/
public val stdEvent: kotlin.String? = builder.stdEvent
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DeviceEvent(")
append("device=$device,")
append("stdEvent=$stdEvent")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = device?.hashCode() ?: 0
result = 31 * result + (stdEvent?.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 DeviceEvent
if (device != other.device) return false
if (stdEvent != other.stdEvent) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceEvent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An object representing the device associated with the event.
*/
public var device: aws.sdk.kotlin.services.iot1clickdevicesservice.model.Device? = null
/**
* A serialized JSON object representing the device-type specific event.
*/
public var stdEvent: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceEvent) : this() {
this.device = x.device
this.stdEvent = x.stdEvent
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceEvent = DeviceEvent(this)
/**
* construct an [aws.sdk.kotlin.services.iot1clickdevicesservice.model.Device] inside the given [block]
*/
public fun device(block: aws.sdk.kotlin.services.iot1clickdevicesservice.model.Device.Builder.() -> kotlin.Unit) {
this.device = aws.sdk.kotlin.services.iot1clickdevicesservice.model.Device.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy