commonMain.aws.sdk.kotlin.services.iotsitewise.model.InterpolatedAssetPropertyValue.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotsitewise-jvm Show documentation
Show all versions of iotsitewise-jvm Show documentation
The AWS SDK for Kotlin client for IoTSiteWise
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iotsitewise.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains information about an interpolated asset property value.
*/
public class InterpolatedAssetPropertyValue private constructor(builder: Builder) {
/**
* Contains a timestamp with optional nanosecond granularity.
*/
public val timestamp: aws.sdk.kotlin.services.iotsitewise.model.TimeInNanos? = builder.timestamp
/**
* Contains an asset property value (of a single type only).
*/
public val value: aws.sdk.kotlin.services.iotsitewise.model.Variant? = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotsitewise.model.InterpolatedAssetPropertyValue = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InterpolatedAssetPropertyValue(")
append("timestamp=$timestamp,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var 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 InterpolatedAssetPropertyValue
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.iotsitewise.model.InterpolatedAssetPropertyValue = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains a timestamp with optional nanosecond granularity.
*/
public var timestamp: aws.sdk.kotlin.services.iotsitewise.model.TimeInNanos? = null
/**
* Contains an asset property value (of a single type only).
*/
public var value: aws.sdk.kotlin.services.iotsitewise.model.Variant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.InterpolatedAssetPropertyValue) : this() {
this.timestamp = x.timestamp
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotsitewise.model.InterpolatedAssetPropertyValue = InterpolatedAssetPropertyValue(this)
/**
* construct an [aws.sdk.kotlin.services.iotsitewise.model.TimeInNanos] inside the given [block]
*/
public fun timestamp(block: aws.sdk.kotlin.services.iotsitewise.model.TimeInNanos.Builder.() -> kotlin.Unit) {
this.timestamp = aws.sdk.kotlin.services.iotsitewise.model.TimeInNanos.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.iotsitewise.model.Variant] inside the given [block]
*/
public fun value(block: aws.sdk.kotlin.services.iotsitewise.model.Variant.Builder.() -> kotlin.Unit) {
this.value = aws.sdk.kotlin.services.iotsitewise.model.Variant.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy