
commonMain.aws.sdk.kotlin.services.iot.model.AssetPropertyTimestamp.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* An asset property timestamp entry containing the following information.
*/
public class AssetPropertyTimestamp private constructor(builder: Builder) {
/**
* Optional. A string that contains the nanosecond time offset. Accepts substitution templates.
*/
public val offsetInNanos: kotlin.String? = builder.offsetInNanos
/**
* A string that contains the time in seconds since epoch. Accepts substitution templates.
*/
public val timeInSeconds: kotlin.String = requireNotNull(builder.timeInSeconds) { "A non-null value must be provided for timeInSeconds" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.AssetPropertyTimestamp = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssetPropertyTimestamp(")
append("offsetInNanos=$offsetInNanos,")
append("timeInSeconds=$timeInSeconds")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = offsetInNanos?.hashCode() ?: 0
result = 31 * result + (timeInSeconds.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 AssetPropertyTimestamp
if (offsetInNanos != other.offsetInNanos) return false
if (timeInSeconds != other.timeInSeconds) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.AssetPropertyTimestamp = Builder(this).apply(block).build()
public class Builder {
/**
* Optional. A string that contains the nanosecond time offset. Accepts substitution templates.
*/
public var offsetInNanos: kotlin.String? = null
/**
* A string that contains the time in seconds since epoch. Accepts substitution templates.
*/
public var timeInSeconds: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.AssetPropertyTimestamp) : this() {
this.offsetInNanos = x.offsetInNanos
this.timeInSeconds = x.timeInSeconds
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.AssetPropertyTimestamp = AssetPropertyTimestamp(this)
internal fun correctErrors(): Builder {
if (timeInSeconds == null) timeInSeconds = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy