
commonMain.aws.sdk.kotlin.services.iot.model.AssetPropertyValue.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* An asset property value entry containing the following information.
*/
public class AssetPropertyValue private constructor(builder: Builder) {
/**
* Optional. A string that describes the quality of the value. Accepts substitution templates. Must be `GOOD`, `BAD`, or `UNCERTAIN`.
*/
public val quality: kotlin.String? = builder.quality
/**
* The asset property value timestamp.
*/
public val timestamp: aws.sdk.kotlin.services.iot.model.AssetPropertyTimestamp? = builder.timestamp
/**
* The value of the asset property.
*/
public val value: aws.sdk.kotlin.services.iot.model.AssetPropertyVariant? = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.AssetPropertyValue = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssetPropertyValue(")
append("quality=$quality,")
append("timestamp=$timestamp,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = quality?.hashCode() ?: 0
result = 31 * result + (timestamp?.hashCode() ?: 0)
result = 31 * result + (value?.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 AssetPropertyValue
if (quality != other.quality) return false
if (timestamp != other.timestamp) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.AssetPropertyValue = Builder(this).apply(block).build()
public class Builder {
/**
* Optional. A string that describes the quality of the value. Accepts substitution templates. Must be `GOOD`, `BAD`, or `UNCERTAIN`.
*/
public var quality: kotlin.String? = null
/**
* The asset property value timestamp.
*/
public var timestamp: aws.sdk.kotlin.services.iot.model.AssetPropertyTimestamp? = null
/**
* The value of the asset property.
*/
public var value: aws.sdk.kotlin.services.iot.model.AssetPropertyVariant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.AssetPropertyValue) : this() {
this.quality = x.quality
this.timestamp = x.timestamp
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.AssetPropertyValue = AssetPropertyValue(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.AssetPropertyTimestamp] inside the given [block]
*/
public fun timestamp(block: aws.sdk.kotlin.services.iot.model.AssetPropertyTimestamp.Builder.() -> kotlin.Unit) {
this.timestamp = aws.sdk.kotlin.services.iot.model.AssetPropertyTimestamp.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy