commonMain.aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorInfo.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* The error information, such as the error code and the timestamp.
*/
public class BatchGetAssetPropertyValueErrorInfo private constructor(builder: Builder) {
/**
* The error code.
*/
public val errorCode: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorCode = requireNotNull(builder.errorCode) { "A non-null value must be provided for errorCode" }
/**
* The date the error occurred, in Unix epoch time.
*/
public val errorTimestamp: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.errorTimestamp) { "A non-null value must be provided for errorTimestamp" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchGetAssetPropertyValueErrorInfo(")
append("errorCode=$errorCode,")
append("errorTimestamp=$errorTimestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorCode.hashCode()
result = 31 * result + (errorTimestamp.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 BatchGetAssetPropertyValueErrorInfo
if (errorCode != other.errorCode) return false
if (errorTimestamp != other.errorTimestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The error code.
*/
public var errorCode: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorCode? = null
/**
* The date the error occurred, in Unix epoch time.
*/
public var errorTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorInfo) : this() {
this.errorCode = x.errorCode
this.errorTimestamp = x.errorTimestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotsitewise.model.BatchGetAssetPropertyValueErrorInfo = BatchGetAssetPropertyValueErrorInfo(this)
internal fun correctErrors(): Builder {
if (errorCode == null) errorCode = BatchGetAssetPropertyValueErrorCode.SdkUnknown("no value provided")
if (errorTimestamp == null) errorTimestamp = Instant.fromEpochSeconds(0)
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy